Chapter Three: MIDI

8. MIDI Data Format: SysEx Extensions

Extensions of System Exclusive codes

MIDI Time Code (MTC)

As mentioned on the previous module, MIDI clock, part of the system real time code class, is a relative timing device, since it depends on musical time or tempo. A real need developed to synchronize MIDI with film, audio devices, video devices, etc. This required absolute timing. The film industry already had its own form of time code called SMPTE (Society of Motion Picture and Television Engineers). Shortly after the adoption of the MIDI 1.0 spec, a new class of code called MIDI Time Code was proposed to act as a bridge between MIDI and SMPTE. External devices would convert MIDI Time Code to SMPTE and visa versa. Sequencers could be synchronized to video decks for film scoring. Time code taken from the video tape (either linear time code from a sub-audio track or vertical time code embedded in the picture) and converted by, in many cases a MIDI interface, such as MOTU's MIDI Timepiece to MIDI Timecode which would then sync up the sequence with the video tape. This is still in play today, with DAW's such a Pro Tools sync'ing up on mixing stages with digital video, style utilizing MTC and SMPTE.

The class of code used for MIDI Time Code is called universal real time system exclusive. Each packet is a small quarter-frame MIDI messages that corresponds to SMPTE Time Code when converted; it enumerates running time in hours:minutes:seconds:frames. However, unlike SMPTE, MTC also uses a 2-bit nibble to indicate the intended frame rate, as shown in the table below (rr). A short-form single message is 4 data bytes (32 bits) long, though only 24 bit are used, the others being padding 0's which may have future use. The following table lists the format of these quarter-frame packets.

Data Byte 1 Data Byte 2 Data Byte 3 Data Byte 4
0rrhhhhh 00mmmmmm 00ssssss 000fffff
r=frame rate/sec (0-3)*
h=hour (0-23)
m=minute (0–59) s=second (0–59) f=frame (0-29, or less depending on fps)
*frame rates bits(rr): 00=24 fps, 01=25 fps, 10=30 fps, 11=30 fps-drop)

The message above, when the system is running, is sent in 4-bit nibbles, 4 times per frame, up to 120 times per second depending on the frame rate, and hence called quarter-frame. It takes two full frames to complete the full message of the 8 4-bit nibbles before the next message begins.

However, when the system starts or jumps to a new location, a longer message is sent, which embeds more information and ID's itself as timecode. In hex, this looks like:

F0 7F 7F 01 00 rh mm ss ff F7

[F0 F7]=Real Time Universal SysEx header 7F=global broadcast channel (so everyone pays attention to it, can also be a specific SysEx channel), [01 01]=this is the long-form time code message, then rate/hour, minutes, seconds, frames, F7=End of SysEx message.

Frame rates are a tricky subject—it is important for anyone synchronizing to video that they know what frame rate and format the video was encoded in and that they set their MIDI sequencer frame rate to match. Fortunately, the storage capacity of current computers allows composers to import video files directly into their DAW sequencers to compose with, negating the need for much, but not all of the original purpose of MIDI Time Code.

MIDI Sample Dump Standard

I include this section only for completeness. Transferring samples via MIDI cable way back when was long and tedious process, and fortunately these days, most samplers and either virtual or hook up to hard drive where large sample sets can be loaded in seconds, not hours. This class of code grew out of a need to move samples (audio files stored on an instrument for playback) from an instrument to the computer, edit it, perhaps use a looping utility on the software to add loop points, and send it back to the instrument. The first computer program I can remember for doing this was Sound Designer from Digidesign. At the time it was developed, digital sampling instruments had very limited memory, perhaps 512 KB or less, so the samples used were typically very short. At 31.25 kbaud, sending a longer stereo sample of the type often used at the time of this writing is, to say the least, very slow and time-consuming.

MIDI Machine Control

MIDI Machine Control (MMC) and its cousin MIDI Show Control (MSC) are specific SysEx codes for controlling the transport functions of connected tape decks. MMC had been used most successfully to synchronize a MIDI sequencing program with a digital audio recorder such as an ADAT or Tascam D-78. MMC tells the deck to start, stop, pause while MIDI Time Code keeps the tape synchronized with the sequencer. MIDI Show Control similarly helps synchronize lighting and other theatrical devices, perhaps even fireworks and Christmas lights!