MIDI: Just the Basics

If you’re not up to speed on this important protocol, let’s get started

MIDI (Musical Instrument Digital Interface) has stood the test of time, and remains one of the most exciting developments in modern music since the synthesizer. MIDI makes many things possible, but one of the most common applications is to allow computers to treat electronic musical instruments as just another peripheral—like a printer, modem, or terminal.

MIDI-equipped computers communicate various messages with electronic instruments (such as keyboard synthesizers and drum machines) over two types of cables:

  • For older gear, the cable uses a 5-pin connector that is unlike most audio or computer connections, To accommodate this type of gear, computers will require a MIDI interface—typically a peripheral that connects via USB,
  • Newer gear communicates over USB connections

In the image at the top, a USB connector is on the left; 5-pin MIDI connectors for MIDI out and MIDI in are on the right. The messages between the computer and instrument use a computer language designed specifically to communicate musical parameters such as pitch, tempo, rhythm, dynamics, etc. This language is part of the MIDI specification. These messages between the computer and instrument use a computer language designed specifically to communicate musical parameters such as pitch, tempo, rhythm, dynamics, etc. This language is part of the MIDI specification.

There are two main kinds of interaction with the computer: it can send data to the instrument (from the computer’s MIDI out to the instrument’s MIDI in), or you can play the instrument and have it send its output to the computer (data goes from the instrument’s MIDI out to the computer’s MIDI in). This interaction can occur over a dedicated MIDI cable, or over USB, and allows for all kinds of possibilities.

One of the most basic applications is a musical “word processor” for creating notation and sheet music. Like a word processor, you “type in” notes from the music keyboard by playing the keys, and the computer screen displays these notes. You can then edit what’s on the screen, and with most notation programs, play back what you see through a MIDI sound generator such as a synthesizer or sampler. Once you’ve edited the piece exactly as desired, you can print out the sheet music on a printer.

This may look like sheet music, but its a screen shot from the program Notion. Notes can be entered manually, or played in from a MIDI keyboard.

Another application turns your computer into what’s called a MIDI sequencer. Sequencing is like audio recording, with a major difference: the computer doesn’t record sound, but the data that comes out of the keyboard as you play. Let’s cover this in a bit more detail.

As you play music on a MIDI-compatible keyboard, when you press a key the keyboard sends a message to the computer that says which note was played, and with what kind of dynamics (soft, loud, etc.). When you release the key, another message tells the computer that the note was released. Adding vibrato or pitch bend also sends out data, which the computer can store in its memory. So, the computer stores all of the performance “events” it took to play a particular song. Playing this data back into the instrument’s MIDI in connector recreates the original performance. This is somewhat like a super player piano—the computer controls the instrument but of course, data is held in computer memory instead of on a paper roll (and the keys don’t move up and down!).

These MIDI notes are displayed on a computer screen in a “piano roll” view because the notes look like the holes in a player piano roll.

Once the data is in the computer, you can modify it in a several different ways. For example, if you’re working with a singer who would rather sing in a different key, no problem: just transpose the entire composition with the push of a button. If your playing is a little sloppy, the computer can compensate for timing errors by shifting notes closer to the beat. You can change dynamics, tempo, remove bad notes, add in new notes, and much more. In many ways, this gives musicians and composers the same type of editing power that writers have with word processors.

Computers and music are also a good combination for education. The computer can do such tasks as help teach scales and intervals, while keeping track of each student’s score and playing back notes through a synthesizer for confirmation.

MIDI has also branced out into other fields; a MIDI sequencer can control stage lighting, guitar setups, and even pyrotechnics.

That’s just a very basic overview of MIDI. For more information, join The MIDI Association. It’s free, and the site contains a wealth of data, from beginner to expert.