2005-08-31 at 17:00
MIDI Note-on Message
The MIDI note-on message is used for turning on MIDI notes. The note-on message is a channel message and is consequently restricted to one of 16 pre-defined MIDI channels (i.e., numbers 0 through 15). The basic format of the MIDI note-on message is shown below:
Most-significant Nibble | Least-significant Nibble | Byte 1 | Byte 2 |
1001 | MIDI channel [0 - 15] | Key Number [0 - 127] | Velocity [0 - 127] |
- MIDI Channel: In the General MIDI specificiation, MIDI channel 9 is reserved for the use with percussion instruments. In this context, a percussion instrument means an instrument that has no note-setting or pitch setting. For instance, a Low Floor Tom is a percussion instrument in this context, while a Timpani is NOT a percussion instrument. The Timpani is not considered to be a General MIDI percusion instrument because you can specify a pitch. All of the remaining channels (0 through 8, 10 through 15) are reserved for use with pitched or non-percussion instruments.
- Key Number: For pitched instruments (i.e., non-percussion instruments), the key-number specifies the piano-key number. The General MIDI specification assigns the number 69 to A440 (i.e., the international standard that assigns a pitch of 440 Hertz for Middle-A on the standard piano keyboard). Before General MIDI, different mappings were supported by different manufacturers. For percussion instruments the MIDI key value is used for specifying the instrument number. Again, General MIDI specifies a list of standard percussion instrument table. That table assigns a specific instrument number for each MIDI key value.
- Velocity: The velocity specifies the volume or force, with which the note is played. The concept here comes from a keyboard. The faster that one strikes a piano keys, the louder the note will sound. Additionally, the timbre or instrument quality will change along with the velocity. More expensive MIDI synthesizers will change the timbre of the played note as the velocity in the note-on message changes. In my experience, only the most feature-rich computer-based MIDI synthesizers/sound-drivers will vary the timbre with the velocity. Notice the primary limitation! Once a note is played, there is no way of chaning the velocity. As I'll discuss is a future article, there are ways of modifying the channel-volume, but there is no way of changing the volume of an individual note.
Note-on Examples
Middle-A note over MIDI channel 3 with a velocity of 79: 1001 0011--0100 0101--0100 1111 (bin) => 93-45-4F (hex).
Middle-C note over MIDI channel 10 with a velocity of 127: 1001 1010--0100 1000--0111 1111 (bin) => 9A-48-7F (hex).
In both cases, the note-on messages are assigned to one of the non-percussion channels. To turn a message into a percussion note-on message, just play the note over the percussion channel (channel 9 in General MIDI).
Bass Drum 1 with a velocity of 79: 1001 1001--0010 0100--0100 1111 (bin) => 99-24-4F (hex).
High Bongo with a velocity of 127: 1001 1010-0110 1100-0111 1111 (bin) => 99-3C-7F (hex).
Just a reminder. The target channel determines whether a MIDI note is interpreted as a percussion note or a pitched note.
MIDI Note-off Message
The MIDI note-on message is used for turning a currently playing MIDI note off. When the note is turned off, it is just like an instrumentalist releasing a note. Hence, when the note is released, its sound should start decaying according to the timbre of the currently sounding instrument. One thing to keep in mind is that you need to know the key-number and the MIDI channel that were used when turning the note on. Turing a note-off that isn't currently registered with the MIDI synthesizer as being on will have no effect.
Most-significant Nibble | Least-significant Nibble | Byte 1 | Byte 2 |
1000 | MIDI channel [0 - 15] | Key Number [0 - 127] | Velocity [0 - 127] |
MIDI Software Related Articles