Skip to content

learn / midi specification

The MIDI specification, explained

Everything in MIDI 1.0 that you need to build, debug or just understand MIDI gear and software: what every byte means, with tables. This is a guide written in plain words, not the official text, which is published by the MIDI Association.

Prefer to learn by playing? How MIDI works turns most of this page into things you can press.

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.

SettingValue
Speed31,250 bits per second (±1%)
Framing1 start bit, 8 data bits (least significant first), 1 stop bit, no parity. 10 bits per byte, 320 µs.
SignalA current loop of about 5 mA. Current on is a 0, current off (idle) is a 1.
IsolationThe IN drives an optocoupler, so devices are never electrically connected.
Cable lengthUp to 15 m (50 ft).
PinUse
4Current source. At the OUT, fed from +5 V through a 220 Ω resistor. A 2014 update allows 3.3 V with smaller resistors.
5Current sink: the data line. The sender pulls it low to send a 0.
2Shield. Grounded at the OUT only, to avoid ground loops.
1, 3Not 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–F for 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.

StatusMessageDataMeaning
8nNote offkk vvKey kk released, with release velocity vv (64 if the keyboard can't measure it).
9nNote onkk vvKey kk pressed with velocity vv (1–127). Velocity 0 means note off.
AnPolyphonic key pressurekk ppPressure (aftertouch) on one held key.
BnControl changecc vvController cc set to vv. 120–127 are channel mode messages.
CnProgram changeppSelect instrument (patch) pp. One data byte.
DnChannel pressureppAftertouch for the whole channel: the strongest pressure on any key.
EnPitch bendll mm14-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.

NumberHexNameFrequency
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.

CCHexControllerNotes
000Bank select (MSB)With CC 32 (LSB), picks a bank of 128 programs. Send before the program change.
101Modulation wheelUsually vibrato depth.
202Breath controllerBreath pressure from a wind controller.
404Foot controllerAn expression-style pedal.
505Portamento timeHow long a glide between notes takes.
606Data entry (MSB)The value for the RPN or NRPN selected with CC 98–101.
707Channel volumeThe mix level of the channel.
808BalanceLeft/right balance of a stereo sound. 64 is centre.
100APanPosition in the stereo field. 0 left, 64 centre, 127 right.
110BExpressionA second volume, as a percentage of CC 7, for swells.
3220Bank select (LSB)CCs 32–63 are the fine (LSB) halves of CCs 0–31.
6440Sustain (damper) pedal0–63 off, 64–127 on. Some pianos read it as a continuous half-pedal.
6541Portamento on/offSwitch.
6642SostenutoHolds only the notes already down when it is pressed.
6743Soft pedalSwitch.
6844Legato footswitchSwitch.
7147Resonance (timbre)Sound controller 2. Usually filter resonance.
7248Release timeSound controller 3.
7349Attack timeSound controller 4.
744ABrightness (cutoff)Sound controller 5. Filter cutoff on most synths; the "slide" axis in MPE.
8454Portamento controlGlide from the given note to the next one.
915BEffects 1 depthUsually reverb send.
935DEffects 3 depthUsually chorus send.
9660Data incrementStep the selected parameter up.
9761Data decrementStep the selected parameter down.
9862NRPN LSBSelects a non-registered parameter (with 99).
9963NRPN MSB
10064RPN LSBSelects a registered parameter (with 101).
10165RPN MSB
All 128 controller numbers
0Bank select
1Modulation
2Breath
3Undefined
4Foot pedal
5Portamento time
6Data entry
7Volume
8Balance
9Undefined
10Pan
11Expression
12Effect 1
13Effect 2
14Undefined
15Undefined
16General purpose 1
17General purpose 2
18General purpose 3
19General purpose 4
20Undefined
21Undefined
22Undefined
23Undefined
24Undefined
25Undefined
26Undefined
27Undefined
28Undefined
29Undefined
30Undefined
31Undefined
32Bank select LSB
33Modulation LSB
34Breath LSB
35CC 3 LSB
36Foot pedal LSB
37Portamento time LSB
38Data entry LSB
39Volume LSB
40Balance LSB
41CC 9 LSB
42Pan LSB
43Expression LSB
44Effect 1 LSB
45Effect 2 LSB
46CC 14 LSB
47CC 15 LSB
48General purpose 1 LSB
49General purpose 2 LSB
50General purpose 3 LSB
51General purpose 4 LSB
52CC 20 LSB
53CC 21 LSB
54CC 22 LSB
55CC 23 LSB
56CC 24 LSB
57CC 25 LSB
58CC 26 LSB
59CC 27 LSB
60CC 28 LSB
61CC 29 LSB
62CC 30 LSB
63CC 31 LSB
64Sustain pedal
65Portamento
66Sostenuto pedal
67Soft pedal
68Legato
69Hold 2
70Sound variation
71Resonance
72Release time
73Attack time
74Cutoff
75Decay time
76Vibrato rate
77Vibrato depth
78Vibrato delay
79Undefined
80Undefined
81Undefined
82Undefined
83Undefined
84Portamento control
85Undefined
86Undefined
87Undefined
88High-res velocity
89Undefined
90Undefined
91Reverb
92Tremolo
93Chorus
94Detune
95Phaser
96Data increment
97Data decrement
98NRPN LSB
99NRPN MSB
100RPN LSB
101RPN MSB
102Undefined
103Undefined
104Undefined
105Undefined
106Undefined
107Undefined
108Undefined
109Undefined
110Undefined
111Undefined
112Undefined
113Undefined
114Undefined
115Undefined
116Undefined
117Undefined
118Undefined
119Undefined
120All sound off
121Reset all controllers
122Local control
123All notes off
124Omni off
125Omni on
126Mono on
127Poly 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).
RPNParameterNotes
00 00Pitch bend sensitivityData entry MSB = semitones, LSB = cents. Default ±2 semitones.
00 01Channel fine tuning±100 cents, 14-bit, 40 00 is A440.
00 02Channel coarse tuningSemitones; 40 is no change.
00 03Tuning program selectFor instruments with stored tunings.
00 04Tuning bank select
00 05Modulation depth rangeHow far the mod wheel goes.
00 06MPE configurationSets up an MPE zone (see MPE).
7F 7FNullDeselects, 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.

CCMessageValueEffect
120All sound off0Silence everything now, including release tails.
121Reset all controllers0Back to defaults: bend centre, mod 0, pedals up, and so on.
122Local control0 off, 127 onDisconnects a synth's own keys from its sound engine, for use with a sequencer.
123All notes off0Release every note (pedal-held notes keep sounding until the pedal is up).
124Omni off0Listen to one channel only.
125Omni on0Listen to all 16 channels.
126Mono onnumber of channelsOne note at a time per channel.
127Poly on0Many 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.

StatusMessageDataMeaning
F0System exclusive startany data, ended by F7Manufacturer-specific data. See below.
F1MIDI Time Code quarter frame0nnn ddddOne eighth of a time code address.
F2Song position pointerll mmWhere to start, in MIDI beats (1 beat = 6 clocks = a 16th note).
F3Song selectssChoose song or pattern ss.
F4UndefinedReserved.
F5UndefinedReserved; used unofficially for port select.
F6Tune requestAnalogue synths re-tune their oscillators.
F7End of exclusiveCloses 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.

StatusMessageMeaning
F8Timing clock24 per quarter note, sent by the master device.
F9UndefinedReserved.
FAStartStart from the beginning (song position 0) on the next clock.
FBContinueCarry on from the current song position.
FCStopStop, and remember the position.
FDUndefinedReserved.
FEActive sensingOptional "I'm still here", at least every 300 ms. If it stops, the receiver turns its notes off.
FFSystem resetBack 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 (01 Sequential, 40 Kawai, 41 Roland, 42 Korg, 43 Yamaha…) or three bytes starting with 00.
  • 7D is for non-commercial and educational use.
  • 7E (non-real-time) and 7F (real-time) are Universal SysEx, defined by the specification. The byte after is a device ID, where 7F means "all devices".
BytesMessageNotes
F0 7E 7F 09 01 F7General MIDI system onReset a GM device to GM mode.
F0 7E 7F 09 02 F7General MIDI system off
F0 7E 7F 06 01 F7Identity requestDevices reply with F0 7E id 06 02 and their maker, family, model and version.
F0 7F 7F 04 01 ll mm F7Master volume14-bit volume for the whole device.
F0 7F 7F 01 01 hr mn sc fr F7MTC full frameJump 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

BytesFieldValues
4D 54 68 64"MThd"
00 00 00 06LengthAlways 6
ff ffFormat0 one track · 1 several tracks played together · 2 independent patterns (rare)
nn nnNumber of tracks1 for format 0
dd ddDivisionTop 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.

ValueHex valueBytes in the file
0000
644040
1277F7F
1288081 00
4801E083 60
8,1922000C0 00
16,3833FFFFF 7F
16,384400081 80 00
2,097,1511FFFFFFF FF 7F
268,435,455FFFFFFFFF FF FF 7F

Meta events

BytesDataMeaning
FF 00 02ss ssSequence number
FF 01 lentextText
FF 02 lentextCopyright notice
FF 03 lentextTrack name (sequence name in the first track)
FF 04 lentextInstrument name
FF 05 lentextLyric, usually one syllable per event
FF 06 lentextMarker, like "Chorus"
FF 07 lentextCue point
FF 20 01ccChannel prefix: the next meta events apply to channel cc
FF 21 01ppMIDI port (not official, but widely used)
FF 2F 00End of track. Required, once, at the end of every track
FF 51 03tt tt ttTempo, in microseconds per quarter note. 07 A1 20 = 500,000 = 120 BPM
FF 54 05hr mn se fr ffSMPTE offset: when the track starts
FF 58 04nn dd cc bbTime signature: nn/2^dd, cc clocks per click, bb 32nds per quarter. 4/4 = 04 02 18 08
FF 59 02sf miKey signature: sf = sharps (+) or flats (−), mi = 0 major, 1 minor
FF 7F lendataSequencer-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 FF 51 03 07 A1 20                    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 FF 2F 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:

ProgramsFamilyFirst in family
1–8PianoAcoustic Grand Piano
9–16Chromatic percussionCelesta
17–24OrganDrawbar Organ
25–32GuitarAcoustic Guitar (nylon)
33–40BassAcoustic Bass
41–48StringsViolin
49–56EnsembleString Ensemble 1
57–64BrassTrumpet
65–72ReedSoprano Sax
73–80PipePiccolo
81–88Synth leadLead 1 (square)
89–96Synth padPad 1 (new age)
97–104Synth effectsFX 1 (rain)
105–112EthnicSitar
113–120PercussiveTinkle Bell
121–128Sound effectsGuitar 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
  1. Acoustic Grand Piano
  2. Bright Acoustic Piano
  3. Electric Grand Piano
  4. Honky-tonk Piano
  5. Electric Piano 1
  6. Electric Piano 2
  7. Harpsichord
  8. Clavinet
  9. Celesta
  10. Glockenspiel
  11. Music Box
  12. Vibraphone
  13. Marimba
  14. Xylophone
  15. Tubular Bells
  16. Dulcimer
  17. Drawbar Organ
  18. Percussive Organ
  19. Rock Organ
  20. Church Organ
  21. Reed Organ
  22. Accordion
  23. Harmonica
  24. Tango Accordion
  25. Acoustic Guitar (nylon)
  26. Acoustic Guitar (steel)
  27. Electric Guitar (jazz)
  28. Electric Guitar (clean)
  29. Electric Guitar (muted)
  30. Overdriven Guitar
  31. Distortion Guitar
  32. Guitar Harmonics
  33. Acoustic Bass
  34. Electric Bass (finger)
  35. Electric Bass (pick)
  36. Fretless Bass
  37. Slap Bass 1
  38. Slap Bass 2
  39. Synth Bass 1
  40. Synth Bass 2
  41. Violin
  42. Viola
  43. Cello
  44. Contrabass
  45. Tremolo Strings
  46. Pizzicato Strings
  47. Orchestral Harp
  48. Timpani
  49. String Ensemble 1
  50. String Ensemble 2
  51. Synth Strings 1
  52. Synth Strings 2
  53. Choir Aahs
  54. Voice Oohs
  55. Synth Voice
  56. Orchestra Hit
  57. Trumpet
  58. Trombone
  59. Tuba
  60. Muted Trumpet
  61. French Horn
  62. Brass Section
  63. Synth Brass 1
  64. Synth Brass 2
  65. Soprano Sax
  66. Alto Sax
  67. Tenor Sax
  68. Baritone Sax
  69. Oboe
  70. English Horn
  71. Bassoon
  72. Clarinet
  73. Piccolo
  74. Flute
  75. Recorder
  76. Pan Flute
  77. Blown Bottle
  78. Shakuhachi
  79. Whistle
  80. Ocarina
  81. Lead 1 (square)
  82. Lead 2 (sawtooth)
  83. Lead 3 (calliope)
  84. Lead 4 (chiff)
  85. Lead 5 (charang)
  86. Lead 6 (voice)
  87. Lead 7 (fifths)
  88. Lead 8 (bass + lead)
  89. Pad 1 (new age)
  90. Pad 2 (warm)
  91. Pad 3 (polysynth)
  92. Pad 4 (choir)
  93. Pad 5 (bowed)
  94. Pad 6 (metallic)
  95. Pad 7 (halo)
  96. Pad 8 (sweep)
  97. FX 1 (rain)
  98. FX 2 (soundtrack)
  99. FX 3 (crystal)
  100. FX 4 (atmosphere)
  101. FX 5 (brightness)
  102. FX 6 (goblins)
  103. FX 7 (echoes)
  104. FX 8 (sci-fi)
  105. Sitar
  106. Banjo
  107. Shamisen
  108. Koto
  109. Kalimba
  110. Bagpipe
  111. Fiddle
  112. Shanai
  113. Tinkle Bell
  114. Agogo
  115. Steel Drums
  116. Woodblock
  117. Taiko Drum
  118. Melodic Tom
  119. Synth Drum
  120. Reverse Cymbal
  121. Guitar Fret Noise
  122. Breath Noise
  123. Seashore
  124. Bird Tweet
  125. Telephone Ring
  126. Helicopter
  127. Applause
  128. Gunshot
The General MIDI drum map (channel 10)
35Acoustic Bass Drum · B1
36Bass Drum 1 · C2
37Side Stick · C♯2
38Acoustic Snare · D2
39Hand Clap · E♭2
40Electric Snare · E2
41Low Floor Tom · F2
42Closed Hi-Hat · F♯2
43High Floor Tom · G2
44Pedal Hi-Hat · A♭2
45Low Tom · A2
46Open Hi-Hat · B♭2
47Low-Mid Tom · B2
48Hi-Mid Tom · C3
49Crash Cymbal 1 · C♯3
50High Tom · D3
51Ride Cymbal 1 · E♭3
52Chinese Cymbal · E3
53Ride Bell · F3
54Tambourine · F♯3
55Splash Cymbal · G3
56Cowbell · A♭3
57Crash Cymbal 2 · A3
58Vibraslap · B♭3
59Ride Cymbal 2 · B3
60Hi Bongo · C4
61Low Bongo · C♯4
62Mute Hi Conga · D4
63Open Hi Conga · E♭4
64Low Conga · E4
65High Timbale · F4
66Low Timbale · F♯4
67High Agogo · G4
68Low Agogo · A♭4
69Cabasa · A4
70Maracas · B♭4
71Short Whistle · B4
72Long Whistle · C5
73Short Guiro · C♯5
74Long Guiro · D5
75Claves · E♭5
76Hi Wood Block · E5
77Low Wood Block · F5
78Mute Cuica · F♯5
79Open Cuica · G5
80Mute Triangle · A♭5
81Open Triangle · A5

GM2 (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 bytes
9nNote on3 bytes
AnPoly pressure3 bytes
BnControl change3 bytes
CnProgram change2 bytes
DnChannel pressure2 bytes
EnPitch bend3 bytes
F0–F7System common1–3+ bytes
F8–FFSystem real-time1 byte

Corrections and questions are welcome. MIDI is a trademark of the MIDI Manufacturers Association; the official specifications are free to download from the MIDI Association.