MIDI Quarter Frame message

The MIDI quarter frame message is timing information in the hours:minutes:seconds:frames format (similar to SMPTE) that is used to synchronize MIDI devices.

This message belongs to the category of MIDI system common messages.

The MIDI quarter frame message consists of two bytes of data. The first byte is the status byte and has the value 0xF1. It signifies that this is a MIDI quarter frame message. The second byte of the message carries a piece of the MIDI time code as described below. Obviously, this single second byte cannot carry the full time and hence several quarter frame messages must be sent to piece together the current MIDI time. By design, the second byte of the MIDI quarter frame message is designed to carry two pieces of information. The high nibble of the byte (bits 4 through 7) carry a flag that denotes which piece of the MIDI time code this byte is all about (the frames, seconds, minutes, or hours). The low nibble of the byte (bits 0 through 3) carries a piece of the actual time code. Thus, this byte can be one of the following eight types.

Hexadecimal value High nibble (decimal) Low nibble Description
0x0X 0 X A high nibble of "0" signifies that the low nibble "X" is the low nibble of the "frames" portion of the MIDI time code.
0x1X 1 X A high nibble of "1" signifies that the low nibble "X" is the high nibble of the "frames" portion of the MIDI time code.
0x2X 2 X A high nibble of "2" signifies that the low nibble "X" is the low nibble of the "seconds" portion of the MIDI time code.
0x3X 3 X A high nibble of "3" signifies that the low nibble "X" is the high nibble of the "seconds" portion of the MIDI time code.
0x4X 4 X A high nibble of "4" signifies that the low nibble "X" is the low nibble of the "minutes" portion of the MIDI time code.
0x5X 5 X A high nibble of "5" signifies that the low nibble "X" is the high nibble of the "minutes" portion of the MIDI time code.
0x6X 6 X A high nibble of "6" signifies that the low nibble "X" is the low nibble of the "hours" portion of the MIDI time code.
0x7X 7 X A high nibble of "7" signifies that the low nibble "X" contains some information about "hours" portion of the MIDI time code as well as about the number of frames per second.

The following is an example of a MIDI quarter frame message.

0xF1 0x36

The first byte 0xF1 is the status byte and signifies that this is a MIDI quarter frame message. The second byte is 0x36. The high nibble of this byte is 3, which means that the low nibble 6 is the low nibble of the "seconds" portion of the MIDI time code.

Frames per second

Note that the last row in the table above describes a message that is a bit different than the rest. When the high nibble of the second byte of the MIDI quarter frame message is 7, the low nibble bits are organized as follows.

XYYZ

The bit X is not used. The bit Z is bit 4 (counting from 0) of the "hours" portion of the MIDI time code (which means that "hours" has only 5 bits and cannot exceed 31). The YY bits describe the number of frames per second. These YY bits can have the following meaning.

Binary representation Decimal value Meaning
00 0 There are 24 frames per second.
01 1 There are 25 frames per second.
10 2 There are 29.97 frames per second (also called "30 drop").
11 3 There are 30 frames per second.

Complete time information and message order

Note from the first table above that it takes 8 quarter frame messages to send complete time information. 8 quarter frames are 2 full frames and thus it takes two full frames to send complete time.

When MIDI time is advancing, the proper order of messages is as in the first table above. The low nibble of "frames" is sent first, the high nibble of "frames" second, and so on. When time is running backwards the order is the opposite. Since it takes 2 full frames to send complete time, by the time the MIDI device receives the complete time it will be two frames behind the number of "frames" sent to it. Thus, MIDI devices would usually add two frames to the time before displaying it.

See also:
Musical Instrument Digital Interface (MIDI)

Add new comment

Filtered HTML

  • Freelinking helps you easily create HTML links. Links take the form of [[indicator:target|Title]]. By default (no indicator): Click to view a local node.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.