MIDI Bits & Bytes

Table 1: MIDI 1.0 Specification Message Summary

Updated 1995 By the MIDI Manufacturers Association

WARNING: The details of this implementation could dramatically affect compatibility with other products. It is recommended that you consult the official MMA detailed specification for any additional information.

Status

Data Byte(s)

Description

D7----D0

D7----D0

Channel Voice Messages

1000cccc

0nnnnnnn
0vvvvvvv

Note Off event. This message is sent when a note is released (ended).
(nnnnnnn) is the note number.
(vvvvvvv) is the velocity.

1001cccc

0nnnnnnn
0vvvvvvv

Note On event. This message is sent when a note is depressed (start).
(nnnnnnn) is the note number.
(vvvvvvv) is the velocity.

1010cccc

0nnnnnnn
0vvvvvvv

Polyphonic Key Pressure (After-touch). This message is sent when the pressure (velocity) of a previously triggered note changes.
nnnnnnn) is the note number.
(vvvvvvv) is the velocity.

1011cccc

0ccccccc
0vvvvvvv

Control Change. This message is sent when a controller value changes. Controllers include devices such as pedals and levers. Certain controller numbers are reserved for specific purposes. See Channel Mode Messages.
(ccccccc) is the controller number.
(vvvvvvv) is the new value.

1100cccc

0ppppppp

Program Change. This message sent when the patch number changes.
(ppppppp) is the new program number

1001nnnn

0ccccccc

Channel Pressure (After-touch).This message is sent when the channel pressure changes. Some velocity-sensing keyboards do not support polyphonic after-touch. Use this message to send the single greatest velocity (of all the current depressed keys).
(ccccccc) is the channel number.

1110nnnn

0lllllll
0mmmmmmm

Pitch Wheel Change. This message is sent to indicate a change in the pitch wheel. The pitch wheel is measured by a fourteen bit value. Center (no pitch change) is 2000H. Sensitivity is a function of the transmitter.
(llllll) are the least significant 7 bits.
(mmmmmm) are the most significant 7 bits.

Channel Mode Messages

1011nnnn

0ccccccc
0vvvvvvv

Channel Mode Messages. This the same code as the Control Change (above), but implements Mode control by using reserved controller numbers. The numbers are:

Local Control.
When Local Control is Off, all devices on a given channel will respond only to data received over MIDI. Played data, etc. will be ignored. Local Control On restores the functions of the normal controllers.
c = 122, v = 0: Local Control Off
c = 122, v = 127: Local Control On

All Notes Off.
When an All Notes Off is received, all oscillators will turn off.
c = 123, v = 0: All Notes Off

Mode Commands.
c = 124, v = 0: Omni Mode Off
c = 125, v = 0: Omni Mode On
c = 126, v = M: Mono Mode On (Poly Off) where M is the number of channels
(Omni Off) or 0 (Omni On)
c = 127, v = 0: Poly Mode On (Mono Off)
(Note: These four messages also cause All Notes Off)

System Common Messages

11110000

0iiiiiii
0ddddddd
...
...
0ddddddd
11110111

System Exclusive. This message makes up for all that MIDI doesn't support. (iiiiiii) is a seven bit Manufacturer's I.D. code. If the synthesizer recognizes the I.D. code as its own, it will listen to the rest of the message (ddddddd). Otherwise, the message will be ignored. System Exclusive is used to send bulk dumps such as patch parameters and other non-spec data. (Note: Real-Time messages ONLY may be interleaved with a System Exclusive.)

11110001

  Undefined.

11110010

0lllllll
0mmmmmmm

Song Position Pointer. This is an internal 14 bit register that holds the number of MIDI beats (1 beat= six MIDI clocks) since the start of the song. l is the LSB, m the MSB.

11110011

0sssssss

Song Select.
The Song Select specifies which sequence or song is to be played.

11110100

  Undefined.

11110101

  Undefined.

11110110

  Tune Request. Upon receiving a Tune Request, all analog synthesizers should tune their oscillators.

11110111

  End of Exclusive. Used to terminate a System Exclusive dump (see above).

System Real-Time Messages

11111000

  Timing Clock. Sent 24 times per quarter note when synchronization is required (see text).

11111001

  Undefined.

11111010

  Start. Start the current sequence playing. (This message will be followed with Timing Clocks).

11111011

  Continue. Continue at the point the sequence was Stopped.

11111100

  Stop. Stop the current sequence.

11111101

  Undefined.

11111110

  Active Sensing. Use of this message is optional. When initially sent, the receiver will expect to receive another Active Sensing message each 300ms (max), or it will be assume that the connection has been terminated. At termination, the receiver will turn off all voices and return to normal (non-active sensing) operation.

11111111

  Reset. Reset all receivers in the system to power-up status. This should be used sparingly, preferably under manual control. In particular, it should not be sent on power-up.

The MIDI Manufacturers Association approves of electronic distribution of this document via this and other sites, as long as it is not modified in any way.

top


Table 2: MIDI Status & Data Bytes

(adapted from "MIDI by the Numbers" by D. Valenti, Electronic Musician 2/88)
Updated 1995 By the MIDI Manufacturers Association.

WARNING: The details of this implementation could dramatically affect compatibility with other products. It is recommended that you consult the official MMA detailed specification for any additional information.

STATUS BYTE DATA BYTES
1st Byte Value Function 2nd Byte 3rd Byte
Binary Hex Dec

10000000
10000001
10000010
10000011
10000100
10000101
10000110
10000111
10001000
10001001
10001010
10001011
10001100
10001101
10001110
10001111

80
81
82
83
84
85
86
87
88
89
8A
8B
8C
8D
8E
8F

128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
Chan 1 Note off
Chan 2 "
Chan 3 "
Chan 4 "
Chan 5 "
Chan 6 "
Chan 7 "
Chan 8 "
Chan 9 "
Chan 10 "
Chan 11 "
Chan 12 "
Chan 13 "
Chan 14 "
Chan 15 "
Chan 16 "
Note Number
(0-127)
see Table 4
"
"
"
"
"
"
"
"
"
"
"
"
"
Note Velocity
(0-127)
"
"
"
"
"
"
"
"
"
"
"
"
"
"

10010000
10010001
10010010
10010011
10010100
10010101
10010110
10010111
10011000
10011001
10011010
10011011
10011100
10011101
10011110
10011111

90
91
92
93
94
95
96
97
98
99
9A
9B
9C
9D
9E
9F

144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
Chan 1 Note on
Chan 2 "
Chan 3 "
Chan 4 "
Chan 5 "
Chan 6 "
Chan 7 "
Chan 8 "
Chan 9 "
Chan 10 "
Chan 11 "
Chan 12 "
Chan 13 "
Chan 14 "
Chan 15 "
Chan 16 "
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"

10100000
10100001
10100010
10100011
10100100
10100101
10100110
10100111
10101000
10101001
10101010
10101011
10101100
10101101
10101110
10101111

A0
A1
A2
A3
A4
A5
A6
A7
A8
A9
AA
AB
AC
AD
AE
AF

160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
Chan 1 Polyphonic aftertouch
Chan 2 "
Chan 3 "
Chan 4 "
Chan 5 "
Chan 6 "
Chan 7 "
Chan 8 "
Chan 9 "
Chan 10 "
Chan 11 "
Chan 12 "
Chan 13 "
Chan 14 "
Chan 15 "
Chan 16 "
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
Aftertouch
amount
(0-127)
"
"
"
"
"
"
"
"
"
"
"
"
"

10110000
10110001
10110010
10110011
10110100
10110101
10110110
10110111
10111000
10111001
10111010
10111011
10111100
10111101
10111110
10111111

B0
B1
B2
B3
B4
B5
B6
B7
B8
B9
BA
BB
BC
BD
BE
BF

176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
Chan 1 Control/Mode change
Chan 2 "
Chan 3 "
Chan 4 "
Chan 5 "
Chan 6 "
Chan 7 "
Chan 8 "
Chan 9 "
Chan 10 "
Chan 11 "
Chan 12 "
Chan 13 "
Chan 14 "
Chan 15 "
Chan 16 "
See
Table 3
"
"
"
"
"
"
"
"
"
"
"
"
"
"
See
Table 3
"
"
"
"
"
"
"
"
"
"
"
"
"
"

11000000
11000001
11000010
11000011
11000100
11000101
11000110
11000111
11001000
11001001
11001010
11001011
11001100
11001101
11001110
11001111

C0
C1
C2
C3
C4
C5
C6
C7
C8
C9
CA
CB
CC
CD
CE
CF

192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
Chan 1 Program change
Chan 2 "
Chan 3 "
Chan 4 "
Chan 5 "
Chan 6 "
Chan 7 "
Chan 8 "
Chan 9 "
Chan 10 "
Chan 11 "
Chan 12 "
Chan 13 "
Chan 14 "
Chan 15 "
Chan 16 "
Program #
(0-127)
"
"
"
"
"
"
"
"
"
"
"
"
"
"
NONE
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"

11010000
11010001
11010010
11010011
11010100
11010101
11010110
11010111
11011000
11011001
11011010
11011011
11011100
11011101
11011110
11011111

D0
D1
D2
D3
D4
D5
D6
D7
D8
D9
DA
DB
DC
DD
DE
DF

208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
Chan 1 Channel aftertouch
Chan 2 "
Chan 3 "
Chan 4 "
Chan 5 "
Chan 6 "
Chan 7 "
Chan 8 "
Chan 9 "
Chan 10 "
Chan 11 "
Chan 12 "
Chan 13 "
Chan 14 "
Chan 15 "
Chan 16 "
Aftertouch
amount
(0-127)
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"

11100000
11100001
11100010
11100011
11100100
11100101
11100110
11100111
11101000
11101001
11101010
11101011
11101100
11101101
11101110
11101111

E0
E1
E2
E3
E4
E5
E6
E7
E8
E9
EA
EB
EC
ED
EE
EF

224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
Chan 1 Pitch wheel control
Chan 2 "
Chan 3 "
Chan 4 "
Chan 5 "
Chan 6 "
Chan 7 "
Chan 8 "
Chan 9 "
Chan 10 "
Chan 11 "
Chan 12 "
Chan 13 "
Chan 14 "
Chan 15 "
Chan 16 "
Pitch
wheel
LSB
(0-127)
"
"
"
"
"
"
"
"
"
"
"
"
Pitch
wheel
MSB
(0-127)
"
"
"
"
"
"
"
"
"
"
"
"

11110000
11110001
11110010
11110011
11110100
11110101
11110110
11110111
11111000
11111001
11111010
11111011
11111100
11111101
11111110
11111111

F0
F1
F2
F3
F4
F5
F6
F7
F8
F9
FA
FB
FC
FD
FE
FF

240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
System Exclusive
MIDI Time Code Qtr. Frame
Song Position Pointer
Song Select (Song #)
Undefined
Undefined
Tune request
End of SysEx (EOX)
Timing clock
Undefined
Start
Continue
Stop
Undefined
Active Sensing
System Reset
**
-see spec-
LSB
(0-127)
?
?
NONE
"
"
"
"
"
"
"
"
"
"
**
-see spec-
MSB
NONE
?
?
NONE
"
"
"
"
"
"
"
"
"
"

** Note: System Exclusive (data dump) 2nd byte= Vendor ID followed by more data bytes and ending with EOX.

The MIDI Manufacturers Association approves of electronic distribution of this document via this and other sites, as long as it is not modified in any way.

top


Table 3: Status Bytes 176-191; Control and Mode Changes (per channel)

(adapted from "MIDI by the Numbers" by D. Valenti-Electronic Musician 2/88)
Updated 1995 By the MIDI Manufacturers Association

WARNING: The details of this implementation could dramatically affect compatibility with other products. It is recommended that you consult the official MMA detailed specification for any additional information.

2nd Byte Value Function 3rd Byte
Binary Hex Dec Value Use

00000000

00

0 Bank Select 0-127 MSB

00000001

01

1 Modulation wheel 0-127 MSB

00000010

02

2 Breath control 0-127 MSB

00000011

03

3 Undefined 0-127 MSB

00000100

04

4 Foot controller 0-127 MSB

00000101

05

5 Portamento time 0-127 MSB

00000110

06

6 Data Entry 0-127 MSB

00000111

07

7 Channel Volume (formerly Main Volume) 0-127 MSB

00001000

08

8 Balance 0-127 MSB

00001001

09

9 Undefined 0-127 MSB

00001010

0A

10 Pan 0-127 MSB

00001011

0B

11 Expression Controller 0-127 MSB

00001100

0C

12 Effect control 1 0-127 MSB

00001101

0D

13 Effect control 2 0-127 MSB

00001110

0E

14 Undefined 0-127 MSB

00001111

0F

15 Undefined 0-127 MSB

00010000

10

16 General Purpose Controller #1 0-127 MSB

00010001

11

17 General Purpose Controller #2 0-127 MSB

00010010

12

18 General Purpose Controller #3 0-127 MSB

00010011

13

19 General Purpose Controller #4 0-127 MSB

00010100

14

20 Undefined 0-127 MSB

00010101

15

21 Undefined 0-127 MSB

00010110

16

22 Undefined 0-127 MSB

00010111

17

23 Undefined 0-127 MSB

00011000

18

24 Undefined 0-127 MSB

00011001

19

25 Undefined 0-127 MSB

00011010

1A

26 Undefined 0-127 MSB

00011011

1B

27 Undefined 0-127 MSB

00011100

1C

28 Undefined 0-127 MSB

00011101

1D

29 Undefined 0-127 MSB

00011110

1E

30 Undefined 0-127 MSB

00011111

1F

31 Undefined 0-127 MSB

00100000

20

32 Bank Select 0-127 LSB

00100001

21

33 Modulation wheel 0-127 LSB

00100010

22

34 Breath control 0-127 LSB

00100011

23

35 Undefined 0-127 LSB

00100100

24

36 Foot controller 0-127 LSB

00100101

25

37 Portamento time 0-127 LSB

00100110

26

38 Data entry 0-127 LSB

00100111

27

39 Channel Volume (formerly Main Volume) 0-127 LSB

00101000

28

40 Balance 0-127 LSB

00101001

29

41 Undefined 0-127 LSB

00101010

2A

42 Pan 0-127 LSB

00101011

2B

43 Expression Controller 0-127 LSB

00101100

2C

44 Effect control 1 0-127 LSB

00101101

2D

45 Effect control 2 0-127 LSB

00101110

2E

46 Undefined 0-127 LSB

00101111

2F

47 Undefined 0-127 LSB

00110000

30

48 General Purpose Controller #1 0-127 LSB

00110001

31

49 General Purpose Controller #2 0-127 LSB

00110010

32

50 General Purpose Controller #3 0-127 LSB

00110011

33

51 General Purpose Controller #4 0-127 LSB

00110100

34

52 Undefined 0-127 LSB

00110101

35

53 Undefined 0-127 LSB

00110110

36

54 Undefined 0-127 LSB

00110111

37

55 Undefined 0-127 LSB

00111000

38

56 Undefined 0-127 LSB

00111001

39

57 Undefined 0-127 LSB

00111010

3A

58 Undefined 0-127 LSB

00111011

3B

59 Undefined 0-127 LSB

00111100

3C

60 Undefined 0-127 LSB

00111101

3D

61 Undefined 0-127 LSB

00111110

3E

62 Undefined 0-127 LSB

00111111

3F

63 Undefined 0-127 LSB

01000000

40

64 Damper pedal on/off (Sustain) <63=off >64=on

01000001

41

65 Portamento on/off <63=off >64=on

01000010

42

66 Sustenuto on/off <63=off >64=on

01000011

43

67 Soft pedal on/off <63=off >64=on

01000100

44

68 Legato Footswitch <63=off >64=on

01000101

45

69 Hold 2 <63=off >64=on

01000110

46

70 Sound Controller 1 (Sound Variation) 0-127 LSB

01000111

47

71 Sound Controller 2 (Timbre) 0-127 LSB

01001000

48

72 Sound Controller 3 (Release Time) 0-127 LSB

01001001

49

73 Sound Controller 4 (Attack Time) 0-127 LSB

01001010

4A

74 Sound Controller 5 (Brightness) 0-127 LSB

01001011

4B

75 Sound Controller 6 0-127 LSB

01001100

4C

76 Sound Controller 7 0-127 LSB

01001101

4D

77 Sound Controller 8 0-127 LSB

01001110

4E

78 Sound Controller 9 0-127 LSB

01001111

4F

79 Sound Controller 10 0-127 LSB

01010000

50

80 General Purpose Controller #5 0-127 LSB

01010001

51

81 General Purpose Controller #6 0-127 LSB

01010010

52

82 General Purpose Controller #7 0-127 LSB

01010011

53

83 General Purpose Controller #8 0-127 LSB

01010100

54

84 Portamento Control 0-127 Source Note

01010101

55

85 Undefined 0-127 LSB

01010110

56

86 Undefined 0-127 LSB

01010111

57

87 Undefined 0-127 LSB

01011000

58

88 Undefined 0-127 LSB

01011001

59

89 Undefined 0-127 LSB

01011010

5A

90 Undefined 0-127 LSB

01011011

5B

91 Effects 1 Depth 0-127 LSB

01011100

5C

92 Effects 2 Depth 0-127 LSB

01011101

5D

93 Effects 3 Depth 0-127 LSB

01011110

5E

94 Effects 4 Depth 0-127 LSB

01011111

5F

95 Effects 5 Depth 0-127 LSB

01100000

60

96 Data entry +1 N/A

01100001

61

97 Data entry -1 N/A

01100010

62

98 Non-Registered Parameter Number LSB 0-127 LSB

01100011

63

99 Non-Registered Parameter Number MSB 0-127 MSB

01100100

64

100 Registered Parameter Number LSB 0-127 LSB

01100101

65

101 Registered Parameter Number MSB 0-127 MSB

01100110

66

102 Undefined ?

01100111

67

103 Undefined ?

01101000

68

104 Undefined ?

01101001

69

105 Undefined ?

01101010

6A

106 Undefined ?

01101011

6B

107 Undefined ?

01101100

6C

108 Undefined ?

01101101

6D

109 Undefined ?

01101110

6E

110 Undefined ?

01101111

6F

111 Undefined ?

01110000

70

112 Undefined ?

01110001

71

113 Undefined ?

01110010

72

114 Undefined ?

01110011

73

115 Undefined ?

01110100

74

116 Undefined ?

01110101

75

117 Undefined ?

01110110

76

118 Undefined ?

01110111

77

119 Undefined ?

01111000

78

120 All Sound Off 0

01111001

79

121 Reset All Controllers 0

01111010

7A

122 Local control on/off 0=off 127=on

01111011

7B

123 All notes off 0

01111100

7C

124 Omni mode off (+ all notes off) 0

01111101

7D

125 Omni mode on (+ all notes off) 0

01111110

7E

126 Poly mode on/off (+ all notes off) **

01111111

7F

127 Poly mode on (incl mono=off +all notes off) 0

**Note: This equals the number of channels, or zero if the number of channels equals the number of voices in the receiver.

The MIDI Manufacturers Association approves of electronic distribution of this document via this and other sites, as long as it is not modified in any way.

top


Table 4: MIDI Note Numbers for Different Octaves

(adapted from "MIDI by the Numbers" by D. Valenti - Electronic Musician 2/88)
Updated 1995 By the MIDI Manufacturers Association

WARNING: The details of this implementation could dramatically affect compatibility with other products. It is recommended that you consult the official MMA detailed specification for any additional information.

Octave # Note Numbers
C C# D D# E F F# G G# A A# B
-1 0 1 2 3 4 5 6 7 8 9 10 11
0 12 13 14 15 16 17 18 19 20 21 22 23
1 24 25 26 27 28 29 30 31 32 33 34 35
2 36 37 38 39 40 41 42 43 44 45 46 47
3 48 49 50 51 52 53 54 55 56 57 58 59
4 60 61 62 63 64 65 66 67 68 69 70 71
5 72 73 74 75 76 77 78 79 80 81 82 83
6 84 85 86 87 88 89 90 91 92 93 94 95
7 96 97 98 99 100 101 102 103 104 105 106 107
8 108 109 110 111 112 113 114 115 116 117 118 119
9 120 121 122 123 124 125 126 127

**Note: The MIDI specification only defines note number 60 as "Middle C", and all other notes are relative. The absolute octave number designations shown here are based on Middle C = C4, which is an arbitrary assignment.

The MIDI Manufacturers Association approves of electronic distribution of this document via this and other sites, as long as it is not modified in any way.

top