Computer Music: Musc 216
MIDI Commands

There are EIGHT groups (families) of commands which are sent/received by a MIDI device, usually a synthesizer keyboard, sound module, computer, or other piece of hardware. In some instances, computer software will EMULATE a piece of MIDI hardware.

1. Note OFF
2. Note ON
3. Polyphonic key pressure
4. Control change
5. Program change
6. Monophonic key (channel) pressure
7. Pitch bend
8. System exclusive (usually GLOBAL commands affecting the entire device)

A MIDI command consists of a series of numbers which when received by a device through a serial cable (or virtual connection made with software) will cause the device to do something, for example: play a note, change the sound (program), turn a note off, etc.


Except for the SYSTEM EXCLUSIVE command (which can have any quantity of individual numbers from as few as 4 to as many as 1000's), all MIDI commands have either TWO or THREE numbers. For example:

144 60 127 - turn ON note #60 on MIDI channel 1 with a velocity of 127

144 60 0 - turn OFF note #60 on MIDI channel 1

192 15 - change the program (sound) on MIDI channel 1 to program #15

193 21 - change the program (sound) on MIDI channel 2 to program #21

The FIRST number in any MIDI command is called the STATUS and is always in the range 128 - 255. The number(s) following the STATUS are DATA and are always in the range 0 - 127. Some MIDI commands have only ONE DATA number and some have TWO. Here is a list of the various MIDI COMMANDS along with their respective data requirements (the commands in italics will not be used in this class):

STATUS (128 - 255) DATA 1 (0 - 127) DATA 2 (0 - 127)
Note OFF Key # Off Velocity
Note ON Key # On Velocity
Poly Key Pressure Key # Pressure value
Control Change Control # Control Value
Program Change Program # -- Not Used --
Mono Key Pressure
(Channel Pressure)
Pressure Value (0-127) -- Not Used --
Pitch Bend Range (LSB) Range (MSB)
System Manufacturer's ID Model ID


The MIDI specification allows for 16 MIDI channels and MIDI activity can take place on all 16 MIDI channels simultaneously. MIDI channels are identified by individual MIDI commands through the the RANGE of their STATUS numbers. For an example, let's look at the range of numbers in the NOTE ON status command:

STATUS DATA BYTE 1 DATA BYTE 2 COMMENT
144 60 127 Note ON channel 1
145 60 127 Note ON channel 2
146 60 127 Note ON channel 3
147 60 127 Note ON channel 4
148 60 127 Note ON channel 5
149 60 127 Note ON channel 6
150 60 127 Note ON channel 7
151 60 127 Note ON channel 8
152 60 127 Note ON channel 9
153 60 127 Note ON channel 10
154 60 127 Note ON channel 11
155 60 127 Note ON channel 12
156 60 127 Note ON channel 13
157 60 127 Note ON channel 14
158 60 127 Note ON channel 15
159 60 127 Note ON channel 16


The range of possible STATUS number is 128 - 255. Here is a list of the EIGHT MIDI command STATUS groups along with the range of numbers for the 16 MIDI channels in each group:

COMMAND
MIDI Chans 1-16

DATA BYTE 1 DATA BYTE 2 COMMENT
128-143 Key # (0-127) Off Velocity (0-127) Note OFF
144-159 Key # (0-127) On Velocity (0-127) Note ON
160-175 Key # (0-127) Pressure (0-127) Poly Key Pressure
176-191 Control # (0-127) Control Value (0-127) Control Change
192-207 Program # (0-127) -- Not Used -- Program Change
208-223 Pressure Value (0-127) -- Not Used -- Mono Key Pressure (Channel Pressure)
224-239 Range (LSB) Range (MSB) Pitch Bend
240-255 Manufacturer's ID Model ID System


An easier way to deal with the complexity of keeping track of the STATUS number in regards to which MIDI channel it represents is to use HEXADECIMAL numbers instead of DECIMAL. For example, the #192 by itself does not intuitively indicate that that is the STATUS command for changing the program (sound) on MIDI channel 1. However if this table of HEXADECIMAL values was used for the STATUS numbers, it becomes immediately intuitive and easy to memorize:

COMMAND DATA BYTE 1 DATA BYTE 2 COMMENT
$80-$8F
[128-143]
Key # (0-127) Off Velocity (0-127) Note OFF
$90-$9F
[144-159]
Key # (0-127) On Velocity (0-127) Note ON
$A0-$AF Key # (0-127) Pressure (0-127) Poly Key Pressure
$B0-$BF
[176-191]
Control # (0-127) Control Value (0-127) Control Change
$C0-$CF
[192-207]
Program # (0-127) -- Not Used -- Program Change
$D0-$DF Pressure Value (0-127) -- Not Used -- Mono Key Pressure (Channel Pressure)
$E0-$EF Range (LSB) Range (MSB) Pitch Bend
$F0-$FF Manufacturer's ID Model ID System

* NOTE: Due to the hardware limitations of our lab, items in Italics will not be
implemented in this class.

See: MIDI Resources

See: MIDI Status BYTES

See: Counting in Various BASES


Main Page