MIDI Timecode, MIDI clocks and Song Position Pointers (SPPs)

MIDI timecode (MTC) is a sub-protocol within MIDI, used to keep MIDI equipment in sync. MTC messages are an alternative to using MIDI Clocks and Song Position Pointer messages. MTC is really nothing more than standard timecode "re-packaged" for transmission over MIDI. MIDI timecode consists of several types of message, the most important being the Quarter Frame message. The other messages: Frame Message, User Bits and Notation Information are really pre-specified System Exclusive commands.

Quarter Frame message

The heart of MIDI timecode is the Quarter Frame message (F1), and its subsequent data byte. This message is somewhat analogous to the MIDI Clock message. However, the Quarter Frame is more than just a "clock tick" because the message data byte contains the 80 bits of timecode information (as explained above), broken down into four-bit half-bytes or "nybbles"! In order to express the full eighty bits of timecode, eight Quarter Frame messages are required. They are always sent in a predetermined order with the first byte at the video frame boundary.

The first Quarter Frame message contains the low nybble (bits 0 to 3) of the Frame count. The second Quarter Frame message contains the high nybble (bits 4 to 7) of the Frame count. The third and fourth messages contain the low and high nybbles of the Seconds count. The fifth and sixth messages contain the low and high nybbles of the Minutes count. The seventh and eighth messages contain the low and high nybbles of the Hours count. The eighth message (Hours high-nybble) also contains the timecode frames-rate information (24, 25, 30 drop, or 30 fps).

To recap, if we take the Quarter Frame message to be of the generic form,

0nnn dddd

Remember, in the MIDI standard, all data bytes always start with a zero and the Quarter Frame data byte is no exception. The value of nnn denotes the following

The data byte for the Hours hi nybble and frame-rate, the bits are interpreted as follows:

0nnn xyyd

Ideally, eight Quarter Frame messages should be sent per frame in order to piece together the whole timecode value. However this would mean 8 x 25 = 200 messages per second, or 3200 baud. Representing, as this does, about 10 percent of the available MIDI bandwidth, this was considered too high an overhead, and - instead - only four Quarter Frame messages are sent per frame: hence the name! This has the obvious disadvantage that MTC is only accurate to two-frames. From a practical point of view, because it takes eight Quarter Frames messages to reconstruct the current timecode value, when a piece of equipment does finally piece the time-value together, it is actually two frames behind the real current time. So, for display purposes, the slave should always add two frames to the current time.

Full Frame

For cueing the slave to a particular start point, Quarter Frame messages are not used. Instead, an MTC Full Frame message should be sent. The Full Frame is a SysEx message that encodes the entire SMPTE time in one message as so (in hex):

F0 7F cc 01 01 hr mn sc fr F7

cc is the SysEx channel (0 to 127). It is suggested that a device default to using its Manufacturer's SysEx ID number for this channel, giving the musician the option of changing it. Channel number 0x7F is used to indicate that all devices on the daisy-chain should recognize this Full Frame message. The hr, mn, sc, and fr are the hours, minutes, seconds, and frames of the current SMPTE time. The hours byte also contains the SMPTE Type as per the Quarter Frame's Hours High Nibble message.

The Full Frame simply cues a slave to a particular SMPTE time. The slave doesn't actually start running until it starts receiving Quarter Frame messages. (Which implies that a slave is stopped whenever it is not receiving Quarter Frame messages). The master should pause after sending a Full Frame, and before sending a Quarter Frame, in order to give the slave time to cue to the desired SMPTE time. During fast forward or rewind (ie, shuttle) modes, the master should not continuously send Quarter Frame messages, but rather, send Full Frame messages at regular intervals. Quarter-frame messages and Full Frame messages can be sent in forward or reverse order so that MIDI devices can remain in sync with tape machines running forwards or backwards.

User Bits

SMPTE also provides for 32 "user bits". The Users Bits messages can be sent at any time, whenever these values must be passed to some device on the daisy-chain.


Links

Back to home page

Address all mail to richard@richardbrice.net


© Richard Brice 2002. All rights reserved. Newnes, CYP other information by permission