Tuesday, January 29, 2008

SMPTE time code

This is an expanded version of a post that I originally posted to the Help! forum of VSE on 17 January 2008.

What SMPTE basically does is encode a time code into an audio signal, kind of like the way a modem encodes data into an audio signal that you can send down a phone line. The idea is that you can record a SMPTE time code signal on one audio track of a multi-track tape (this is usually called "stripe-ing" the tape), and then when the tape is played back, the playback of the time code can be used to synchronize other things (such as sequencers) to the tape. This works because if the tape slows down, say, then the time code slows down too. Because SMPTE (the acronym stands for "Society of Motion Picture and Television Engineers") was originally intended to synchronize video sources, it counts time in terms of hours, minutes, seconds, and frames from an arbitrary zero-time starting point.

Because SMPTE is used to sync audio to video and film, there are a number of different standards for the number of frames that constitutes one second, according to the visual medium being used:
  • 24 fps: Film
  • 25 fps: PAL video, used in Europe
  • 30 fps: Black-and-white NTSC video, USA and Japan
  • 30-drop: Color NTSC video, USA and Japan. This one is an oddball that compensates for the fact that NTSC color video is not exactly 30 fps; it's slightly slower. Instead of dividing the time code second into a non-integer number of frames, which would be really awkward, it has the frame counter skip two counts at the beginning of certain minutes, in a repeating pattern, so that the time code stays within a few milliseconds of the video. If you tried to sync audio to NTSC color video using 30 fps time code without the drop frames, at the end of an hour, the audio would be about four seconds ahead of the video.

So what does the electronic musician use SMPTE time code for, and how is it used? SMPTE time code is used in electronic music primarily to synchronize a sequencer (or some hardware containing a sequencer, such as a drum machine) to a taped audio track. Some seqeuncers have the ability to generate and read SMPTE time code directly. Some MIDI interfaces, such as the MOTU MIDI Time Piece / MIDI Express can generate a SMPTE signal to stripe a tape, and then on playback, read the SMPTE and translate it to MIDI Time Code (MTC). Consider a setup with tape, a SMPTE-reading MIDI interface, and a drum machine being driven by MIDI. At the start of the production, the SMPTE generator in the MIDI interface is used to "stripe" a time code on one track of the multitrack tape. This starts from some arbitrary starting point on the tape, which the SMPTE generator encodes as time zero, with time counting up from there. Audio tracks are then laid down on the tape, at a tempo regulated by a click track generated by a drum machine playing at a set beats per minute (BPM). The audio tracks may start at some arbitrary time past time zero on the tape.

After the audio tracks are recorded, the simple click pattern programmed in the drum machine is replaced by a full-up drum sequence. It is then needed to play back the multitrack tape in sync with the drum machine, so the result can be mixed down. The track of the multitrack tape which contains the SMPTE code is routed to the SMPTE reader on the MIDI interface. The tape is positioned at the start of the audio and the SMPTE time at that point in the tape is read. This is then programmed as an offset into either the drum machine's sequencer, if it has the ability to do so, or perhaps into the MIDI interface. When the tape is played back, this offset is subtracted from the current SMPTE time to determine where the drum machine should begin. Playback is started, and the MIDI interface reads the SMPTE time code and translates it to MIDI time code which is routed to the drum machine. The drum machine then plays back in sync with the tape. Further, unlike simple protocols such as DIN sync or MIDI Clock, the SMPTE/MTC combination allows the tape to be started at any point in the song and the drum machine will start at that same point -- no hand cueing is necessary, since the SMPTE code indicates actual time and not just clock ticks.

To summarize: For electronic music production: 1. If you aren't syncing sequencers to tape, or syncing two tape machines, or syncing audio to video, you don't need SMPTE. 2. If you are syncing to tape, but video isn't involved, you can use whatever frame rate is convenient. Most people who do this use either 25 or 30 fps because when you do time calculations, it makes the math easier.

Further reading on SMPTE time code:

No comments: