Protocol reference
How MIDI actually works
A byte-level guide to the protocol: messages, files, clocks, expressive extensions and MIDI 2.0. Written for people building instruments, plugins, firmware and tools, and checked against the official specifications.
Byte anatomy
A MIDI 1.0 message starts with a status byte (top bit 1), followed by zero or more data bytes (top bit 0, values 0–127). For channel messages, the status byte's high nibble is the message type and its low nibble is the channel, 0–15 on the wire and 1–16 in user interfaces.
| High nibble | Message | Data bytes |
|---|---|---|
8n |
Note Off | 2 |
9n |
Note On | 2 |
An |
Poly Pressure | 2 |
Bn |
Control Change | 2 |
Cn |
Program Change | 1 |
Dn |
Channel Pressure | 1 |
En |
Pitch Bend | 2 |
Fn |
System | varies |
MIDI 1.0
- Messages Status and data bytes, channel voice & mode messages, system common & real-time, running status.
- Notes & Pitch Note numbers, octave naming, frequencies, velocity, and pitch bend math.
- Control Change All 128 controller numbers, 14-bit pairs, and channel mode messages.
- RPN & NRPN Registered and non-registered parameter numbers, data entry, and the null RPN.
- System Exclusive Manufacturer IDs, Universal SysEx, device inquiry, and checksums.
- Timing & Sync MIDI clock, Song Position Pointer, MIDI Time Code, and tempo math.
Files & Sounds
Expression & MIDI 2.0
Connecting
Reference
- Cookbook Short, runnable recipes in JavaScript, Python, C++ and Rust for everyday MIDI tasks.
- Glossary Plain-language definitions of MIDI terms, from Active Sensing to UMP.
- History of MIDI A timeline from the 1983 launch through General MIDI, USB, Web MIDI and MIDI 2.0.
- Specs & Resources Official MIDI Association and AMEI specifications, RFCs, and trusted references.