Midi Message Format

Within the MIDI Specification there are two basic types of message byte: the status byte and the data byte. The Most Significant Bit of a status byte is always 1, the Most Significant Bit of a data byte is always 0. The maximum length for a standard MIDI message is three bytes but for some types of MIDI message the length can be less.

Binary Code

StatusData 1Data 2
1 t t t n n n n0 x x x x x x x0 x x x x x x x

There are only 7 bits, in each byte, to represent the unique data that the message byte contains. It can easily be calculated that there are only 2^7, or 128, discrete values available per byte. This means that there are 8 fundamental types of status message (t) which, if a channel specific message, can be sent to any one of 16 different MIDI Channels. If the status message is not channel specific the lower nibble (4 bits) of the status represents one of 16 different message sub-classes.

There are two different classifications of MIDI messages: MIDI Data Messages and MIDI System Messages. MIDI Data Messages are channel specific, MIDI System Messages are not channel specific.

 

All values are in HEX format!

MessageStatusData 1Data 2
Note Off8nNote NumberVelocity
Note On9nNote NumberVelocity
Polyphonic AftertouchAnNote NumberPressure
Control ChangeBnController NumberData
Program ChangeCnProgram NumberUnused
Channel AftertouchDnPressureUnused
Pitch WheelEnLSBMSB

 

Key
n is the MIDI Channel Number (0-F)
LSB is the Least Significant Byte
MSB is the Least Significant Byte
There are several different types of controller messages.

 

MIDI DATA Messages - Control Messages

All values are in HEX format!

MessageStatusData 1Data 2
14 bit controllers MSBBn01 (Modulation Wheel)Data
02 (Breath Controller)Data
04 (Foot Contoller)Data
05 (Portamento Time)Data
06 (Data Entry Slider)Data
07 (Main Volume)Data
14 bit controllers LSBBn21 (Modulation Wheel)Data
22 (Breath Controller)Data
24 (Foot Contoller)Data
25 (Portamento Time)Data
26 (Data Entry Slider)Data
27 (Main Volume)Data
7 bit controllersBn40 (Sustain Pedal)00-3F (off) 40-FF (on)
41 (Portamento)00-3F (off) 40-FF (on)
42 (Sostenato pedal)00-3F (off) 40-FF (on)
43 (Soft pedal)00-3F (off) 40-FF (on)
60 (Data Increment)7F
61 (Data Decrement)7F
62 (Non-Registered Parameter Number)LSB
63 (Non-Registered Parameter Number)MSB
64 (Registered Parameter Number)LSB
65 (Registered Parameter Number)MSB
79 (Reset All Controllers)7F
Channel ModesBn7A (Local)00 (off) / 7F (on)
7B (All Notes Off)00
7C (Omni Off)00
7D (Omni On)00
7E (Mono)00-0A
7F (Poly)00

 

Key
n is the MIDI Channel Number (0-F)
LSB is the Least Significant Byte
MSB is the Least Significant Byte[/td

 

System Exclusive

MessageStatusData 1Data 2
System Exclusive StartF0Manufacturers IDData, data, data
System Exclusive EndF7
Polyphonic AftertouchAnNote NumberPressure

 

System Common

MessageStatusData 1Data 2
Song PointerF2LSBMSB
Song SelectF3Song Number
Tune RequestF6

 

MIDI Time Code

MessageStatusData 1Data 2
Quarter FrameF1Data

 

System Realtime

MessageStatusData 1Data 2
Timing ClockF8
Measure EndF9Unused
StartFA
ContinueFB
StopFC
Active SensingFE
ResetFF

 

Key
n is the MIDI Channel Number (0-F)
LSB is the Least Significant Byte
MSB is the Least Significant Byte

Discuss this article in our Music Forum.

 

 John Moxey

Songstuff Site Crew

 

About Songstuff

Logo-dark-bg-square-170Songstuff was launch in September 2000 and has grown into an all round resource for musicians, attracting interest from musicians of all experience and skill levels. The Songstuff Songwriting and Music Community has grown into an essential, dynamic networking resource, where members exchange ideas and collaborate on common projects. Great thanks and appreciation are owed to the moderation team for helping to grow the community into the active and creative place it has become.

Site Crew conduct draw on their experience and contacts to perform interviews, and write quality articles on a variety of subjects. In addition the Songstuff Community members regularly contribute articles and Songstuff has many regular contributors from across the field of music.

 

Our Crew

Songstuff Site Crew are highly experienced and cover a broad range of music industry roles including label owners, music educators, professional musicans, songwriters, band managers and other music industry professionals.

This article has been written by one of the Songstuff Site Crew.

Songstuff Home Page

Sometimes I'll have sections that I'm not quite sure how they fit in the puzzle of a tune, they'll get moved around; what I think was originally a verse ends up becoming the chorus, or what's an intro gets dropped as a hook, things get shifted around a lot.”
Gotye