MIDI Reference
Table of Contents
MIDI Reference
This is not a MIDI tutorial. Rather, it is intended as a quick overview and a reference guide. Unless otherwise stated, all numbers appear in hexadecimal, either with or without the leading “0x”. (You can find descriptions of the MIDI file format in a number of places, such as here.)
See also MIDI Message Table 1 from the MIDI Manufacturers Association.
All MIDI messages consist of a status byte followed by zero or more data bytes. Status bytes have their high bit set, and data bytes have a high bit of zero. Realtime status bytes may be inserted in the data stream at any point, including the middle of a stream of data bytes.
Two methods are used to compress data. First, running status bytes allow two or more consecutive messages with the same status byte to be combined into one; the status byte only need be sent the first time. Second, note on message with a velocity of zero are to be interpreted as note off messages.
Channel Messages
In the following table, an “x” specifies any MIDI channel (0 - 15). Thus “status byte 8x” means any value from 80 to 8F. (Thanks to Mike Morris for pointing out that I had the hex values for program change and controller backwards.)
Status | Data | Comments |
---|---|---|
8x | note, velocity | Note off |
9x | note, velocity | Note on (velocity 0 = note off) |
Ax | note, value | Polyphonic pressure |
Bx | controller, value | Controller change |
Cx | program | Program change |
Dx | value | Channel pressure |
Ex | value (two bytes: LSB then MSB. I think many devices will accept only one byte which will be interpreted as the MSB.) | Pitch bend |
Controller Numbers
The following table shows some standardized controller numbers. Controller numbers 0 - 31 are continuous, MSB (most significant byte), numbers 32 - 63 are continuous, LSB (least significant byte), and 64 - 97 are switches. (Thanks to Jeff Mann for pointing out that I had MSB and LSB reversed.)
Name | Hex | Dec | Comments |
---|---|---|---|
Continuous Values | |||
Controller numbers 00 - 1f [0 - 31 decimal] are continuous, MSB (most significant byte) | |||
Bank Select | 00 | 0 | |
Mod Wheel | 01 | 1 | |
Breath Controller | 02 | 2 | |
Foot Controller | 04 | 4 | |
Portamento Time | 05 | 5 | |
Data Entry MSB | 06 | 6 | |
Volume | 07 | 7 | |
Balance | 08 | 8 | |
Pan | 0A | 10 | |
Expression Controller | 0B | 11 | |
General Purpose 1 | 10 | 16 | |
General Purpose 2 | 11 | 17 | |
General Purpose 3 | 12 | 18 | |
General Purpose 4 | 13 | 19 | |
20 - 3f [32 - 63 decimal] are LSB (least significant byte) for 00 - 1f [0 - 31 decimal] | |||
Momentary Switches | |||
Sustain | 40 | 64 | |
Portamento | 41 | 65 | |
Sustenuto | 42 | 66 | |
Soft Pedal | 43 | 67 | |
Hold 2 | 45 | 69 | |
General Purpose 5 | 50 | 80 | |
Temp Change (General Purpose 6) | 51 | 81 | |
General Purpose 6 | 51 | 81 | |
General Purpose 7 | 52 | 82 | |
General Purpose 8 | 53 | 83 | |
Ext Effects Depth | 5B | 91 | |
Tremelo Depth | 5C | 92 | |
Chorus Depth | 5D | 93 | |
Detune Depth (Celeste Depth) | 5E | 94 | |
Phaser Depth | 5F | 95 | |
Data Increment (Data Entry +1) | 60 | 96 | |
Data Decrement (Data Entry -1) | 61 | 97 | |
Non-Registered Param LSB | 62 | 98 | |
Non-Registered Param MSB | 63 | 99 | |
Registered Param LSB | 64 | 100 | |
Registered Param MSB | 65 | 101 | |
Channel mode message values | |||
Reset All Controllers | 79 | 121 | Val ?? |
Local Control | 7A | 122 | Val 0 = off, 7F (127) = on |
All Notes Off | 7B | 123 | Val must be 0 |
Omni Mode Off | 7C | 124 | Val must be 0 |
Omni Mode On | 7D | 125 | Val must be 0 |
Mono Mode On | 7E | 126 | Val = # of channels, or 0 if # channels equals # voices in receiver |
Poly Mode On | 7F | 127 | Val must be 0 |
System Messages
System messages are those not associated with any particular MIDI channel. They are intended for the whole MIDI system.
Note that any non-realtime status byte ends a System Exclusive message; F7 (EOX) is not required at the end of a SysEx message. Realtime status bytes may appear any time in the MIDI data stream, including in the middle of a SysEx message.
Status | Name | Data |
---|---|---|
F0 | System Exclusive | data, then EOX or any status byte |
F1 | Time Code | one byte |
F2 | Song Position Pointer | two bytes: lsb msb |
F3 | Song Select | one byte: song number 0 - 127 |
F4 | (undefined) | |
F5 | (undefined) | |
F6 | Tune Request | no data |
F7 | EOX (End of System Exclusive) |
MIDI Manufacturer Codes
These codes are used in System Exclusive messages to identify particular MIDI device manufacturers. The following tables came from Hunton Instrument’s Guide to MIDI Protocol. Thanks to Manfred Hanke for finding them for me.
(* indicates that the manufacturer has ceased trading, but products using their ID exist.)
USA
Hex | Decimal | Manufacturer |
---|---|---|
01 | 1 | Sequential Circuits* |
02 | 2 | IDP |
03 | 3 | Voyetra/Octave Plateau |
04 | 4 | Moog Music |
05 | 5 | Passport Designs |
06 | 6 | Lexicon |
07 | 7 | Kurzweil |
08 | 8 | Fender |
09 | 9 | Gulbransen |
0A | 10 | AKG Acoustics |
0B | 11 | Voyce Music |
0C | 12 | Waveframe * |
0D | 13 | ADA |
0E | 14 | Garfield Electronics * |
0F | 15 | Ensoniq |
10 | 16 | Oberheim |
11 | 17 | Apple Computer |
12 | 18 | Grey Matter |
13 | 19 | Digidesign |
14 | 20 | Palm Tree Instruments |
15 | 21 | J L Cooper |
16 | 22 | Lowrey |
17 | 23 | Adams-Smith |
18 | 24 | E-mu Systems |
19 | 25 | Harmony Systems |
1A | 26 | ART |
1B | 27 | Baldwin |
1C | 28 | Eventide |
1D | 29 | Inventronics |
1E | 30 | Key Concepts |
1F | 31 | Clarity * |
Hex Extended | Manufacturer |
---|---|
00, 00, 01 | Warner New Media |
00, 00, 07 | Digital Music Corporation |
00, 00, 08 | IOTA Systems |
00, 00, 09 | New England Digital * |
00, 00, 0A | Artisyn |
00, 00, 0B | IVL Technologies |
00, 00, 0C | Southern Music Systems |
00, 00, 0D | Lake Butler Sound Company |
00, 00, 0E | Alesis |
00, 00, 10 | DOD Electronics |
00, 00, 11 | Studer-Editech |
00, 00, 14 | Perfect Fretworks |
00, 00, 15 | KAT |
00, 00, 16 | Opcode |
00, 00, 17 | Rane Corporation |
00, 00, 18 | Spatial Sound/Anadi Inc |
00, 00, 19 | KMX |
00, 00, 1A | Allen & Heath Brenell |
00, 00, 1B | Peavey Electronics |
00, 00, 1C | 360 Systems |
00, 00, 1D | Spectrum Design & Development |
00, 00, 1E | Marquis Musi |
00, 00, 1F | Zeta Systems |
00, 00, 20 | Axxes |
00, 00, 21 | Orban |
00, 00, 24 | KTI |
00, 00, 25 | Breakaway Technologies |
00, 00, 26 | CAE |
00, 00, 29 | Rocktron Corp. |
00, 00, 2A | PianoDisc |
00, 00, 2B | Cannon Research Corporation |
00, 00, 2D | Rogers Instrument Corp. |
00, 00, 2E | Blue Sky Logic |
00, 00, 2F | Encore Electronics |
00, 00, 30 | Uptown |
00, 00, 31 | Voce |
00, 00, 32 | CTI Audio |
00, 00, 33 | S&S Research |
00, 00, 34 | Broderbund Software |
00, 00, 35 | Allen Organ Co. |
00, 00, 37 | Music Quest |
00, 00, 38 | Aphex |
00, 00, 39 | Gallien Krueger |
00, 00, 3A | IBM |
00, 00, 3C | Hotz Instruments Technologies |
00, 00, 3D | ETA Lighting |
00, 00, 3E | NSI Corporation |
00, 00, 3F | Ad Lib |
00, 00, 40 | Richmond Sound Design |
00, 00, 41 | Microsoft |
00, 00, 42 | The Software Toolworks |
00, 00, 43 | RJMG/Niche |
00, 00, 44 | Intone |
00, 00, 47 | GT Electronics/Groove Tubes |
00, 00, 48 | InterMIDI |
00, 00, 55 | Lone Wolf |
00, 00, 64 | Musonix |
Europe
Hex | Decimal | Manufacturer |
---|---|---|
20 | 32 | Passac |
21 | 33 | SIEL |
22 | 34 | Synthaxe * |
23 | 35 | Stepp * |
24 | 36 | Hohner |
25 | 37 | Twister * |
26 | 38 | Solton |
27 | 39 | Jellinghaus * |
28 | 40 | Southworth |
29 | 41 | PPG * |
2A | 42 | JEN |
2B | 43 | Solid State Logic |
2C | 44 | Audio Veritrieb |
2D | 45 | Hinton Instruments |
2E | 46 | Soundtracs |
2F | 47 | Elka |
30 | 48 | Dynacord |
33 | 51 | Clavia Digital Instruments |
34 | 52 | Audio Architecture * |
39 | 57 | Soundcraft Electronics |
3B | 59 | Wersi |
3C | 60 | Avab Electronik |
3D | 61 | Digigram |
3E | 62 | Waldorf Electronics |
3F | 63 | Quasimidi |
Hex Extended | Manufacturer |
---|---|
00, 20, 00 | Dream |
00, 20, 01 | Strand Lighting |
00, 20, 02 | AMEK Systems & Controls |
00, 20, 04 | Dr.Bohm/Musician International |
00, 20, 06 | Trident |
00, 20, 07 | Real World Design |
00, 20, 09 | Yes Technology |
00, 20, 0A | Audiomatica |
00, 20, 0B | Bontempi/Farfisa |
00, 20, 0C | F.B.T. Electronica |
00, 20, 0E | Larking Audio |
00, 20, 0F | Zero 88 Lighting |
00, 20, 10 | Micon Audio Electronics |
00, 20, 11 | Forefront Technology |
00, 20, 13 | Kenton Electronics |
00, 20, 15 | ADB |
00, 20, 16 | Jim Marshall Products |
00, 20, 17 | DDA |
00, 20, 1F | TC Electronic |
Japan
Hex | Decimal | Manufacturer |
---|---|---|
40 | 64 | Kawai |
41 | 65 | Roland |
42 | 66 | Korg |
43 | 67 | Yamaha |
44 | 68 | Casio |
45 | 69 | Moridaira |
46 | 70 | Kamiya |
47 | 71 | Akai |
48 | 72 | Japan Victor |
49 | 73 | Meisosha |
4A | 74 | Hoshino Gakki |
4B | 75 | Fujitsu Electric |
4C | 76 | Sony |
4D | 77 | Nishin Onpa |
4E | 78 | TEAC |
50 | 80 | Matsushita Electric |
51 | 81 | Fostex |
52 | 82 | Zoom |
53 | 83 | Midori Electronics |
54 | 84 | Matsushita Communication Industrial |
55 | 85 | Suzuki Musical Instrument Mfg. |
Universal
Hex | Decimal | Use |
---|---|---|
7D | 125 | Non-Commercial |
7E | 126 | Non Real Time |
7F | 127 | Real Time |
Realtime Messages
Realtime messages are not associated with any one MIDI channel. They can appear in the MIDI data stream at any time.
These messages consist of a single status byte; they have no data bytes.
Status | Comment |
---|---|
F8 | Clock |
F9 | (undefined) |
FA | Start |
FB | Continue |
FC | Stop |
FD | (undefined) |
FE | Active Sensing |
FF | System Reset |
General MIDI
General MIDI is nothing more than an agreement to a standard set of 128 patch names and, on MIDI channel 10, a set of standard percussion key names. Manufacturers get to interpret these names any way they see fit.
Instrument Patch Map
The sounds are grouped into “families” of eight patch numbers each. Patch numbers are in decimal, and start at 1. Note that MIDI patch numbers start at 0; you will have to subtract 1 when sending a patch change command.
Patch | Family Name | Patch | Family Name |
---|---|---|---|
1 - 8 | Piano | 65 - 72 | Reed |
9 - 16 | Chromatic Percussion | 73 - 80 | Pipe |
17 - 24 | Organ | 81 - 88 | Synth Lead |
25 - 32 | Guitar | 89- 96 | Synth Pad |
33 - 40 | Bass | 97 - 104 | Synth Effects |
41 - 48 | Strings | 105 - 112 | Ethnic |
49- 56 | Ensemble | 113 - 120 | Percussive |
57 - 64 | Brass | 121 - 128 | Sound Effects |
Here are the patch names. Again, these numbers are in decimal, and the list starts with 1 instead of 0. You will have to subrtact 1 when sending patch change commands.
Patch | Name | Patch | Name |
---|---|---|---|
1 | Acoustic Grand Piano | 65 | Soprano Sax |
2 | Bright Acoustic Piano | 66 | Alto Sax |
3 | Electric Grand Piano | 67 | Tenor Sax |
4 | Honky-tonk Piano | 68 | Baritone Sax |
5 | Electric Piano 1 | 69 | Oboe |
6 | Electric Piano 2 | 70 | English Horn |
7 | Harpsichord | 71 | Bassoon |
8 | Clavi | 72 | Clarinet |
9 | Celesta | 73 | Piccolo |
10 | Glockenspiel | 74 | Flute |
11 | Music Box | 75 | Recorder |
12 | Vibraphone | 76 | Pan Flute |
13 | Marimba | 77 | Blown Bottle |
14 | Xylophone | 78 | Shakuhachi |
15 | Tubular Bells | 79 | Whistle |
16 | Dulcimer | 80 | Ocarina |
17 | Drawbar Organ | 81 | Lead 1 (square) |
18 | Percussive Organ | 82 | Lead 2 (sawtooth) |
19 | Rock Organ | 83 | Lead 3 (calliope) |
20 | Church Organ | 84 | Lead 4 (chiff) |
21 | Reed Organ | 85 | Lead 5 (charang) |
22 | Accordion | 86 | Lead 6 (voice) |
23 | Harmonica | 87 | Lead 7 (fifths) |
24 | Tango Accordion | 88 | Lead 8 (bass + lead) |
25 | Acoustic Guitar (nylon) | 89 | Pad 1 (new age) |
26 | Acoustic Guitar (steel) | 90 | Pad 2 (warm) |
27 | Electric Guitar (jazz) | 91 | Pad 3 (polysynth) |
28 | Electric Guitar (clean) | 92 | Pad 4 (choir) |
29 | Electric Guitar (muted) | 93 | Pad 5 (bowed) |
30 | Overdriven Guitar | 94 | Pad 6 (metallic) |
31 | Distortion Guitar | 95 | Pad 7 (halo) |
32 | Guitar harmonics | 96 | Pad 8 (sweep) |
33 | Acoustic Bass | 97 | FX 1 (rain) |
34 | Electric Bass (finger) | 98 | FX 2 (soundtrack) |
35 | Electric Bass (pick) | 99 | FX 3 (crystal) |
36 | Fretless Bass | 100 | FX 4 (atmosphere) |
37 | Slap Bass 1 | 101 | FX 5 (brightness) |
38 | Slap Bass 2 | 102 | FX 6 (goblins) |
39 | Synth Bass 1 | 103 | FX 7 (echoes) |
40 | Synth Bass 2 | 104 | FX 8 (sci-fi) |
41 | Violin | 105 | Sitar |
42 | Viola | 106 | Banjo |
43 | Cello | 107 | Shamisen |
44 | Contrabass | 108 | Koto |
45 | Tremolo Strings | 109 | Kalimba |
46 | Pizzicato Strings | 110 | Bag pipe |
47 | Orchestral Harp | 111 | Fiddle |
48 | Timpani | 112 | Shanai |
49 | String Ensemble 1 | 113 | Tinkle Bell |
50 | String Ensemble 2 | 114 | Agogo |
51 | SynthStrings 1 | 115 | Steel Drums |
52 | SynthStrings 2 | 116 | Woodblock |
53 | Choir Aahs | 117 | Taiko Drum |
54 | Voice Oohs | 118 | Melodic Tom |
55 | Synth Voice | 119 | Synth Drum |
56 | Orchestra Hit | 120 | Reverse Cymbal |
57 | Trumpet | 121 | Guitar Fret Noise |
58 | Trombone | 122 | Breath Noise |
59 | Tuba | 123 | Seashore |
60 | Muted Trumpet | 124 | Bird Tweet |
61 | French Horn | 125 | Telephone Ring |
62 | Brass Section | 126 | Helicopter |
63 | SynthBrass 1 | 127 | Applause |
64 | SynthBrass 2 | 128 | Gunshot |
Percussion Key Map
MIDI channel 10 is reserved for percussion. Each key maps to a specific percussive sound. Key numbers are in decimal. I think they are offset by one; you will have to subtract one when sending a MIDI note message.
Key | Note | Sound | Key | Note | Sound |
---|---|---|---|---|---|
35 | C | Acoustic Bass Drum | 59 | C | Ride Cymbal 2 |
36 | C# | Bass Drum 1 | 60 | C# | Hi Bongo |
37 | D | Side Stick | 61 | D | Low Bongo |
38 | D# | Acoustic Snare | 62 | D# | Mute Hi Conga |
39 | E | Hand Clap | 63 | E | Open Hi Conga |
40 | F | Electric Snare | 64 | F | Low Conga |
41 | F# | Low Floor Tom | 65 | F# | High Timbale |
42 | G | Closed Hi Hat | 66 | G | Low Timbale |
43 | G# | High Floor Tom | 67 | G# | High Agogo |
44 | A | Pedal Hi-Hat | 68 | A | Low Agogo |
45 | A# | Low Tom | 69 | A# | Cabasa |
46 | B | Open Hi-Hat | 70 | B | Maracas |
47 | C | Low-Mid Tom | 71 | C | Short Whistle |
48 | C# | Hi Mid Tom | 72 | C# | Long Whistle |
49 | D | Crash Cymbal 1 | 73 | D | Short Guiro |
50 | D# | High Tom | 74 | D# | Long Guiro |
51 | E | Ride Cymbal 1 | 75 | E | Claves |
52 | F | Chinese Cymbal | 76 | F | Hi Wood Block |
53 | F# | Ride Bell | 77 | F# | Low Wood Block |
54 | G | Tambourine | 78 | G | Mute Cuica |
55 | G# | Splash Cymbal | 79 | G# | Open Cuica |
56 | A | Cowbell | 80 | A | Mute Triangle |
57 | A# | Crash Cymbal 2 | 81 | A# | Open Triangle |
58 | B | Vibraslap |