System exclusive messages, or sysex, carry anything a manufacturer defines: patch
data, settings, or a reset into a particular sound set. On a MIDI cable they start with
F0, a manufacturer ID, the maker’s bytes, and end with F7. The
MIDI file in an RMI file’s data
chunk stores them with a length, so a reader can skip them without knowing what they
mean. There are two forms, and a sysex event cancels
running status.
Forms
| Form | Name | What is sent |
|---|---|---|
F0 <length> <bytes> | System exclusive | F0, then the bytes |
F7 <length> <bytes> | Continuation packet or escape | exactly the bytes, nothing added |
The length is a variable-length quantity counting the bytes after it.
F0: a system exclusive message
The length counts the bytes after F0, including the closing
F7. To send the message, a player sends F0 and then the
bytes. The first byte after F0 is the manufacturer ID.
Two examples from real files, both at the start of a song:
| Bytes | Meaning |
|---|---|
00 F0 05 7E 7F 09 01 F7 | Delta 0, sysex of 5 bytes: General MIDI system on (universal non-real time, all devices) |
00 F0 0A 41 10 42 12 40 00 7F 00 41 F7 | Delta 0, sysex of 10 bytes: Roland GS reset (manufacturer 41, Roland) |
Manufacturer IDs
The ID is one byte, or 00 followed by two more bytes for the longer IDs
given to later companies. 7D is for non-commercial use, and
7E and 7F are the
universal messages. The
full register lists every ID
the MIDI Association has assigned, and the explorer names them from it.
What follows the ID belongs to the maker, and no public specification covers it for all of them; the explorer shows it as bytes. The universal messages are different: their sub-IDs and fields are registered, and the explorer decodes them.
Set-up messages
Files often begin with a message that puts the synthesiser into a known sound set.
The explorer names these and lists them under Sound set (the bytes after
F0):
| Bytes | Message |
|---|---|
7E 7F 09 01 F7 | General MIDI system on |
7E 7F 09 02 F7 | General MIDI system off |
7E 7F 09 03 F7 | General MIDI 2 system on |
41 10 42 12 40 00 7F 00 41 F7 | Roland GS reset (the second byte is the device ID, here 10) |
43 1n 4C 00 00 7E 00 F7 | Yamaha XG system on (n is the device number) |
7F 7F 04 01 … | Master volume (universal real time) |
Packets: a message in parts
A long message, or one sent with pauses in it, can be split. The first part is an
F0 event whose bytes do not end in F7. The rest follow as
F7 events, each with its own delta time, and the last one ends in
F7. Between packets time can pass. A reader knows an F7 event
is a packet because an F0 before it was left open; any other event closes
it. The explorer decodes the whole message at the packet that ends it.
| Bytes | Meaning |
|---|---|
00 F0 03 43 12 00 | Delta 0: F0 43 12 00 is sent, with no F7 yet |
81 48 F7 06 43 12 00 43 12 00 | 200 ticks later, a packet: 43 12 00 43 12 00 |
64 F7 04 43 12 00 F7 | 100 ticks later, the last packet: 43 12 00 F7, which ends the message |
F7: an escape
When no F0 packet is open, an F7 event is an escape: its
bytes are sent exactly as they are, with nothing added. A file uses it for anything it
cannot otherwise carry, such as the system common and real-time messages below, which
are not events in a file on their own. The explorer names them.
| Byte | Message | Data bytes |
|---|---|---|
F1 | MIDI Time Code quarter frame | One: the high nibble says which part of the time (0–7, frames to hours), the low nibble its value |
F2 | Song position pointer | Two: 14 bits, LSB first, in sixteenth notes (MIDI beats) from the start |
F3 | Song select | One: a song number |
F4, F5 | Undefined system common | None |
F6 | Tune request | None |
F8 | Timing clock (24 a quarter note) | None |
F9 | Undefined real time | None |
FA | Start | None |
FB | Continue | None |
FC | Stop | None |
FD | Undefined real time | None |
FE | Active sensing | None |
FF | System reset (only ever inside an escape; in a file FF starts a meta event) | None |
| Bytes | Meaning |
|---|---|
00 F7 02 F3 01 | Delta 0: send F3 01, song select 1 |
00 F7 01 FA | Delta 0: send FA, start |
These two lines are examples built for this page, not taken from a file.