Channel Voice Messages
In musical systems, the message that most often comes down the bus is to play a note. And for this to happen two diferent status bytes are provided; the channel messages NOTE ON and NOTE OFF. Let's deal with NOTE ON messages first.
NOTE ON ($9n where n represents the channel number in binary starting at 0) requires two data bytes (as show in the table). The first byte says what note is to be played and the second byte specifies velocity (how hard the key was struck). Since data bytes must have its MSB set to 0, the maximum number is a 7 bit number and this is 127 (01111111) so there are 128 diferent numbers (remember we begin at 0). This way there will be a possibility to play 128 diferent notes and 128 diferent velocity steps. Now, a piano has only 88 keys, so that would be more than adequate, but since some of the more avant-garde music is written in micro-tonal tunnings, where the pitches between a piano's tones are also used (see Micro-Tonal Music Synthetizer), there are those that argue that 128 notes are not enough.
NOTE OFF (Status $8n) Also consist of two bytes, the note number and the "key release velocity". But typically this is seldom used as MIDI also allows to use NOTE ON status with velocity set to 0; and there is a good reason to do that way. The reason is called running status.
Running status is a way of saving bytes and bandwidth on a bus that is transmitting MIDI data. It consists on stripping off the status byte of the next message if the previous message that was transmitted was using the same status byte. So in a two note sequence, MIDI sends a NOTE ON status message, the note and velocity of the first note and the note an velocity of the second note without sending a NOTE ON for the second note. To quiet the note, instead of changing the status byte to a NOTE OFF message, MIDI is allowed to use the previous running status byte (NOTE ON) and just send the note number and a velocity of 0. As you can see this is a 33% increase in bandwidth since instead of sending 3 bytes MIDI is sending just two. This is particulary important to avoid "MIDI-Clogging" or too much information pushed through the wire which will cause audible delays between when a note sounds and when it is supposed to play.
POLYOHONIC AFTER-TOUCH (Status $An) Refers to how hard the key is being pressed rigth now. Pressing harder after the key has been depressed lets you do pitch bends, tremolos, etc. Several keyboards are aquipped with this feature. The first data byta is the key number an the second the amount of pressure.
CONTROL CHANGE (Status $Bn) Allows changes in a front panel slider or knob to be passed to other instruments. These changes are set digitally. The first data byte is the number of the control and the second is the control's new value.
Beware here is where MIDI takes an intersting approach to being able to send either low-resolution (7-bit) or high resolution (14-bit) control values.
Controls $00 - $1F are reserved for low-resolution values and are the most significant byte of the 14 bit value. Control $20 - $3F are reserved to represent the least-significant byte of a high resolution value and do not necessarily have to be sent. The most intersting part of this is that it represents a glitch in MIDI - you can't change the most-significant and least-significant byte of a high resolution control simultaneously, because they are in two different channel messages and neither one can "know" whether the other is coming or not. So what happens to the MSB when the LSB overflows from $7F to $00? The answer is that nothing happens to it until it's updated explicitly; and for a brief instant the whole 14-bit value is way out of whack.
Controls $40 - $5F are set aside as bank of switches, $60 - $79 are undefined and the last 6 controls $7A - $7F are set aside as channel mode messages.
PROGRAM CHANGE (Status $Cn) Allows an intrument to change voices or sounds like piano to flute. The single data byte says what voice (program) to change to. Modern synthesizers use a standard set of instruments refered as General Midi. These means that voice #01 for example will always be a piano regardless synthesizer's brand or model.
CHANNEL PRESSURE (Status $Dn) The same as Poly- Pressure ($An) but considering the pressure as a whole without taking into account the key. The data byte is the pressure value.
PITCH WHEEL (Status $En) Used to modulate pitch for expressive purposes. The first data byte is the least-significant byte of the value and the second is the most-significant byte. Some synthetizer use only a 7 bit resolution to cover 12 semitones of an octave. Since pitch wheels can modulate up and down, the center position is defined in the specification as $2000, but the range of the control is left to the manufacturer.
Channel Mode Message
The last six "controls" in the control-change group of channel-voice messages are set aside for specific functions. This functions are:
Status $7A Used to separate the synthetizer's keyboard from its tone generating section. A $00 in the second data byte disconnects the keyboard and a $7F reconnects it.
Status $7B Used to turn off all notes being played in the channel specified. Used mainly with sequencers to turn off a note that keeps playing when the sequencer is stopped (causing by a missing note off of the corresponding note on previously sent).
Status $7C Turns Omni mode off, which means that only voice messages on the system's basic channel (defined by the manufacturer) will be recognized. Second data byte is 0
Status $7D Turns Omni mode On, This way an instrument will respond to channel voice messages in all channels, but will respond to mode messages in only its basic channel, which is defined by the manufacturer.
Status $7E Selects Mono On. The synthesizer will respond to note-ons and note-offs as a monotonic instrument (one note at a time, ie: no chords). The second data byte tells the instrument to listen to a number of channels above the basic channel and $00 means to listen to all channels.
Status $7F Selects Poly On. Mono On and Poly On are mutually exclusive, (turning on one of them turns off the other) Poly mode allows many notes to be played at the same time. The second data byte is always $00.
System Message There are three kinds of system messages: system common, system real-time and system exclusive. MIDI 1.0 treats system real-time and system common messages as separate things, but since real-time messages are also system common we will join them together .
MIDI has a variable speed clock that is in essence a metronome. The clock runs at 24 pulses per quarter note (abbreviated 24 ppq). In MIDI, the clock has a system real-time status byte assigned ($F8). Every time an instrument or sequencer reads a timing clock status byte, it avances in the musical score 1/24th of a quarter note and sends out any data previously recorded as happening at that time.
Besides keeping time, everything has to begin at the same time. MIDI has a status byte for that purpose: the start status byte ($FA) this status byte tells a sequencer or drum machine to start from the very beginning. If we want to stop this sequence we use the stop status byte ($FC) and to continue from the point we left we use the continue status byte ($FB). None of these status bytes have any data bytes associated with them and they can be mixed anywhere in a MIDI message (even between data bytes). Also they will not change the running status in effect at the time they are sent.
Many times we want to start from somewhere else but the very beginning thats why MIDI provides a way to address an arbitrary point in the song. This provision is called song position pointer ($F2) and, unlike most other system messages it has two data bytes which contain a value equals to the number of 1/16th notes we are into the song.
Another status byte seldom used but specified in MIDI 1.0 anyway is what is called active sensing ($FE). This is a way of telling if a MIDI instrument (keyboard, drum machine, etc.) is connected to another MIDI instrument. The instrument which want to know if another MIDI device is conected to it, must scan for this status byte. If a period of 300 ms. have elapsed and the status is not received it can be assumed that no device is connected.
SYSTEM EXCLUSIVE
MIDI has provisions for manufacturer's specific variable length messages and content. The system exclusive status ($F0), or sys-ex for short, unlike any other, does not have a fixed number of data bytes that must be sent with it.
The manufacturer uses this to send any kind of data they want. The MMA have a registered list of codes for every MIDI manufacturer in order to identify whom the sys-ex data belongs to and encourages to every manufacturer to make the format they use available in the public domain.
Since sys-ex messages may be any length, there must be some way to indicate the end of a message, and the end-of-exclusive byte (status $F7) serves that function.
|