Search Gear
 

MIDI 101

January 1, 2004
share

If you're shopping for a digital piano or other home keyboard, you're likely to encounter a slew of new technical terms. Many of these revolve around MIDI technology.

These days, MIDI (pronounced MID-ee) is such an important part of making music with electronic instruments that virtually any keyboard, digital piano, or synthesizer on the market is MIDI equipped. To understand why, let's start at the beginning.

WHAT'S IT ALL ABOUT?

MIDI (short for Musical Instrument Digital Interface) was introduced more than 20 years ago as a method of communication between synthesizers from different manufacturers. Prior to MIDI's inception, it was virtually impossible to integrate several electronic musical instruments into a system where they could work together simply and reliably.

The most common misconception about MIDI is that it contains audio information. In fact, it doesn't carry any data that you can actually hear. Instead, it's a complex computer language used to relay performance information to and from an instrument.

A MIDI cable features a small, round 5-pin connector on either end, and it easily connects one instrument to another. You'll find MIDI In and Out jacks on any MIDI instrument. Often, instruments include a Thru jack as well, which echoes the information received at the In so that it can be passed on to other MIDI devices (see Fig. 1).

Unlike many computer interfaces, MIDI communicates in only one direction. To send data from one instrument to another, you need to connect the Out from the first instrument to the In of the second instrument. In this configuration, the first instrument is called the master and the second instrument is called the slave. Additional slaves can be added by “daisy-chaining” them to the Thru ports (see Fig. 2).

You can think of MIDI information as a modern-day, electronic version of the piano roll found on old player pianos. Those rolls had holes punched in a specific order that represented the actual performances of the music. The holes in the roll correlated with specific notes on the piano and “communicated” to the piano which notes to play and how long to hold them.

Similarly, the data that goes through a MIDI cable communicates to a MIDI instrument, telling it not only what notes to play and how long to hold them, but, as you'll see, quite a bit more.

MIDI also spawned a new type of instrument called the sound module. This is a box that contains a music synthesizer but that has no keyboard. The sounds from the module are played by connecting another MIDI instrument and triggering the notes from the other instrument's keyboard. This makes it possible to have many synthesizers in a small amount of space because only one keyboard is needed to control them all. You'll find that many of today's most popular instruments are available as both a keyboard and a sound module.

ONE CABLE, LOTS OF MUSIC

If MIDI isn't carrying audio information, how does it work? In order to faithfully transmit every nuance of a performance, MIDI uses many different messages.

When you hit a key on a keyboard, MIDI sends a Note On message with a note number for that specific key. This message also includes a Velocity value, which indicates how hard the key was pressed. When you release the key, a Note Off message is sent, which tells the connected instrument to stop playing that note. As you can imagine, playing a simple two-handed piano passage creates a flurry of MIDI information!

But that's just the beginning. Many of the most important aspects of MIDI are handled by Control Change (CC) messages. One common CC is used for sustain pedal information (also known as Damper Pedal or Hold Pedal). When you press the pedal, MIDI sends an On message for CC 64 (the Control Change number dedicated for sustain pedal information). When you release the pedal, an Off message is sent. The sustain pedal is an example of a switched CC message. It's either On or Off, with no gradients in between.

CC messages can also be continuous, with 128 steps of control (0-127). Volume (CC 7) is an example of a continuous controller that can be smoothly and gradually changed over time. Other commonly used continuous Control Change messages include Modulation (CC 1), often used for vibrato effects; Pan (CC 10), which is the placement of the sound between the left and right speakers; Reverb (CC 91); and Chorus (CC 93), a detuning effect which is used to fatten or enhance a sound.

Two more important MIDI messages are Pitch Bend and Aftertouch, which are crucial for re-creating the performance nuances of other instruments.

Pitch Bend can be used in small amounts, for example, to emulate the subtle finger-bending of a string on a guitar. Or the bend range can be much more dramatic, emulating the sound of a slide trombone. In addition to emulating acoustic instruments, Pitch Bend is commonly used to add expressiveness to synthesizer lead sounds. Different keyboards allow pitch bending in different ways, using levers, wheels, or even pedals. Unlike other MIDI controllers, Pitch Bend is centered at a zero value and can have negative or positive values. (Most MIDI controllers start at zero and can only increase with positive values.)

Aftertouch (also known as Pressure) is a MIDI message that is created by pressing down on a key after the initial attack. This gives the performer a very natural way to add vibrato or sforzando (volume swell) by simply pressing harder on the keys. Many pianists find this effect to be odd at first. With practice, however, it becomes an expressive technique to add nuance to your performance, because it doesn't require the use of additional pedals, levers, or sliders.

All of these MIDI messages can be separated onto 16 MIDI Channels. By using different channels, it's possible to have many musical parts carried by a single MIDI cable. This works similarly to cable television: the cable connected to your TV actually carries the programs found on all channels, but you “tune in” to one channel at a time to view a specific broadcast. Of course, with only two hands, you may feel that there's no need to worry about separating your musical performance onto different channels. This brings us to one of the most exciting applications of MIDI, known as sequencing.

A sequencer is a multitrack recorder for MIDI information. It allows you to record, overdub, and edit MIDI performances on different channels and play them back simultaneously, triggering sounds from your MIDI instrument. Sequencers are often included in many of today's keyboards, but the most popular way to record MIDI is by using computer-based sequencing software. (For more on computer-based sequencers, see “The Computer Connection” on page 52.)

ALL IN GOOD TIME

There are many benefits to “recording” your music as a MIDI performance. First of all, tempo is completely flexible. When you slow down a MIDI sequence, you are simply sending the note triggers at a slower rate. This is a big advantage that MIDI has over audio recording, which usually sounds strange when sped up (the “chipmunk effect”) or slowed down (the “Darth Vader effect”). MIDI performance tempos can be changed drastically with no alteration of the actual pitch. For example, you can slow down your song to play a difficult passage at a comfortable speed and then speed things back up to hear it at the original tempo.

Another great benefit of sequencing is quantization. This is a computer-aided time correction that helps the various parts you've recorded to groove together. It is especially useful for rhythm instruments like drums and percussion. The concept is simple: you tell the computer the meter and tempo of your song, and then you set a quantize resolution. For example, a quantize resolution of sixteenth notes will divide each measure into 16 beats, and then it will move each note that you play to the closest division.

However, quantizing is often overused and must be applied carefully, otherwise it can strip the human feel from your performance. Fortunately, most sequencers allow you to try different quantize settings without destroying or altering the original performance. (This is commonly called nondestructive quantization.) Typically, you can vary the amount of quantizing for different parts so that drum tracks can be tight and focused while other instruments are left untouched or more lightly corrected.

THE PORTABLE MIDI FILE

Let's say you've created a song in your computer sequencer and now want to play it back on a different computer equipped with different sequencing software. Or perhaps you want to e-mail it to a friend so she can hear it at her house on her instrument.

Even though you may be dealing with different software and even different computer platforms, it's not a problem. Why? Because of the Standard MIDI File (SMF).

The SMF is a universal file format that's platform-independent. It allows you to export your song as a file that any sequencer can open and play. There are two types of SMF: Type 0 and Type 1. Both types contain all of the information needed to play back your song correctly — such as tempo changes, time signatures, and, of course, the actual musical performance. It's important to note that both types of SMF files will sound identical when played back.

ZEROS AND ONES

SMF Type 0 combines all of the parts for each channel onto a single track. For example, if you have a simple sequence with individual tracks for drums, tambourine, shaker, and congas, all of those tracks will be combined together. Of course they'll still sound the same, but you won't be able to easily select or mute just one of the parts. SMF Type 0 is usually the best choice for playback using an instrument's internal sequencer because some instruments have limits on how many tracks can be recognized.

SMF Type 1 exports all tracks exactly as they are laid out in your sequencer. This is the preferred type of SMF for moving files between different computer platforms and various sequencing programs because it retains your unique track separation, allowing for track-specific quantizing and editing.

SMFs are common throughout the music industry. They are available for purchase with music books and training courses, often in a “music-minus-one” format, which allows the user to play along with full arrangements. SMFs are also used by musicians and composers who collaborate with others as an easy way to share music files. If you've spent any time researching music on the Internet, you've probably found that many SMFs are available online. Magazines (such as Electronic Musician) post them as enhancements to their printed articles, and many amateur and professional musicians use their own Web sites to post their songs and share their music with the world.

SALUTING GENERAL MIDI

Another important aspect of MIDI sequencing involves the use of Program Change messages. These messages, which you can insert at any point (or points) in a sequence, allow you to assign specific sounds for each of the MIDI channels that you're using in your song. You can also set the sounds to change at any point in the song by inserting additional Program Change messages. But with the countless number of synthesizers and electronic instruments available, it was necessary to establish a set of rules that composers could follow so that their music would play correctly on any instrument.

By using Program Changes, a musician can be sure that whenever he plays his song on his synthesizer, the piano part will always play with a piano sound. But how can he be sure that it will play a piano sound on other MIDI instruments, perhaps ones mde by a different manufacturer with a different sound set?

General MIDI (GM) solves that problem with specific guidelines that determine where sounds are found and how they behave. Many instruments are GM-compatible, which means that they adhere to this set of rules.

WHERE'S THAT SOUND?

In General MIDI, there are 128 instrument sounds that are always found in the same memory positions, as specified in the General MIDI Level 1 Sound Set (see page 49). For example, if you send Program Change 1 to any GM instrument, it will select a piano sound. Program Change 41 will select a violin sound, Program Change 57 a trumpet sound, and so forth. This standardized sound set allows you to be confident that your harpsichord track won't come out sounding like an oboe (unless, of course, you want it to).

But the sounds aren't limited to traditional instruments. You'll also find distorted guitar (PC 31), “Choir Aahs” (PC 53), sitar (PC 105), bagpipe (PC 110), and helicopter (PC 126), among many others. In fact, GM is the core of many computer-game soundtracks and sound cards, so the full compliment of unique synth textures and sound effects comes in handy.

GM1 also specifies a standard drum kit, known as the General MIDI Level 1 Percussion Map (see page 51), which includes 47 sounds assigned to particular notes on the keyboard. The percussion map includes not only the sounds of a full drum set, but also unique ethnic percussion sounds like congas, timbales, maracas, triangles, and cuicas. Because each note is assigned a certain sound, drum parts always play back with the correct feel and nuance.

SO MANY NOTES, SO LITTLE TIME

In addition to the standard set of 128 sounds, a GM instrument must be 16-part multitimbral. In other words, it must recognize all 16 MIDI channels and be able to play different instruments on each channel simultaneously. Channel 10 is reserved for the drum kit.

A GM instrument also requires a minimum of 24-voice polyphony. This means that it must be able to play at least 24 notes at the same time, so that all of the parts can play together. All of those voices must respond to Velocity, Aftertouch, and Pitch Bend.

And finally, General MIDI requires that each part respond to several CC (Control Change) messages including Modulation (1), Volume (7), Pan (10), Expression (11) and Sustain (64). There are also several other functions that include tuning (coarse and fine) and pitch-bend sensitivity.

GENERAL MIDI: ROUND 2

As you can imagine, General MIDI was a boon to folks who wanted to exchange songs between instruments. However, just as it quickly became a universal standard for sequenced performances, musicians and programmers began to find that it was too restrictive for more advanced applications. Hence, General MIDI 2 (GM2) was born. GM2 adheres to all of the original General MIDI specs and adds many additional enhancements that reflect advances in the power of the newer instruments and popular requests from musicians.

GM2 adds 87 new instrument sounds (for a total of 215), and it also dramatically raises the number of sound effects to 46. Additionally, it specifies 8 unique drum kits using 133 drum and percussion sounds (which is nearly triple the number of sounds in the original GM1 spec). Channel 11 is also assigned as a drum part, along with the original Channel 10, for two simultaneous drum kits.

Because of the expanded sound sets, GM2 must also recognize Bank Select messages (CC 0). When combined with Program Change messages, Bank Select can choose from literally thousands of sounds in different banks. General MIDI 2 also responds to 14 additional Control Change messages for even more real-time control over the sounds in a performance.

GM2 also specifies that Reverb and Chorus effects must be available with a separate level for each part. Having these effects available allows you to mix and enhance your sequences in much the same way that professional recordings are polished and refined. It also adds to the realism of the instruments because they appear to exist in a more natural, ambient space.

SO NOW YOU KNOW

For many people, MIDI has dramatically changed the way that music is played, written, recorded, and shared. Don't be afraid to plug in those MIDI cables and experiment — you may just find that it'll change your musical life for the better.


Scott Wilkie is a keyboardist and composer based in southern California. MIDI really did change his life. Check out his Web site at scottwilkie.com.

General MIDI Level 2

Learn more about the GM2 specs at the EM Web site (www.emusician.com).

GM Level 1 Sound Set

PC# INSTRUMENT PIANO PC# INSTRUMENT BASS PC# INSTRUMENT REEDS PC# INSTRUMENT SYNTH EFFECTS
1 Acoustic Grand 33 Acoustic 65 Soprano Sax 97 Rain
2 Bright Acoustic 34 Electric (Finger) 66 Alto Sax 98 Soundtrack
3 Electric Grand 35 Electric (Pick) 67 Tenor Sax 99 Crystal
4 Honky Tonk 36 Fretless 68 Baritone Sax 100 Atmosphere
5 Electric Piano 1 37 Slap Bass 1 69 Oboe 101 Brightness
6 Electric Piano 2 38 Slap Bass 2 70 English Horn 102 Goblins
7 Harpsichord 39 Synth Bass 1 71 Bassoon 103 Echoes
8 Clav 40 Synth Bass 2 72 Clarinet 104 Sci-Fi
CHROMATIC PERCUSSION STRINGS PIPE ETHNIC
9 Celesta 41 Violin 73 Piccolo 105 Sitar
10 Glockenspiel 42 Viola 74 Flute 106 Banjo
11 Music Box 43 Cello 75 Recorder 107 Shamisen
12 Vibraphone 44 Contrabass 76 Pan Flute 108 Koto
13 Marimba 45 Tremolo Strings 77 Blown Bottle 109 Kalimba
14 Xylophone 46 Pizzicato Strings 78 Shakuhachi 110 Bagpipe
15 Tubular Bells 47 Orchestral Strings 79 Whistle 111 Fiddle
16 Dulcimer 48 Timpani 80 Ocarina 112 Shanai
ORGAN ENSEMBLE SYNTH LEAD PERCUSSION
17 Drawbar 49 Strings 1 81 Square 113 Tinkle Bell
18 Percussive 50 Strings 2 82 Sawtooth 114 Agogo
19 Rock 51 Synth Strings 1 83 Calliope 115 Steel Drums
20 Church 52 Synth Strings 2 84 Chiff 116 Wood Block
21 Reed 53 Choir Aahs 85 Charang 117 Taiko Drum
22 Accordion 54 Voice Oohs 86 Voice 118 Melodic Tom
23 Harmonica 55 Synth Voice 87 Fifths 119 Synth Drum
24 Tango Accordion 56 Orchestra Hit 88 Bass plus Lead 120 Reverse Cymbal
GUITAR BRASS SYNTH PAD SOUND EFFECTS
25 Acoustic (Nylon) 57 Trumpet 89 New Age 121 Guitar Fret Noise
26 Acoustic (Steel) 58 Trombone 90 Warm 122 Breath Noise
27 Electric (Jazz) 59 Tuba 91 Polysynth 123 Seashore
28 Electric (Clean) 60 Muted Trumpet 92 Choir 124 Bird Tweet
29 Electric (Muted) 61 French Horn 93 Bowed 125 Telephone Ring
30 Overdriven 62 Brass Section 94 Metallic 126 Helicopter
31 Distortion 63 Synth Brass 1 95 Halo 127 Applause
32 Guitar Harmonica 64 Synth Brass 2 96 Sweep 128 Gunshot

Control Changes

CC# CONTROL FUNCTION
0 Bank Select MSB
1 Modulation
2 Breath Controller
3 Undefined
4 Foot Controller
5 Portamento Time
6 Data Entry MSB
7 Channel Volume
8 Balance
9 Undefined
10 Pan
11 Expression Controller
12-15 Undefined
16-19 General Purpose Controllers 1-4
20-31 Undefined
32 Bank Select LSB
33-37 LSB for CCs 1-5
38 Data Entry LSB
39-63 LSB for CCs 7-31
64 Damper Pedal (Sustain)
65 Portamento On/Off
66 Sostenuto
67 Soft Pedal
68 Legato Footswitch
69 Hold 2
70 Sound Controller 1 (default: Sound Variation)
71 Sound Controller 2 (default: Timbre/Harmonic Intensity)
72 Sound Controller 3 (default: Release Time)
73 Sound Controller 4 (default: Attack Time)
74 Sound Controller 5 (default: Brightness)
75-79 Sound Controllers 6-10 (no defaults)
80-83 General Purpose Controllers 5-8
84 Portamento Control
85-90 Undefined
91 Effects 1 Depth
92 Effects 2 Depth
93 Effects 3 Depth
94 Effects 4 Depth
95 Effects 5 Depth
96 Data Increment
97 Data Decrement
98 Non-Registered Parameter Number LSB
99 Non-Registered Parameter Number MSB
100 Registered Parameter Number LSB
101 Registered Parameter Number MSB
102-119 Undefined
120-127 Channel Mode messages

GM Level 1 Percussion Map

NOTE# DRUM SOUND NOTE# DRUM SOUND NOTE# DRUM SOUND
35 Acoustic Kick 51 Ride Cymbal 1 67 High Agogo
36 Kick 1 52 Chinese Cymbal 68 Low Agogo
37 Side Stick 53 Ride Bell 69 Cabasa
38 Acoustic Snare 54 Tambourine 70 Maracas
39 Hand Clap 55 Splash Cymbal 71 Short Whistle
40 Electric Snare 56 Cowbell 72 Long Whistle
41 Low Floor Tom 57 Crash Cymbal 2 73 Short Guiro
42 Closed Hi-Hat 58 Vibraslap 74 Long Guiro
43 High Floor Tom 59 Ride Cymbal 2 75 Claves
44 Pedal Hi-Hat 60 Hi Bongo 76 Hi Wood Block
45 Low Tom 61 Low Bongo 77 Low Wood Block
46 Open Hi-Hat 62 Mute Hi Conga 78 Mute Cuica
47 Low-Mid Tom 63 Open Hi Conga 79 Open Cuica
48 Hi-Mid Tom 64 Low Conga 80 Mute Triangle
49 Crash Cymbal 1 65 High Timbale 81 Open Triangle
50 High Tom 66 Low Timbale

Show Comments

These are my comments.

Reader Poll

Do you use music streaming services?


See results without voting »