MIDI timecode
Encyclopedia
MIDI time code or MIDI time division, embeds the same timing information as standard SMPTE timecode 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:
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.
Like most audiovisual timecodes such as SMPTE time code
, it encodes only time of day, repeating each 24 hours. Time is given in units of hours, minutes, seconds, and frame
s. There may be 24, 25, or 30 frames per second.
Each component is assigned one byte:
Byte 0 :
Byte 1 :
Byte 2 :
Byte 3 :
s)
The manufacturer ID of
After a jump, the time clock stops until the first following quarter-frame message is received.
If the MIDI data stream is being rewound, the time codes count backward. Again, piece 0 is transmitted at the coded moment.
The time code is divided little-endian as follows:
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 workFrame rateFrame rate is the frequency at which an imaging device produces unique consecutive images called frames. The term applies equally well to computer graphics, video cameras, film cameras, and motion capture systems...
) - 25 frame/s (standard rate for PALPALPAL, short for Phase Alternating Line, is an analogue television colour encoding system used in broadcast television systems in many countries. Other common analogue television systems are NTSC and SECAM. This page primarily discusses the PAL colour encoding system...
video) - 29.97 frame/s (drop-frame timecode for NTSCNTSCNTSC, named for the National Television System Committee, is the analog television system that is used in most of North America, most of South America , Burma, South Korea, Taiwan, Japan, the Philippines, and some Pacific island nations and territories .Most countries using the NTSC standard, as...
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
Digital audio workstation
A digital audio workstation is an electronic system designed solely or primarily for recording, editing and playing back digital audio. DAWs were originally tape-less, microprocessor-based systems such as the Synclavier and Fairlight CMI...
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
The MIDI time code is 32 bits long, of which 24 are used, while 8 bits are unused and always zero. Because the full time code messages requires that the most significant bits of each byte are zero (valid MIDI data bytes), there are really only 28 available bits and 4 spare bits.Like most audiovisual timecodes such as SMPTE time code
SMPTE time code
SMPTE timecode is a set of cooperating standards to label individual frames of video or film with a time code defined by the Society of Motion Picture and Television Engineers in the SMPTE 12M specification...
, it encodes only time of day, repeating each 24 hours. Time is given in units of hours, minutes, seconds, and frame
Film frame
In filmmaking, video production, animation, and related fields, a film frame or video frame is one of the many still images which compose the complete moving picture...
s. There may be 24, 25, or 30 frames per second.
Each component is assigned one byte:
Byte 0 :
0rrhhhhh
: Rate (0–3) and hour (0–23).
-
rr = 00
: 24 frames/s -
rr = 01
: 25 frames/s -
rr = 10
: 29.97 frames/s (SMPTE drop-frame timecode) -
rr = 11
: 30 frames/s
Byte 1 :
00mmmmmm
: Minute (0–59)Byte 2 :
00ssssss
: Second (0–59)Byte 3 :
000fffff
: Frame (0–29, or less at lower frame rateFrame rate
Frame rate is the frequency at which an imaging device produces unique consecutive images called frames. The term applies equally well to computer graphics, video cameras, film cameras, and motion capture systems...
s)
Full time code
When there is a jump in the time code, a single full time code is 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.After a jump, the time clock stops until the first following quarter-frame message is received.
Quarter-frame messages
When the time is running continuously, the 32-bit time code is broken into 8 4-bit pieces, and one piece is transmitted each quarter frame. I.e. 96—120 times per second, depending on the frame rate. A quarter-frame messages consists of a status byte of 0xF1, followed by a single 7-bit data value: 3 bits to identify the piece, and 4 bits of partial time code. When time is running forward, the piece numbers increment from 0–7; with the time that piece 0 is transmitted is the coded instant, and the remaining pieces are transmitted later.If the MIDI data stream is being rewound, the time codes count backward. Again, piece 0 is transmitted at the coded moment.
The time code is divided little-endian as follows:
Piece # | Data byte | Significance |
---|---|---|
0 | 0000 ffff |
Frame number lsbits |
1 | 0001 000f |
Frame number msbit |
2 | 0010 ssss |
Second lsbits |
3 | 0011 00ss |
Second msbits |
4 | 0100 mmmm |
Minute lsbits |
5 | 0101 00mm |
Minute msbits |
6 | 0110 hhhh |
Hour lsbits |
7 | 0111 0rrh |
Rate and hour msbit |
See also
- AES-EBU embedded timecode
- Burnt-in timecodeBurnt-in timecodeBurnt-in timecode is a human-readable on-screen version of the timecode information for a piece of material superimposed on a video image...
- CTL timecodeCTL timecodeCTL timecode, developed by JVC in the early 1990s, is a unique technique for embedding, or striping, reference SMPTE timecode onto a videotape....
- Linear timecodeLinear timecodeLinear Timecode is an encoding of SMPTE timecode data in an audio signal, as defined in SMPTE 12M specification. The audio signal is commonly recorded on a VTR track or other storage media. The bits are encoded using the biphase mark code, also known as "FM": a zero bit has a single transition...
- Rewritable consumer timecodeRewritable consumer timecodeThe Rewriteable Consumer Timecode is a nearly frame accurate timecode method developed by Sony for 8mm and Hi8 analog tape formats. The RC timecode is written by the video camera directly to analog tape tracks and records the hour, minute, second and frame for each frame of video recorded to tape...
- Vertical interval timecodeVertical interval timecodeVertical Interval TimeCode is a form of SMPTE timecode embedded as a pair of black-and-white bars in a video signal. These lines are typically inserted into the vertical blanking interval of the video signal...
- MIDI beat clockMIDI beat clockMIDI beat clock is a clock signal that is broadcast via MIDI to ensure that several MIDI-enabled devices such as a synthesizer or music sequencer stay in synchronization. It is not MIDI timecode....
- DIN syncDIN SyncThe SYNC standard, often called "DIN sync" or "sync24" , defines an interface for electronic music instruments. It was introduced in the 1980s by Roland Corporation for synchronization of music sequencers, drum machines, arpeggiators and similar devices. The SYNC standard uses the signals clock ...