How MIDI Works

By: Dave Roos
MIDI software programs let engineers combine multiple electronic instruments.
© Marcus Lyon/Getty Images

MIDI is a rarity in the technological world. Short for Musical Instrument Digital Interface, MIDI is the one and only standard by which electronic musical instruments, computers, software and other digital controllers share musical information. Nobody owns MIDI. Nobody sells it. It just works. If only everything were that easy…

MIDI was invented in 1983 as a simple way for a single musician to control multiple electronic instruments at the same time. Using a single MIDI-enabled keyboard, for example, a musician can play audio on two or three synthesizers, a drum machine and a sampler. When the musician presses a key on his keyboard, it generates MIDI data -- which key he pressed, how long he held it down, how hard he pressed it -- that tells the other instruments exactly what notes to play and how to play them.

Advertisement

Soon people realized that computers could be used to compose, record and edit MIDI data. Using simple desktop software called a sequencer, professionals and amateurs can use MIDI to record and edit multiple tracks of electronic music. Since MIDI is a universal standard, the recorded songs can be played back on any electronic musical instrument or MIDI-enabled device.

The combination of MIDI and powerful home computers has changed the way people make music. A young musician no longer needs to spend thousands of dollars on expensive musical instruments and hours in a professional recording studio. Software packages like Pro Tools and Reason allow anyone to make professional quality music at home using an endless arsenal of virtual instruments.

But MIDI is no longer confined to just making music. The keyboard player can trigger the smoke machine every time he plays a D-flat and can control the lights during a live show. And MIDI data also can help synchronize recording equipment in a large studio.

What is MIDI exactly? And how do musical instruments use MIDI to talk to computers and to each other? Read on to find out.

Advertisement

What is MIDI?

Control knobs on mixing boards help engineers set different levels for MIDI recording.
© Paul Hawthorne/Getty Images

Perhaps the best way to understand what MIDI is to first understand what it is not:

  • MIDI isn't music
  • MIDI doesn't contain any actual sounds
  • MIDI isn't a digital music file format like MP3 or WAV

MIDI is nothing more than data -- a set of instructions. MIDI data contains a list of events or messages that tell an electronic device (musical instrument, computer sound card, cell phone, et cetera) how to generate a certain sound. Here are a few examples of typical MIDI messages:

Advertisement

  • Note On signals that a key has been pressed or a note on another instrument (like a MIDI guitar or clarinet) has been played. The Note On message includes instructions for what key was pressed and at what velocity (how hard the note was played).
  • Note Off signals that the key has been released or the note is done playing.
  • Polyphonic Key Pressure is a measurement of how hard a key is pressed once it "bottoms out." On some keyboards, this adds vibrato or other effects to the note.
  • Control Change indicates that a controller -- perhaps a foot pedal or a fader knob -- has been pressed or turned. The control change message includes the number assigned to the controller and the value of the change (0-127).
  • Pitch Wheel Change signals that the pitch of the note has been bent with the keyboard's pitch wheel.

[source: MIDI Manufacturers Association]

When you record music onto a computer using MIDI, the software saves this list of messages and instructions as a .MID file. If you play the .MID file back on an electronic keyboard, the keyboard's internal synthesizer software follows the instructions to play back the song. The keyboard will play a certain key with a certain velocity and hold it for a specified amount of time before moving on to the next note.

But .MID files aren't restricted to keyboards or other electronic musical instruments. They can be played on any electronic device that contains synthesizer software. Any computer with a sound card can play back .MID files. Cell phones use .MID files to play elaborate ringtones. MIDI data files are perfect for karaoke machines, because they allow the machine to easily change pitch for different vocal ranges. The .MID file will sound a little different on each device because the audio sources are different.

The karaoke example highlights one of the advantages of .MID files. Since the .MID file contains no actual music or sounds, it can be modified without having to re-record any audio. You can speed up the tempo of a MIDI file without the "Chipmunks effect" of warping the pitch, and you can play it with any MIDI compatible musical instrument or device.

And since MIDI files don't contain sampled audio like MP3 or WAV files, they're comparatively much smaller than audio files. A minute of compressed audio adds up to around 10Mb (megabytes) of data, while a minute of sound translated into MIDI only takes up 10Kb (kilobytes) [source: MIDI Manufacturers Association]. This makes MIDI a great choice for memory-starved devices like cell phones and video games.

Now let's look at the difference between MIDI instruments and MIDI controllers.

Advertisement

MIDI Instruments and Controllers

Using a synthesizer and controller, engineers can create sound recordings.
© Scott Keinman/Stone/Getty Images

There are two basic types of devices that generate MIDI data: MIDI musical instruments and MIDI controllers. MIDI musical instruments, also known as synthesizers, come in all different shapes and sizes. Their chief characteristic -- or what differentiates them from MIDI controllers -- is that they generate sound as well as MIDI data.

The classic MIDI synthesizer is the electronic keyboard, resembling a small piano. When you press a key on the keyboard, you hear a tone. Most new keyboards come with hundreds of different preset instrument sounds and effects from which to choose.

Advertisement

But when you press a key on a MIDI synthesizer, in addition to creating an audible tone, you also create MIDI data. If you connect the keyboard to a computer, you can record that MIDI data onto a sequencing program. Or you can connect that keyboard to another device, like a drum machine or sampler, and control that device through MIDI commands.

Over the years, many conventional instruments have been converted into MIDI synthesizers. There are special guitar synthesizers that have touch-sensitive pads instead of frets. On stringed instruments, frets are the raised portions on the neck that divide it into musical fixed elements. On a guitar, for example, each fret represents one semitone.

There are wind instrument synthesizers that look like plastic clarinets, but can be adjusted to play like a saxophone. And full drum sets can be constructed of MIDI drum pads, cymbals and high-hats.

So what's a MIDI controller? A MIDI controller looks just like a MIDI synthesizer, except it doesn't emit any sound by itself. Think of it like a joystick or a mouse. A MIDI controller only generates pure MIDI data that's interpreted by either a computer or an audio-enabled MIDI synthesizer.

Let's use an example. As we mentioned earlier, the original motivation for inventing MIDI was that musicians wanted to be able to control multiple electronic instruments from one device. This device, usually a keyboard, is called the controller. Different sections of the keyboard can be assigned to control different instruments. Perhaps the lower register controls the drum machine, the middle register controls a Moog synthesizer, and the upper register plays an electronic flute. The controller itself doesn't generate any sound. It just sends out the MIDI messages telling the other instruments what to play.

Today, there are special MIDI controllers -- still mostly keyboards -- that come equipped with multiple knobs and faders to manipulate the instruments they're emulating or controlling. These MIDI controllers don't come with hundreds of preloaded sounds and effects because they generate all of their audio through third-party hardware and software.

MIDI controllers, like MIDI synthesizers, come in all shapes and sizes. There are MIDI controllers that look like guitars, clarinets and drums. Plus there are special foot pedals and elaborate control consoles with dozens of knobs and faders for professional quality mixing. There are even special MIDI consoles to control stage lighting during a show.

Now let's look at the basics of MIDI sequencers, also known as multi-track recording software.

Advertisement

MIDI Multi-Track Recording Software

MIDI software programs help turn computers into recording studios.
Image courtesy of DigiDesign

Multi-track recording software -- or sequencing software -- replicates the tools and functions of a professional recording studio on a home computer. It's called a sequencer because the software records a time-stamped sequence of MIDI events and plays them back in the same exact order [source: The Java Tutorial].

For a simple MIDI recording setup, all you need is a MIDI synthesizer or controller connected to a computer, plus some kind of sequencer software. The standard MIDI connector is the five-pin MIDI DIN that attaches to the joystick port of a PC soundcard. Or you can invest in a small MIDI USB or Firewire adapter that easily plugs into the USB or Firewire port of a desktop PC or laptop. For a more complicated MIDI recording setup, you might need a multi-port MIDI interface that allows you to connect several MIDI devices to a computer at the same time.

Advertisement

Like traditional studio recording, software sequencers record audio onto individual tracks. There's a separate track for the percussion, another for guitar, another for piano, another for vocals, and so on. Most modern sequencers can record both digital audio and MIDI data. A vocal track, for example, would be recorded with a microphone and represented in the sequencing program as sound waves. A MIDI track recorded from a keyboard would be represented as dots and bars corresponding to MIDI events.

To record a song on a sequencer, you typically lay down one track at a time. Once the percussion track is recorded, for example, you can play it back and record over it with the bass line. This is called real-time recording.

But since MIDI data is digital, it's also extremely easy to edit. The visual layout of a sequencing program is chronological, displaying recorded audio from left to right, beginning to end. You can grab chunks of audio -- say a drumbeat -- copy it and paste it 100 more times. Or you can take the entire chorus, including 16 different tracks, and drag it back 12 bars.

Most sequencing software also comes with a host of virtual knobs, faders and effects. You can adjust the volume, stereo pan and audio effects of each track to create the perfect mix. The software allows you to export your file as an MP3 or WAV and burn them onto a a CD.

Now let's talk about virtual instruments, one of the coolest advantages of making music with MIDI.

Advertisement

MIDI and Virtual Instruments

Microphones capture vocals along with different instruments which are then mixed using MIDI recording software.
© George Doyle/Stockbyte/Getty Images

Any synthesizer, like an electronic keyboard or MIDI guitar, is made up of both hardware and software. The synthesizer software runs on a tiny computer installed inside the musical instrument. But it's also possible to take that same synthesizer software -- which contains all of the code that produces the unique sounds of an electronic instrument -- and run it on a normal home computer.

This type of software-only synthesizer is called a soft synth and is one of several so-called virtual instruments. Let's say you have an audio editing and sequencing program like Pro Tools. You're writing a song that would sound awesome with a jammin' solo on a 1975 Moog synthesizer with Taurus bass pedals. You don't have to go on eBay and drop a couple thousand dollars on a vintage synthesizer. Instead, you can buy an inexpensive software plug-in for Pro Tools that allows you to emulate the exact sound of the 1975 Moog.

Advertisement

A virtual instrument that replicates the sound of an existing hardware instrument is called an emulator. The cool thing about these emulator plug-ins is that they include a graphical interface that looks exactly like the original instrument, right down to all the crazy knobs and faders. And since this is a MIDI interface, you can even add extra effects and capabilities -- like the ability to play more notes at the same time.

You play a soft synth emulator through the same MIDI keyboard or MIDI controller you use to record the rest of your MIDI data. Or you can buy special controllers that are meant to have the look and feel of a classic keyboard or organ, with all the physical knobs, buttons and drawbars. There are also plenty of soft synths that are original creations, rather than emulating an existing musical instrument.

Another type of virtual instrument is a software sampler. A sampler allows you to press a button to play back a sound file, maybe a vocal shout or an audio quote from a movie. Software samplers can be loaded with bits of original recorded audio, but are most useful when loaded with tremendous third-party sample libraries containing thousands of drumbeats, sound effects and vocal clips [source: Sweetwater].

Most virtual instruments and sampler plug-ins are programmed using something called Virtual Studio Technology (VST), an open codec introduced by Steinberg in 1996. VST plug-ins can be dragged and dropped directly into Steinberg's sequencing and recording programs, Cubase and Neundo. Although a program like Pro Tools doesn't recognize VST files, there are special downloads that repackage VST files as Pro Tools plug-ins [source: YouTube].

We hope this has been a helpful introduction to the miraculous world of MIDI. For more information on music technology and related topics, check out the links on the next page.

Advertisement

Advertisement

Loading...