How MIDI Works

By: Dave Roos

What is MIDI?

Control knobs on mixing boards help engineers set different levels for MIDI recording.
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:


  • 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.