The Basics of MIDI

For electronic music aficionados, MIDI (Musical Instrument Digital Interface) has opened doors to new worlds of creativity. Before MIDI, many musical applications that seem commonplace today, such as sequencing, layering instruments, or controlling racks of sound modules would have been very difficult or even impossible to do. MIDI-compatible products have become as much a part of electronic music as the instruments themselves, allowing individuals to create music in ways unheard of only a few short years ago. In this document we will define MIDI, discuss some of the basic MIDI messages, and describe the function of MIDI channels. Then, we will briefly cover some of the applications of MIDI such as layering sounds, sequencing, computers, etc. Next, we will describe, in further detail, some of the various MIDI messages. Finally, we will provide a glossary of some common terms related to MIDI and/or MIDI compatible devices.

I. What is MIDI?

"MIDI" stands for Musical Instrument Digital Interface. Although the terms "Musical" and "Instrument" are commonplace, the meanings of "Digital" and "Interface" are less clear. "Digital" refers to working with numbers (zeros and ones), and "Interface" refers to a device that allows for communication and data exchange. Therefore, MIDI is simply musical instruments communicating with zeros and ones.

How Does MIDI Work?
If MIDI is defined as "musical instruments communicating with zeros and ones," how are they communicating with each other? A typical phone conversation consists of three main components; a common language (English, Italian, Japanese, etc.), telephones, and the telephone lines that carry the conversation between phones. MIDI devices communicate in a similar manner. MIDI is the common language, MIDI ports act as the telephones, and MIDI cables are used in place of telephone lines. There are three types of MIDI ports: MIDI OUT, MIDI IN, and MIDI THRU (see fig. 1).

Fig.1 MIDI Ports
MIDI Ports

The MIDI OUT port is used to send data and, in our telephone analogy, is the equivalent of someone speaking into the phone. The MIDI IN port is used to receive data and is the equivalent of someone listening during a telephone conversation. The MIDI THRU port is used to send the data received at the MIDI IN port on to another device, sort of like three-way calling. MIDI OUT is always connected to MIDI IN, MIDI IN can be connected to MIDI OUT or MIDI THRU, and MIDI THRU is always connected to MIDI IN.

Basic MIDI Messages
Now that we have looked at how MIDI data is communicated, we can discuss the various types of messages that are sent across a MIDI cable. The most basic type of MIDI message is called a note message. This message allows you to play a note on one keyboard and trigger that same note on another keyboard. Note information such as the length of time the note was played (duration) and the strength of that note (velocity) is also sent (see fig 2). Other messages such as volume, pitch bend, modulation, etc. are used as well (see Section IV for more information).

Basic MIDI Messages

One thing that is not sent across a MIDI cable is the actual audio signal for each device. This means that, even if all your MIDI connections are setup properly, you will not hear anything if the audio connections for each device are not properly connected. The diagram on the following page (fig. 3) shows the proper connections for a typical MIDI setup.

MIDI and Audio Connections

As this diagram illustrates, the MIDI OUT of MIDI device #1 is connected to the MIDI IN of MIDI device #2. The MIDI THRU of MIDI device #2 is connected to the MIDI IN of MIDI device #3. Playing device #1 sends performance data to devices #2 and #3. If all three instruments are set to the same MIDI channel (see the following section), you will hear a layered sound consisting of piano, strings, and brass when the keyboard is played. If the audio output of device #3 was not connected, you would only hear piano and strings -- even though the MIDI data is still being sent to device #3.

MIDI Channels
Each MIDI cable is capable of carrying up to 16 channels of independent MIDI data. The concept of MIDI channels is similar to that of television. TV stations transmit their programs at the same time. Your television receives all of these programs and you choose the one you want to watch by changing the channel (see fig. 4).

Television Reception

MIDI information is sent in a similar manner, with a limit of 16 channels. This is important because it allows up to 16 different instrumental parts (piano, strings, bass, horns, etc.) to be controlled by the MIDI data on a single MIDI cable. Just as some televisions have picture-in-picture capability, some MIDI instruments are capable of receiving data on more than one MIDI channel at the same time. Such instruments are referred to as being multitimbral (pronounced 'multi-tambral'). Multitimbral instruments allow you to use more than one sound at a time from a single keyboard or sound module. This is especially important when you are using a MIDI sequencer (see Section II) that sends data on multiple MIDI channels at the same time (see fig. 5).

MIDI Channel Reception

II. Applications

MIDI can be used in a variety of ways, depending on your individual needs. In the following section, we will explore several of the more common applications of MIDI.

A. Sequencing
A sequencer is a device that actually records MIDI data. Sequencers can be used to record all of the parts of a composition, edit and mix the tracks, and play them back in the same way a multitrack recording is created in an expensive studio. Unlike multitrack recorders, MIDI sequencers record note data, not audio. Therefore, any part of a performance, including single notes, can be copied, rearranged, transposed or edited. For example, if you make a mistake during the recording of your song, you can locate the wrong note and replace it with the correct one. You can also edit performances in other ways, such as changing a string part to a horn part simply by changing a sound on your sound module. Some keyboards combine sequencing functions with built-in sounds. A keyboard such as this is referred to as a 'workstation' keyboard (see fig. 6).

Roland XP-80 Music Workstation

B. Keyboards and Sound Modules
"Layering" sounds is a popular way of combining several of your favorite sounds, such as piano and strings. MIDI can be used to layer sounds from multiple keyboards and/or sound modules by connecting the MIDI OUT jack from the keyboard you are playing (the master) to the MIDI IN jack on any additional keyboards or sound modules (slaves) and setting them to the same MIDI channel. Playing the master keyboard will trigger the slave keyboards/modules. The master keyboard sends information through the MIDI cable telling the slave keyboard (or module) to play the same notes. If the first keyboard is set to a piano sound and the second keyboard (or module) is set to a string sound, both piano and strings will be heard (see fig. 7).

Layering Sounds through MIDI

C. Guitars
With the proper equipment, a guitar can also be outfitted to transmit MIDI data to a keyboard, sound module, computer or other MIDI gear (see fig. 8). This data is the same as is sent by other MIDI controllers, such as a MIDI keyboard, MIDI wind controller or MIDI accordion. Because playing the guitar involves unique playing techniques, using a guitar to enter data into a sequencer provides extremely realistic guitar and bass recordings.

MIDI Guitar

D. Computers
Computers are becoming increasingly common as tools for musicians. New and exciting applications are constantly being developed. A common application for computers in music is sequencing (see fig. 9), as discussed previously. Computers can also be used to store and edit synthesizer sounds. Synthesizers usually have the ability to send and receive patch data, which is all of the parameter settings that define a particular sound. These sounds can be sent to your computer, edited, saved and retrieved at any time. There are also programs that teach you how to play various types of musical instruments.

Computer Sequencing Software

In order to use MIDI data with a computer, you need to use a MIDI interface. The first MIDI interface (the Roland MPU-401) had a single MIDI IN and MIDI OUT jack. Today, MIDI interfaces come in many forms, from inexpensive single port designs to more elaborate multi-port versions (such as the Roland S-MPU). As a general rule, more MIDI ports on your interface will give you more tracks/instruments for sequencing.

Another common usage for computers and MIDI is music notation. There are software programs available that allow you to enter note data from a MIDI keyboard (or from within the program itself) and convert that data into musical notation (see fig. 10). In addition, most programs allow you to enter items such as dynamic markings, chord charts, lyrics, etc.

Music Notation Software

E. Audio Mixers
Certain MIDI-capable audio mixers can use MIDI messages to automate volume, panning and other parameters. This makes it possible to build your mixes one movement at a time, store the mixes into your sequencer and retrieve them for future remixes. This application is useful for live and recorded performances.

F. MIDI Lighting
Stage lighting can also be automated via MIDI. By recording and sending MIDI information to a MIDI capable lighting system, lights can be turned on or off, positioned and dimmed. This makes it possible to program lighting scenes that change with the music you have recorded onto your sequencer.

IV. The Language of MIDI

Like all digital communication schemes, MIDI is made of up of discrete messages, each performing a specific function. The following is a brief discussion of the primary MIDI messages. Please note that, while these messages are very common, not all MIDI devices will have the ability to transmit and/or receive each message. You can refer to the MIDI Implementation chart for a specific MIDI device to determine which messages it is capable of sending and/or receiving.

A. Note Messages
Note messages are the most basic type of MIDI messages a keyboard can send. Note On/Off and Velocity messages are the most common type of Note message.

1. Note On/Note Off
When a key is pressed on a MIDI keyboard, a Note On message is sent along with a pitch value telling the receiving MIDI device to play a note at a certain pitch. Releasing the key sends a Note Off message, which tells the receiving device to stop playing the note.

2. Velocity
If the transmitting keyboard is touch sensitive, a Velocity message will be sent along with the Note On message. This message corresponds with how hard the key was played and tells the receiving device how loud the sound should be.

B. Program Change
A Program Change message tells the receiving device to change from one sound to another. This is useful for automatically changing sounds during playback of a sequence or changing the sounds of several sound modules from one keyboard during live performance. There are 128 Program Change numbers in MIDI. To access more than 128 sounds through MIDI, you need to use Bank Select messages (see Controller Messages).

C. Controller Messages
There are a number of MIDI Messages classified as Continuous Controller (CC) messages. These messages are usually used to add subtle nuances to your playing. Some of the more common controller messages include the following:

1. Modulation
Modulation is a type of MIDI message known as a Control Change (CC) message. Like Pitch Bend, Modulation is usually sent by moving a lever or wheel on the keyboard. Although Modulation is usually used to control vibrato, it can usually be assigned to other parameters such as pitch and volume. In MIDI, Modulation is assigned to Control Change #1.

2. Volume
Like Modulation, Volume is a Control Change message. It can usually be assigned to control various parameters, but typically is used to control the volume level of the receiving device. In MIDI, Volume messages are assigned to Control Change #7.

3. Bank Select
There are only 128 program change messages in MIDI. In order to access sounds beyond 128 via MIDI, manufacturers group sounds into banks. Controller messages are used to select different groups (banks) of sounds. These messages are referred to as Bank Select messages and are normally followed by a Program Change message. In MIDI, Bank Select messages are assigned to Control Change #0 and #32.

D. Pitch Bend
Pitch Bend messages tell the receiving device to change the pitch of a sound. These messages are usually sent by moving a lever or wheel on the left side of a MIDI keyboard.

E. After-Touch
After-Touch is a MIDI message transmitted when pressure is applied to a key after it is initially pressed. The receiving device can usually be configured to have these messages control things such as vibrato, brilliance, volume, etc. There are two types of After-Touch messages: Polyphonic After-Touch and Channel After-Touch. Polyphonic After-Touch affects only the note that is played. Channel After-Touch affects every note on a specific MIDI Channel.

F. System Exclusive
System Exclusive messages are exclusive to a particular manufacturer. These messages can be used to perform specific functions such as saving or editing patches on a computer. Generally, one MIDI device will not be able to read another MIDI devices System Exclusive messages unless they are the same model.

V. Common Terms

The following section is a glossary containing some of the common terms you will encounter when dealing with MIDI:

Bulk Dump - Some MIDI instruments allow you to transmit their settings via MIDI using messages referred to as 'system exclusive' (see Section IV). These messages can be stored in most MIDI sequencers and can be reloaded into the instrument at a later date. This provides a convenient and inexpensive method for backing up the patch data, system settings, etc. The process on transmitting a number of system exclusive messages at one time is usually referred to as a 'bulk dump.'

General MIDI General MIDI is an industry standard that guarantees that an instrument will conform to certain standards such as 128 sounds in specific locations, 16 multi-timbral parts, and at least 24 voices of polyphony. This ensures that files created on one GM device will be compatible with any other GM device. For example, if you program a sequence to play a piano sound on a GM instrument, it will always use a piano sound for playback when played using a General MIDI compatible device.

GS Standard The GS standard was developed by Roland and is an extension of the General MIDI standard. GS instruments are guaranteed to meet all General MIDI requirements and allow for additional features such as more sounds (over 1100 in some cases), additional effects, and increased editing capability for control of parameters such as the envelope, filter, vibrato rate, etc.

MIDI Channel - MIDI Channels are used to separate MIDI data on a single cable. Each MIDI cable is capable of transmitting or receiving data on as many as 16 different MIDI channels.

MIDI Clock - MIDI Clock is a stream of digital timing pulses that provides information about the current tempo of a song or sequence. It is used to synchronize MIDI devices and works in conjunction with other MIDI messages including Start, Stop, Continue, and Song Position Pointer. For example, these messages can be used to synchronize a sequencer with a drum machine and ensure that the drum machine will play at the correct measure and tempo.

MIDI Time Code - MIDI Time Code is a synchronization signal that is sent digitally through MIDI for (MTC) synchronization of absolute time between audio and MIDI devices.

Multitimbral - An instrument that is multitimbral can produce more than one sound at a time. The number of sounds that an instrument can produce at a single time is determined by the number of "Parts" that are available. For example, General MIDI instruments are required to be 16 Part multitimbral meaning they can produce 16 different sounds at the same time.

Polyphony - Generally speaking, polyphony refers to the number of voices that can be sounding at any given time. In many cases a single 'voice' will be equal to one note. For example, the Roland XP-80 Music Workstation contains 64 voices of polyphony. Some of the more complex sounds will use multiple voices for each note.

We hope that this document has provided you with a better understanding about MIDI and how it works. Understanding the types of messages utilized by MIDI devices and the proper connections involved will be extremely useful when you start working with your own MIDI instruments. If you have any additional MIDI related questions, you can contact the MIDI Manufacturers Association (MMA) at http://www.midi.org.

Home - Synthesizer Sale - Audio/MIDI Forum - MIDI/Music Forum - Synthman Forum - Contacts