What MIDI defines
MIDI, the Musical Instrument Digital Interface, was published in 1983 by a group of American and Japanese instrument makers. It is a way for instruments and computers to tell each other what to play. It never carries sound itself: only events like "this key went down this hard", "this knob moved", "start now" or "switch to the organ sound".
The MIDI 1.0 specification, and the documents added to it over the years, cover four things:
- A hardware link: the 5-pin DIN cable and the electrical signal on it.
- A message protocol: the bytes that make up notes, controllers, clock and the rest. This is what survives in USB, Bluetooth, network and software MIDI.
- A file format: Standard MIDI Files (.mid), for storing timed messages.
- Agreements on meaning: General MIDI's instrument list, controller numbers, tuning, time code, MPE.
The hardware: 5-pin DIN and a current loop
A classic MIDI port is a 5-pin 180° DIN socket. Each cable goes one way, from an OUT to an IN. A THRU port passes a copy of what arrives at IN, so devices can be daisy-chained.
| Setting | Value |
|---|---|
| Speed | 31,250 bits per second (±1%) |
| Framing | 1 start bit, 8 data bits (least significant first), 1 stop bit, no parity. 10 bits per byte, 320 µs. |
| Signal | A current loop of about 5 mA. Current on is a 0, current off (idle) is a 1. |
| Isolation | The IN drives an optocoupler, so devices are never electrically connected. |
| Cable length | Up to 15 m (50 ft). |
| Pin | Use |
|---|---|
4 | Current source. At the OUT, fed from +5 V through a 220 Ω resistor. A 2014 update allows 3.3 V with smaller resistors. |
5 | Current sink: the data line. The sender pulls it low to send a 0. |
2 | Shield. Grounded at the OUT only, to avoid ground loops. |
1, 3 | Not connected. |
3.5 mm TRS jacks
Small devices often use 3.5 mm jacks with an adapter. The standard wiring, called Type A (2018), is: tip to pin 5, ring to pin 4, sleeve to pin 2. Some older gear uses "Type B", with tip and ring swapped, so an adapter for one won't work with the other.
Status bytes and data bytes
MIDI messages are made of 8-bit bytes, and the top bit decides what a byte is:
- Status byte (
80–FF, top bit 1): starts a message and says what kind it is. For channel messages, the high four bits are the message type and the low four bits the channel,0–Ffor channels 1–16. - Data byte (
00–7F, top bit 0): a value from 0 to 127. Each message type has a fixed number of them.
So 93 40 7F is: 9 note on, 3 channel 4, key 40 (64,
E4), velocity 7F (127). Because data bytes can't have the top bit set, a receiver can always
tell where a new message starts, even if it joins halfway through.
Running status
If a message has the same status byte as the one before, the sender may leave it out and send only the data
bytes. The receiver keeps using the last status. A run of notes on one channel then costs two bytes each
instead of three. It's why many keyboards send note off as 9n kk 00: a note on with velocity 0
keeps the same status byte as the note ons.
- Running status only applies to channel messages (
80–EF). - System common messages and SysEx (
F0–F7) cancel it: the next channel message must send its status. - System real-time messages (
F8–FF) don't affect it, and can appear between any two bytes, even in the middle of another message.
Channel voice messages
These carry the performance. n is the channel, 0–F.
| Status | Message | Data | Meaning |
|---|---|---|---|
8n | Note off | kk vv | Key kk released, with release velocity vv (64 if the keyboard can't measure it). |
9n | Note on | kk vv | Key kk pressed with velocity vv (1–127). Velocity 0 means note off. |
An | Polyphonic key pressure | kk pp | Pressure (aftertouch) on one held key. |
Bn | Control change | cc vv | Controller cc set to vv. 120–127 are channel mode messages. |
Cn | Program change | pp | Select instrument (patch) pp. One data byte. |
Dn | Channel pressure | pp | Aftertouch for the whole channel: the strongest pressure on any key. |
En | Pitch bend | ll mm | 14-bit value, LSB first. 00 40 (8192) is centre. |
Pitch bend joins its two data bytes into one 14-bit number: value = mm × 128 + ll, from 0 to
16,383. 8,192 (E0 00 40) is no bend. How far the ends go is set by the receiver, ±2 semitones
by default, and can be changed with RPN 0.
Notes, velocity and pitch
Keys are numbered 0–127 in semitones. 60 is middle C and 69 is A440. The
frequency of note n in equal temperament is 440 × 2(n − 69) / 12 Hz.
Octave names differ by maker: most software calls 60 C4 (scientific pitch, used on this site), while Yamaha and some DAWs call it C3. The note number is what's sent; the name is only a label.
| Number | Hex | Name | Frequency | |
|---|---|---|---|---|
| 0 | 00 | C-1 | 8.18 Hz | lowest MIDI note |
| 12 | 0C | C0 | 16.35 Hz | |
| 21 | 15 | A0 | 27.50 Hz | lowest piano key |
| 24 | 18 | C1 | 32.70 Hz | |
| 36 | 24 | C2 | 65.41 Hz | |
| 48 | 30 | C3 | 130.8 Hz | |
| 60 | 3C | C4 | 261.6 Hz | middle C |
| 64 | 40 | E4 | 329.6 Hz | |
| 67 | 43 | G4 | 392.0 Hz | |
| 69 | 45 | A4 | 440.0 Hz | tuning A |
| 72 | 48 | C5 | 523.3 Hz | |
| 84 | 54 | C6 | 1046.5 Hz | |
| 96 | 60 | C7 | 2093.0 Hz | |
| 108 | 6C | C8 | 4186.0 Hz | highest piano key |
| 120 | 78 | C9 | 8372.0 Hz | |
| 127 | 7F | G9 | 12543.9 Hz | highest MIDI note |
Velocity is how fast the key went down, 1–127. How it maps to loudness is up to the instrument, and most let you choose a curve. A note on with velocity 0 is a note off.
Control change
Control change, Bn cc vv, sets controller cc (0–127) on channel n
to value vv. Controllers 0–31 can be paired with 32–63 as their fine halves for 14-bit
precision (send the MSB first). Switches like pedals read 0–63 as off and 64–127 as on.
| CC | Hex | Controller | Notes |
|---|---|---|---|
| 0 | 00 | Bank select (MSB) | With CC 32 (LSB), picks a bank of 128 programs. Send before the program change. |
| 1 | 01 | Modulation wheel | Usually vibrato depth. |
| 2 | 02 | Breath controller | Breath pressure from a wind controller. |
| 4 | 04 | Foot controller | An expression-style pedal. |
| 5 | 05 | Portamento time | How long a glide between notes takes. |
| 6 | 06 | Data entry (MSB) | The value for the RPN or NRPN selected with CC 98–101. |
| 7 | 07 | Channel volume | The mix level of the channel. |
| 8 | 08 | Balance | Left/right balance of a stereo sound. 64 is centre. |
| 10 | 0A | Pan | Position in the stereo field. 0 left, 64 centre, 127 right. |
| 11 | 0B | Expression | A second volume, as a percentage of CC 7, for swells. |
| 32 | 20 | Bank select (LSB) | CCs 32–63 are the fine (LSB) halves of CCs 0–31. |
| 64 | 40 | Sustain (damper) pedal | 0–63 off, 64–127 on. Some pianos read it as a continuous half-pedal. |
| 65 | 41 | Portamento on/off | Switch. |
| 66 | 42 | Sostenuto | Holds only the notes already down when it is pressed. |
| 67 | 43 | Soft pedal | Switch. |
| 68 | 44 | Legato footswitch | Switch. |
| 71 | 47 | Resonance (timbre) | Sound controller 2. Usually filter resonance. |
| 72 | 48 | Release time | Sound controller 3. |
| 73 | 49 | Attack time | Sound controller 4. |
| 74 | 4A | Brightness (cutoff) | Sound controller 5. Filter cutoff on most synths; the "slide" axis in MPE. |
| 84 | 54 | Portamento control | Glide from the given note to the next one. |
| 91 | 5B | Effects 1 depth | Usually reverb send. |
| 93 | 5D | Effects 3 depth | Usually chorus send. |
| 96 | 60 | Data increment | Step the selected parameter up. |
| 97 | 61 | Data decrement | Step the selected parameter down. |
| 98 | 62 | NRPN LSB | Selects a non-registered parameter (with 99). |
| 99 | 63 | NRPN MSB | |
| 100 | 64 | RPN LSB | Selects a registered parameter (with 101). |
| 101 | 65 | RPN MSB |
All 128 controller numbers
0Bank select1Modulation2Breath3Undefined4Foot pedal5Portamento time6Data entry7Volume8Balance9Undefined10Pan11Expression12Effect 113Effect 214Undefined15Undefined16General purpose 117General purpose 218General purpose 319General purpose 420Undefined21Undefined22Undefined23Undefined24Undefined25Undefined26Undefined27Undefined28Undefined29Undefined30Undefined31Undefined32Bank select LSB33Modulation LSB34Breath LSB35CC 3 LSB36Foot pedal LSB37Portamento time LSB38Data entry LSB39Volume LSB40Balance LSB41CC 9 LSB42Pan LSB43Expression LSB44Effect 1 LSB45Effect 2 LSB46CC 14 LSB47CC 15 LSB48General purpose 1 LSB49General purpose 2 LSB50General purpose 3 LSB51General purpose 4 LSB52CC 20 LSB53CC 21 LSB54CC 22 LSB55CC 23 LSB56CC 24 LSB57CC 25 LSB58CC 26 LSB59CC 27 LSB60CC 28 LSB61CC 29 LSB62CC 30 LSB63CC 31 LSB64Sustain pedal65Portamento66Sostenuto pedal67Soft pedal68Legato69Hold 270Sound variation71Resonance72Release time73Attack time74Cutoff75Decay time76Vibrato rate77Vibrato depth78Vibrato delay79Undefined80Undefined81Undefined82Undefined83Undefined84Portamento control85Undefined86Undefined87Undefined88High-res velocity89Undefined90Undefined91Reverb92Tremolo93Chorus94Detune95Phaser96Data increment97Data decrement98NRPN LSB99NRPN MSB100RPN LSB101RPN MSB102Undefined103Undefined104Undefined105Undefined106Undefined107Undefined108Undefined109Undefined110Undefined111Undefined112Undefined113Undefined114Undefined115Undefined116Undefined117Undefined118Undefined119Undefined120All sound off121Reset all controllers122Local control123All notes off124Omni off125Omni on126Mono on127Poly on"Undefined" controllers are free for any use, which is why controllers like 20–31 and 102–119 are popular for MIDI learn and custom mappings.
RPN and NRPN: parameters beyond 128
For settings that need more than a controller number, MIDI uses parameter numbers. You first select a parameter with two controllers, then set it with Data entry (CC 6, and CC 38 for the fine part):
- RPN (registered, standard meanings): CC 101 (MSB) and CC 100 (LSB).
- NRPN (non-registered, each maker's own): CC 99 (MSB) and CC 98 (LSB).
| RPN | Parameter | Notes |
|---|---|---|
00 00 | Pitch bend sensitivity | Data entry MSB = semitones, LSB = cents. Default ±2 semitones. |
00 01 | Channel fine tuning | ±100 cents, 14-bit, 40 00 is A440. |
00 02 | Channel coarse tuning | Semitones; 40 is no change. |
00 03 | Tuning program select | For instruments with stored tunings. |
00 04 | Tuning bank select | |
00 05 | Modulation depth range | How far the mod wheel goes. |
00 06 | MPE configuration | Sets up an MPE zone (see MPE). |
7F 7F | Null | Deselects, so stray data entry messages do nothing. |
Setting the pitch bend range to ±12 semitones on channel 1, then closing the selection:
B0 65 00 RPN MSB 0
B0 64 00 RPN LSB 0 → pitch bend sensitivity
B0 06 0C data entry 12 → 12 semitones
B0 26 00 data entry LSB → 0 cents
B0 65 7F RPN MSB 127
B0 64 7F RPN LSB 127 → null, nothing selected Channel mode messages
Controllers 120–127 aren't controllers: they change how a channel behaves.
| CC | Message | Value | Effect |
|---|---|---|---|
| 120 | All sound off | 0 | Silence everything now, including release tails. |
| 121 | Reset all controllers | 0 | Back to defaults: bend centre, mod 0, pedals up, and so on. |
| 122 | Local control | 0 off, 127 on | Disconnects a synth's own keys from its sound engine, for use with a sequencer. |
| 123 | All notes off | 0 | Release every note (pedal-held notes keep sounding until the pedal is up). |
| 124 | Omni off | 0 | Listen to one channel only. |
| 125 | Omni on | 0 | Listen to all 16 channels. |
| 126 | Mono on | number of channels | One note at a time per channel. |
| 127 | Poly on | 0 | Many notes per channel. |
Omni and mono/poly combine into four modes: Mode 1 omni on, poly; Mode 2 omni on, mono; Mode 3 omni off, poly (the usual one); Mode 4 omni off, mono, used for guitar controllers with one channel per string. Messages 124–127 also act as All notes off.
System common messages
System messages have no channel: they're for every device on the cable.
| Status | Message | Data | Meaning |
|---|---|---|---|
F0 | System exclusive start | any data, ended by F7 | Manufacturer-specific data. See below. |
F1 | MIDI Time Code quarter frame | 0nnn dddd | One eighth of a time code address. |
F2 | Song position pointer | ll mm | Where to start, in MIDI beats (1 beat = 6 clocks = a 16th note). |
F3 | Song select | ss | Choose song or pattern ss. |
F4 | Undefined | Reserved. | |
F5 | Undefined | Reserved; used unofficially for port select. | |
F6 | Tune request | Analogue synths re-tune their oscillators. | |
F7 | End of exclusive | Closes a SysEx message. |
System real-time messages
One byte each, and allowed anywhere, even between the bytes of another message, so timing is never held up.
| Status | Message | Meaning |
|---|---|---|
F8 | Timing clock | 24 per quarter note, sent by the master device. |
F9 | Undefined | Reserved. |
FA | Start | Start from the beginning (song position 0) on the next clock. |
FB | Continue | Carry on from the current song position. |
FC | Stop | Stop, and remember the position. |
FD | Undefined | Reserved. |
FE | Active sensing | Optional "I'm still here", at least every 300 ms. If it stops, the receiver turns its notes off. |
FF | System reset | Back to power-up state. Never sent automatically. In a MIDI file FF means a meta event instead. |
At 120 BPM the clock ticks every 20.8 ms. Receivers that follow it count 6 ticks per 16th note and use song
position pointer (F2) to find their place before a continue.
System exclusive
SysEx carries anything the rest of MIDI doesn't: patch dumps, firmware, device settings. It starts with
F0, then a manufacturer ID, then any number of data bytes (top bit 0), and ends
with F7.
- IDs are one byte (
01Sequential,40Kawai,41Roland,42Korg,43Yamaha…) or three bytes starting with00. 7Dis for non-commercial and educational use.7E(non-real-time) and7F(real-time) are Universal SysEx, defined by the specification. The byte after is a device ID, where7Fmeans "all devices".
| Bytes | Message | Notes |
|---|---|---|
F0 7E 7F 09 01 F7 | General MIDI system on | Reset a GM device to GM mode. |
F0 7E 7F 09 02 F7 | General MIDI system off | |
F0 7E 7F 06 01 F7 | Identity request | Devices reply with F0 7E id 06 02 and their maker, family, model and version. |
F0 7F 7F 04 01 ll mm F7 | Master volume | 14-bit volume for the whole device. |
F0 7F 7F 01 01 hr mn sc fr F7 | MTC full frame | Jump to a time code position. |
Standard MIDI Files
A .mid file is a series of chunks. Each has a four-letter type and a 32-bit
length (big-endian), then its contents. Readers skip chunk types they don't know.
The header chunk: MThd
| Bytes | Field | Values |
|---|---|---|
4D 54 68 64 | "MThd" | |
00 00 00 06 | Length | Always 6 |
ff ff | Format | 0 one track · 1 several tracks played together · 2 independent patterns (rare) |
nn nn | Number of tracks | 1 for format 0 |
dd dd | Division | Top bit 0: ticks per quarter note (often 96, 480 or 960). Top bit 1: SMPTE frames per second (as a negative number) and ticks per frame. |
Track chunks: MTrk
A track is a list of events, each with a delta time in front: the number of ticks since the previous event in the same track. Events are MIDI channel messages (with running status allowed), SysEx, or meta events, which hold information for the player rather than for an instrument. Every track ends with End of track.
Variable-length quantities
Delta times and lengths use 7 bits per byte. The top bit of each byte is 1 if another byte follows and 0 on the last one. Small numbers stay small; the maximum is four bytes.
| Value | Hex value | Bytes in the file |
|---|---|---|
| 0 | 0 | 00 |
| 64 | 40 | 40 |
| 127 | 7F | 7F |
| 128 | 80 | 81 00 |
| 480 | 1E0 | 83 60 |
| 8,192 | 2000 | C0 00 |
| 16,383 | 3FFF | FF 7F |
| 16,384 | 4000 | 81 80 00 |
| 2,097,151 | 1FFFFF | FF FF 7F |
| 268,435,455 | FFFFFFF | FF FF FF 7F |
Meta events
| Bytes | Data | Meaning |
|---|---|---|
FF 00 02 | ss ss | Sequence number |
FF 01 len | text | Text |
FF 02 len | text | Copyright notice |
FF 03 len | text | Track name (sequence name in the first track) |
FF 04 len | text | Instrument name |
FF 05 len | text | Lyric, usually one syllable per event |
FF 06 len | text | Marker, like "Chorus" |
FF 07 len | text | Cue point |
FF 20 01 | cc | Channel prefix: the next meta events apply to channel cc |
FF 21 01 | pp | MIDI port (not official, but widely used) |
FF 2F 00 | End of track. Required, once, at the end of every track | |
FF 51 03 | tt tt tt | Tempo, in microseconds per quarter note. 07 A1 20 = 500,000 = 120 BPM |
FF 54 05 | hr mn se fr ff | SMPTE offset: when the track starts |
FF 58 04 | nn dd cc bb | Time signature: nn/2^dd, cc clocks per click, bb 32nds per quarter. 4/4 = 04 02 18 08 |
FF 59 02 | sf mi | Key signature: sf = sharps (+) or flats (−), mi = 0 major, 1 minor |
FF 7F len | data | Sequencer-specific data |
SysEx in a file is written as F0, a variable-length length, then the bytes after
F0 including the closing F7. F7 with a length is an "escape" for
sending raw bytes, or the next packet of a SysEx split in time.
A whole file, byte by byte
One middle C, a quarter note long, at 120 BPM. 41 bytes:
4D 54 68 64 00 00 00 06 00 00 00 01 00 60 MThd · format 0 · 1 track · 96 ticks per quarter
4D 54 72 6B 00 00 00 13 MTrk · 19 bytes follow
00 at 0: tempo 500,000 µs = 120 BPM
00 90 3C 64 at 0: note on, C4, velocity 100
60 80 3C 40 +96: note off, C4
00 end of track Open any file in the MIDI file inspector to see it decoded like this. To turn ticks into seconds, divide by the division to get quarter notes, then multiply by the current tempo, which can change during the song.
General MIDI
MIDI itself doesn't say what program 1 sounds like. General MIDI (GM, 1991) does, so a song plays with the right instruments on any GM device: a fixed list of 128 programs, a drum kit on channel 10, and a minimum feature set.
A GM instrument must:
- Play 24 notes at once and listen on all 16 channels, each with its own program.
- Use channel 10 for drums, with the standard key map below.
- Respond to velocity, channel pressure, pitch bend (±2 semitones by default) and controllers 1, 7, 10, 11, 64, 121 and 123, plus RPN 0, 1 and 2.
- Treat note 60 as middle C.
The 128 programs come in 16 families of 8:
| Programs | Family | First in family |
|---|---|---|
| 1–8 | Piano | Acoustic Grand Piano |
| 9–16 | Chromatic percussion | Celesta |
| 17–24 | Organ | Drawbar Organ |
| 25–32 | Guitar | Acoustic Guitar (nylon) |
| 33–40 | Bass | Acoustic Bass |
| 41–48 | Strings | Violin |
| 49–56 | Ensemble | String Ensemble 1 |
| 57–64 | Brass | Trumpet |
| 65–72 | Reed | Soprano Sax |
| 73–80 | Pipe | Piccolo |
| 81–88 | Synth lead | Lead 1 (square) |
| 89–96 | Synth pad | Pad 1 (new age) |
| 97–104 | Synth effects | FX 1 (rain) |
| 105–112 | Ethnic | Sitar |
| 113–120 | Percussive | Tinkle Bell |
| 121–128 | Sound effects | Guitar Fret Noise |
Programs are numbered 1–128 for people, but sent as 0–127: program 1, Acoustic Grand Piano, is Cn 00.
All 128 General MIDI programs
- Acoustic Grand Piano
- Bright Acoustic Piano
- Electric Grand Piano
- Honky-tonk Piano
- Electric Piano 1
- Electric Piano 2
- Harpsichord
- Clavinet
- Celesta
- Glockenspiel
- Music Box
- Vibraphone
- Marimba
- Xylophone
- Tubular Bells
- Dulcimer
- Drawbar Organ
- Percussive Organ
- Rock Organ
- Church Organ
- Reed Organ
- Accordion
- Harmonica
- Tango Accordion
- Acoustic Guitar (nylon)
- Acoustic Guitar (steel)
- Electric Guitar (jazz)
- Electric Guitar (clean)
- Electric Guitar (muted)
- Overdriven Guitar
- Distortion Guitar
- Guitar Harmonics
- Acoustic Bass
- Electric Bass (finger)
- Electric Bass (pick)
- Fretless Bass
- Slap Bass 1
- Slap Bass 2
- Synth Bass 1
- Synth Bass 2
- Violin
- Viola
- Cello
- Contrabass
- Tremolo Strings
- Pizzicato Strings
- Orchestral Harp
- Timpani
- String Ensemble 1
- String Ensemble 2
- Synth Strings 1
- Synth Strings 2
- Choir Aahs
- Voice Oohs
- Synth Voice
- Orchestra Hit
- Trumpet
- Trombone
- Tuba
- Muted Trumpet
- French Horn
- Brass Section
- Synth Brass 1
- Synth Brass 2
- Soprano Sax
- Alto Sax
- Tenor Sax
- Baritone Sax
- Oboe
- English Horn
- Bassoon
- Clarinet
- Piccolo
- Flute
- Recorder
- Pan Flute
- Blown Bottle
- Shakuhachi
- Whistle
- Ocarina
- Lead 1 (square)
- Lead 2 (sawtooth)
- Lead 3 (calliope)
- Lead 4 (chiff)
- Lead 5 (charang)
- Lead 6 (voice)
- Lead 7 (fifths)
- Lead 8 (bass + lead)
- Pad 1 (new age)
- Pad 2 (warm)
- Pad 3 (polysynth)
- Pad 4 (choir)
- Pad 5 (bowed)
- Pad 6 (metallic)
- Pad 7 (halo)
- Pad 8 (sweep)
- FX 1 (rain)
- FX 2 (soundtrack)
- FX 3 (crystal)
- FX 4 (atmosphere)
- FX 5 (brightness)
- FX 6 (goblins)
- FX 7 (echoes)
- FX 8 (sci-fi)
- Sitar
- Banjo
- Shamisen
- Koto
- Kalimba
- Bagpipe
- Fiddle
- Shanai
- Tinkle Bell
- Agogo
- Steel Drums
- Woodblock
- Taiko Drum
- Melodic Tom
- Synth Drum
- Reverse Cymbal
- Guitar Fret Noise
- Breath Noise
- Seashore
- Bird Tweet
- Telephone Ring
- Helicopter
- Applause
- Gunshot
The General MIDI drum map (channel 10)
35Acoustic Bass Drum · B136Bass Drum 1 · C237Side Stick · C♯238Acoustic Snare · D239Hand Clap · E♭240Electric Snare · E241Low Floor Tom · F242Closed Hi-Hat · F♯243High Floor Tom · G244Pedal Hi-Hat · A♭245Low Tom · A246Open Hi-Hat · B♭247Low-Mid Tom · B248Hi-Mid Tom · C349Crash Cymbal 1 · C♯350High Tom · D351Ride Cymbal 1 · E♭352Chinese Cymbal · E353Ride Bell · F354Tambourine · F♯355Splash Cymbal · G356Cowbell · A♭357Crash Cymbal 2 · A358Vibraslap · B♭359Ride Cymbal 2 · B360Hi Bongo · C461Low Bongo · C♯462Mute Hi Conga · D463Open Hi Conga · E♭464Low Conga · E465High Timbale · F466Low Timbale · F♯467High Agogo · G468Low Agogo · A♭469Cabasa · A470Maracas · B♭471Short Whistle · B472Long Whistle · C573Short Guiro · C♯574Long Guiro · D575Claves · E♭576Hi Wood Block · E577Low Wood Block · F578Mute Cuica · F♯579Open Cuica · G580Mute Triangle · A♭581Open Triangle · A5GM2 (1999) extended this with more controllers, more drum kits and bank-selected variations. Roland's GS and Yamaha's XG were earlier supersets of GM.
MIDI Time Code
MTC carries SMPTE time code (hours, minutes, seconds, frames) so MIDI gear can lock to tape and video. While
running, the master sends quarter frame messages, F1 0nnn dddd: nnn
says which piece of the time this is (frame, seconds, minutes and hours, low and high nibbles), and
dddd is the value. Eight of them make one full time, spread over two frames. To jump, it sends
a full frame SysEx instead. Frame rates are 24, 25, 29.97 drop-frame and 30 fps.
USB, Bluetooth, network and the browser
The messages stay the same; only the way they travel changes.
- USB MIDI (1999): each message travels in a 32-bit packet. The first byte holds a virtual cable number (up to 16 ports on one USB connection) and a code index saying how many bytes follow. Running status isn't used. USB is much faster than 31,250 baud.
- Bluetooth LE MIDI (2015): messages are grouped into small packets with a millisecond timestamp, which the receiver uses to restore the timing.
- RTP-MIDI (RFC 4695, 2006; updated as RFC 6295): MIDI over Ethernet and Wi-Fi, with recovery of lost packets. It's what macOS calls Network MIDI.
- Web MIDI: a browser API that lets web pages use MIDI devices, in Chrome, Edge, Opera and Firefox, but not Safari. Every tool on this site uses it.
MPE: MIDI Polyphonic Expression
Pitch bend and channel pressure act on a whole channel. To bend one note of a chord, MPE (adopted in 2018) puts each note on its own channel:
- A zone is a master channel plus member channels. The lower zone uses channel 1 as master and channels 2 upward as members; the upper zone uses channel 16 as master and works downward.
- The master channel carries things for the whole instrument, like the sustain pedal. Each new note goes to a free member channel.
- On the member channels, pitch bend is the note's own bend (±48 semitones by default), channel pressure is its pressure, and CC 74 is the up-and-down "slide" axis.
- Zones are set up with RPN 6, the MPE configuration message, sent on the master channel with the number of member channels.
MIDI 2.0
MIDI 2.0, adopted in 2020, is the first major update to MIDI. It keeps the same musical ideas (notes, controllers, channels, programs) and adds resolution, more channels and two-way conversation:
- Universal MIDI Packet (UMP): messages in 32-, 64-, 96- or 128-bit packets, in 16 groups of 16 channels. A UMP can carry MIDI 1.0 messages too.
- Higher resolution: 16-bit velocity, and 32-bit values for controllers, pressure and pitch bend.
- Per-note control: per-note pitch bend and per-note controllers, without MPE's channel juggling, and note attributes such as exact pitch.
- 16,384 registered and assignable controllers, each in one message instead of an RPN sequence.
- MIDI-CI (Capability Inquiry): devices discover each other, switch on profiles (agreed behaviour for, say, a drawbar organ) and exchange properties like patch lists as JSON.
- Jitter-reduction timestamps and endpoint discovery messages.
Compatibility was a rule from the start: the specification defines how to translate between 1.0 and 2.0, and a MIDI 2.0 device falls back to 1.0 when the other end doesn't answer. The 5-pin DIN port stays MIDI 1.0.
Status byte map
Every status byte, at a glance. Byte counts include the status byte.
8nNote off3 bytes9nNote on3 bytesAnPoly pressure3 bytesBnControl change3 bytesCnProgram change2 bytesDnChannel pressure2 bytesEnPitch bend3 bytesF0–F7System common1–3+ bytesF8–FFSystem real-time1 byteCorrections and questions are welcome. MIDI is a trademark of the MIDI Manufacturers Association; the official specifications are free to download from the MIDI Association.