 |
MIDI PRODUCTION |
JULY,
2000 |
|
|
Understanding
and Using MIDI - Part 2 |
Using
MIDI Messages |
BY KEN LANYON |
|
|
| In Part One, I introduced you to the world of
MIDI and hopefully made you more comfortable about confronting your own gear. If you
havent read Part One yet, then I
suggest you do that first, or you will surely become lost now. |
| MIDI messages are the backbone of the entire
protocol. They can be used to represent the notes themselves, such as the note
number and pressure, or to control global functions. They are used within the master
instrument, and can also be sent to all slaves in the chain. |
| There are multiple types of messages that
MIDI can send, so I will break down the hierarchy of those groups. MIDI messages are
either Channel messages or System messages. Channel messages are those that specify
the musical data, and on what channel that information will be sent and consequently
affect. They can also be further divided up into Voice messages, and Mode messages.
In turn, System messages are those covering all other information, including most
global information, and are further divided up into Common messages, Real-Time messages,
and Exclusive messages. To fully understand the different types of messages, we need
to first understand how MIDI data is organized and sent out. |
| MIDI Data |
| Most of us have heard the term
"bit," and this refers to the individual ones and zeros used in computer code
indicating on and off respectively. Eight of these bits together make up a byte, and
this is how most electronic data is packaged and transmitted. Except for System
Exclusive messages, all MIDI messages are sent out in data packages of two or three bytes
at a time, each byte indicating a specific message. |
| The first byte is called the Status byte,
which indicates the type of message being sent, and also the channel the data will affect.
The first bit of a status byte is always 1 so the receiving unit knows there is a
new message coming through. The next three bits signify the type of MIDI message
being sent (i.e. Note On, Note Off
). Finally, the last 4 bits of a status byte
specify the channel that the message is being sent out on and will affect. |
| The second two bytes of a MIDI message are
called Data bytes, and these identify information specific to the type of message being
sent. For example, pressing on a key will trigger a voice message to be sent, and
the status byte to indicate the "Note On" message and the channel it is being
played on, while the data bytes specify the specific note number value (for example, the D
above middle C) and the velocity with which that note was hit. The first bit of a
data byte is always 0, and the next seven bits specify the 128 possible values of the
message. |
| Channel Voice Messages |
| Channel voice messages in the data byte
describe the information for the notes that are being played. In this category,
there are 7 specific messages; Note On, Note Off, Channel Pressure, Poly Pressure, Program
Change, Pitch Change, and Control Change. With all of these, the status byte will always
specify that type of message and the channel on which it is sent. The data bytes,
however, vary from message to message. |
| As I mentioned before, the data bytes in a
Note On message describe the note number and the velocity with which that note was hit.
This note will continue to play until a Note Off message is sent. This
happens when you let up on the key, and the data bytes describe the note number and
velocity at which that note was released. Channel pressure messages are what many
keyboard players call "after-touch." This is where the note is already
pressed down, and more pressure is added, causing extra sound to occur. Only one
data byte is used in this case, and it specifies the amount of pressure being applied.
The highest pressure held by any one key will now become the pressure over the
entire board. Poly-Pressure is very similar to channel pressure except that each key can
have its own pressure. Therefore, both data bytes are used in this case, one to
identify the specific note number and the other to specify the pressure value.
However, poly pressure is not a very common feature since it is expensive to make each key
responsive to its own pressure. |
| Next, Program Change messages cause a change
in the voice of the notes. Only one data byte is used to signify the specific
program number. Patch Mapping also comes into play at this point. Patch
Mapping is where a specific patch change value is sent out on a certain channel, the slave
receives it, and then changes the voice to one that does not correspond to the specific
data sent. For example, imagine a patch change message is sent out on channel 3
specifying a change to patch 25. The slave is programmed so that when it sees patch
change #25, it will change to patch #18 rather than patch #25. This is useful
because while the language of MIDI does not change, the way different banks and voices are
structured and stored on a keyboard will vary from company to company. One company
may have 5 banks of 64 voices, yet another has 4 banks of 128 voices. All patch
mapping must be programmed in manually on the slave device. In these cases, patch
mapping comes in very handy so that the slave can translate that patch change to the
correct voice. |
| Getting back to the other voice messages,
Pitch Change messages are sent out when you use the pitch wheel, or any other physical
modulator. The data bytes in this message both specify the specific position of the
wheel, where one byte is the coarse wheel position, and the other the fine wheel position.
Remember that each data byte can specify 128 different positions of the wheel, so
this gives us 16,384 values or positions that the wheel could be. This makes for
some very accurate pitch shifting! Channel Pressure, Program Change, Pitch Change,
and Channel Messages are all global messages, affecting those performance events the same,
regardless of which key is hit. |
| Channel Mode Messages |
| The last voice message is Control Change, and
these are specifically linked to the Channel Mode Messages. When a Control Change message
goes out, it is specifying one of the 128 different Channel Mode messages, which globally
direct specific functions of the data. The most important ones to remember are #0
(Voice Bank Selection), #1 (Modulation Values), #7 (volume), #10 (panning), and #64
(sustain). Controllers 120-127 are also very important, for they specify the mode of
the keyboard. These are All Sounds Off (# 120), Reset All Controllers (#121), Local
On/Off (#122), All Notes Off (#123), Omni Off (#124), Omni On (#125), Mono On (#126), and
Poly On (#127). |
| "All Sounds Off" turns off all of
the voices on your keyboard. This would be used to mute all remaining notes if they
werent supposed to be played. Reset All Controllers sends all controller
values back to their original values. This would be used during a break in the song
where the sequencer wasnt playing but would start back up again later. Local
On/Off is a way of turning on/off the internal voices in your keyboard. You might
set this to off when auditioning sounds from an external tone generator. Next, All
Notes Off also mutes all notes being played. We discussed Omni Off, Omni On, Mono
On, and Poly On in the last article, and so you should already know what they do. If
you dont remember, take a look back and refresh yourself. |
| Now, after all this explanation about
controllers, the big question should be "How do I use these?" Controllers
can be accessed through the various menus in your keyboard, or by using physical
controllers such as a sustain pedal, or a pitch wheel. When using physical
controllers, no data needs to be manually entered since the keyboard will do that for you. |
| However, knowing these controllers and their
numbers comes in very handy when you are using a computer sequencer to play back your MIDI
compositions. It's a common practice to insert a program change message at the
beginning of each MIDI track to specify the voice of that track. That way, it will
automatically change, and you won't have to set the voice before you play. You can
also insert controllers such as panning, and volume to automate the tracks. They can even
be helpful to automate some portions of live performances. Consult your MIDI program
manual on how to insert these controllers in your dedicated computer sequencer program. |
| Besides the Channel messages, the second
group of MIDI messages are the System messages, and these are the global messages that
control playback and sync. They dont pertain to the actual notes or other
information being performed. The System messages group can be further divided into
three smaller groups: System Common messages, System Real-Time messages, and System
Exclusive messages. |
| System Common Messages |
| In the System Common messages, there is Tune
Request, Song Select, Song Position Pointer, and MTC (MIDI Time Code). Tune Select
allows the user to correct the global tuning of another analog keyboard. This is
handy because analog keyboards have a tendency to drift out of tune over time. Song
Select allows the user to specify to other units which song will be played next.
Song Position Pointer is a way to keep two machines synced to the closest sixteenth note.
It does this by sending out a value that represents the number of sixteenth notes that
have passed since the beginning of the song. MIDI Time Code is another form of
external sync that, when on, is constantly sent out of the device and represents absolute
time. Absolute time tells the exact position of the song at every moment of
transmission. Once an external converter intercepts it, the data is usually transformed
into SMPTE time code that other machines can read, representing hours, minutes, seconds,
and frames. SMPTE is the standard sync used in the film and video industry. |
| System Real-Time Messages |
| System Real-Time messages control the syncing
of the keyboard or sequencer with another external unit. Within this group, there is MIDI
Clock, Start, Stop, Continue, Active Sensing, and System Reset. MIDI clock, when engaged,
sends out 24 pulses for every quarter note that passes. Combine this with Song Position
Pointer messages and you have MIDI Sync, which is an external sync mode that slaves can
respond and lock to. Next, the Start, Stop, and Continue messages obviously control the
playback of the song. Active Sensing is very important for live performances because it
sends a pulse out every 250ms that the slaves receive and become addicted to. If for some
reason that pulse is interrupted (such as a MIDI cable being accidentally pulled out), the
slaves stop playing, preventing notes from being stuck on because a Note Off message never
reached it. Finally, System Reset messages tell the slaves to return to the settings they
were at when they were first turned on. |
| System Exclusive Messages |
| System Exclusive messages are very handy for
loading and backing-up patch information, as well as for sending and receiving other
information not pertaining to actual performance data. In this group, the messages are:
Start of Exclusive, Manufacturers ID Number, Product ID Number, Device ID Number,
Program Data, and End of Exclusive. Start of Exclusive is the status byte info that
identifies the message as a system exclusive. Next, the Manufacturers ID, Product
ID, and Device ID numbers are all sent out to identify the make and model of a specific
machine. Then the Program Data is sent. System Exclusive messages dont have a
specific number of data bytes to send this information, but rather use as many as needed
to transmit the information. After the program data has finished transmitting, another
status byte is sent to signify the End of Exclusive message |
| The data that is sent can be many things. It
can be the contents of a bank of voices whose parameters you have changed and want to back
up. It can be the sequenced MIDI data of a song you have worked on and want to dump into a
computer sequencer. It can be the basic information of instruments in the chain so that
the master knows what it is connected to. You can send drum patterns you have worked on
and want to back up to a dedicated sequencer. Many rack-mount effects units today have
MIDI ports on them, which can also allow you to back up presets or banks that you have
programmed or changed. Just imagine not having to document all those changes anymore! You
can also send show control information to ignite pyrotechnics on stage, or control lights.
Finally, rather than sending data, you can also reload data you have backed up or created
on another machine. |
| When using System Exclusive messages, there
are three ways to transfer the information. First, you can do a direct transfer, which is
manually initiated at the sending machine. Second, you can initiate a request for data
from another machine. The other machine will then send its data out to be received and
loaded onto the requesting machine. The third way is via a handshake transfer. This is
where the information is requested from one machine, the data is sent, and then
verification is sent to make sure that the receiving machine is getting the info. That
verification will go on until all the data has been received. |
| Summary |
| Hopefully by now you understand how MIDI
messages are structured and work, and can utilize them to control the slaves in your MIDI
rig. I said it before, and I will say it again: MIDI is a powerful protocol that can help
you do amazing things if you take the time to understand it. I personally feel a lot more
confident about using my keyboard, and am definitely eager to buy some outboard tone
generators to improve and expand my music. So pick up your keyboard manuals and dive in!
Be creative and let MIDI do the work for you. |
|
Copyright © 2000, by Ken
Lanyon, ALL RIGHTS RESERVED |
Published in Recording
Engineer's Quarterly and Alexander magazines with permission |
USE OF THIS ARTICLE SUBJECT TO USER AGREEMENT |
|
|
|
|