MIDI timecode
MIDI time code (MTC), or MIDI time division, embeds the same timing information as standard SMPTE time code as a series of small 'quarter-frame' MIDI messages. There is no provision for the user bits in the standard MIDI time code messages, and SysEx messages are used to carry this information instead. The quarter-frame messages are transmitted in a sequence of eight messages, thus a complete timecode value is specified every two frames. If the MIDI data stream is running close to capacity, the MTC data may arrive a little behind schedule which has the effect of introducing a small amount of jitter. In order to avoid this it is ideal to use a completely separate MIDI port for MTC data. Larger full-frame messages, which encapsulate a frame worth of timecode in a single message, are used to locate to a time while timecode is not running.
Unlike standard SMPTE timecode, MIDI timecode's quarter-frame and full-frame messages carry a two-bit flag value that identifies the rate of the timecode, specifying it as either:
- 24 frame/s (standard rate for film work)
- 25 frame/s (standard rate for PAL video)
- 30 frame/s (drop-frame timecode for NTSC video)
- 30 frame/s (non-drop timecode for NTSC video)
MTC distinguishes between film speed and video speed only by the rate at which timecode advances, not by the information contained in the timecode messages; thus, 29.97 frame/s dropframe is represented as 30 frame/s dropframe at 0.1% pulldown.
MTC allows the synchronisation of a sequencer or DAW with other devices that can synchronise to MTC or for these devices to 'slave' to a tape machine that is striped with SMPTE. For this to happen a SMPTE to MTC converter needs to be employed. Please note that it is possible for a tape machine to synchronise to an MTC signal (if converted to SMPTE), if the tape machine is able to 'slave' to incoming timecode via motor control, which is a rare feature.
Time code format
MIDI time code breaks the full 32-bit time code value into 8 4-bit portions. One piece is transmitted each quarter frame, so a full time code is sent every 2 frames. MIDI time code begins with a status byte of 0xF1, followed by a 7-bit value. The high 3 bits identify the part of the time code (numbered 0 through 8), while the low 4 bits provide the value. During normal operation, the upper bits increment from 0 to 7. When playing backward, they decrement.
Part 0 is sent at the start of the coded frame; the remaining parts of the time code arrive after the coded moment.
The time code is divided as follows:
Piece # | Part | Significance |
---|---|---|
0 | LSbits | Frame number (0–29) 000fffff
|
1 | MSbits | |
2 | LSbits | Second (0–59) 00ssssss
|
3 | MSbits | |
4 | LSbits | Minute (0–59) 00mmmmmm
|
5 | MSbits | |
6 | LSbits | Hour (0–23) and rate 0rrhhhhh
|
7 | MSbits |
The rate field gives the frame rate of 24, 25, 29.97 (drop-frame) or 30 frames/s.
Full time code
When there is a jump in the time code, a single full time code can be sent to synchronize attached equipment. This takes the form of a special global system exclusive message:
F0 7F 7F 01 01 hh mm ss ff F7
The manufacturer ID of 7F
indicates a real-time universal message, the channel of 7F indicates it is a global broadcast. The following ID of 01
identifies this is a time code type message, and the second 01
indicates it's a full time code message. The 4 bytes of time code follow. Although MIDI is generally little-endian, the 4 time code bytes follow in big-endian order, followed by a F7
"end of exclusive" byte.
See also
- AES-EBU embedded timecode
- Burnt-in timecode
- CTL timecode
- Linear timecode
- Rewritable consumer timecode
- Vertical interval timecode
- MIDI beat clock
- DIN sync