MIDI (Musical Instrument Digital Interface)
What is MIDI (Musical Instrument Digital Interface)?
Musical Instrument Digital Interface (MIDI) is a standard to transmit and store music, originally designed for digital music synthesizers. MIDI does not transmit recorded sounds. Instead, it includes musical notes, timings and pitch information, which the receiving device uses to play music from its own sound library.
Before MIDI, digital piano keyboards, music synthesizers and drum machines from different manufacturers could not talk to each other.
MIDI was developed in the early 1980s to provide interoperability between digital music devices. It was spearheaded by the president of Roland instruments and developed with Sequential Circuits, an early synthesizer company that Yamaha purchased in 1987. Other early adopters included Yamaha, Korg, Kawai and Moog.
The first MIDI-compatible instruments were released in 1983.
How does MIDI work?
Most of the audio formats we are familiar with are designed to reproduce the sound exactly, such as an MPEG-1 Audio Layer-3 (MP3) or Waveform Audio File Format (WAV) file. Often, a microphone records the sound, then the sound is transmitted as an analog or digital signal to a speaker, which reproduces and plays the sound. Since MIDI was created exclusively for electronic instruments, it uses a completely different way to send and store music.
MIDI does not send the sound wave made by an instrument; instead, it sends information about the music notes, and the receiving device uses its own internal mechanisms to generate the sounds.
To illustrate how MIDI works, other music formats such as an RCA cable or MP3 files are like sending a phonograph record; a MIDI signal is like the punched paper sheet music of a player piano. MIDI only sends information about the notes, not what they sounded like. It is like recording everything about how the keys are pressed in a piano performance and then using that key press information on a different piano.
The main types of information sent in MIDI messages are as follows:
- Note timings. When to start and stop playing a note.
- Velocity and aftertouch pressure. How hard the key was pressed and held.
- Pitch bend. How much deflection was applied by a bend wheel.
MIDI also sends system information:
- Device control. Start and stop messages.
- Time code. A time clock to keep all instruments in sync.
- Program change. Change which program the receiver is using. This will often change what type of instrument the receiver sounds like.
MIDI can also be extended by SysEx commands, which are added on by the device manufacturer. These can give a device the ability to completely control the receiving device. It also allows MIDI to be used in show control, such as turning on and off lights or animatronics. For example, some amusement park rides use MIDI to trigger sound, motion and effects playback in time with the movement of the ride.
The MIDI protocol uses 8-bit serial transmission with one start bit and one stop bit. It has a 31.25 kilobits-per-second (Kbps) data rate and is asynchronous. Because it is a serial protocol, if a lot of data needs to be transmitted on a single cable at one time, the music might become out of sync or have other timing issues.
Most digital music synthesizers can emulate many different instruments. These are called programs or patches. MIDI can be used to select specific programs on the playing instrument. The General MIDI specification defines many of these instruments to help standardize playback.
What are MIDI cables?
A MIDI cable is a five-pin DIN cable designed to transmit MIDI signal between equipment. In a MIDI cable, only three pins are used: one ground and two in a balanced pair.
MIDI is one way, from transmitter to receiver. The cable must be connected from one device's output to another device's input.
A through port allows multiple devices to be daisy-chained together. One cable can carry 16 MIDI channels.
Some MIDI devices use USB cables. These are common in instruments designed to be used with a PC, such as small keyboards or MIDI interfaces. They use USB to send the MIDI information to the computer.
What are MIDI files?
A MIDI file is saved MIDI data that can be played back by a device. A MIDI file only contains the information about which notes to play, so it will sound different depending on the device that is playing it back. Because these files are very small, they were popular in early video games and for cellphone ringtones.
The standard MIDI file, or SMF, is the file format for sharing MIDI information. It typically had the .mid file extension.
The ubiquity of MIDI music from early video games has led to some bands using game consoles as instruments. This is called chiptunes.
How is MIDI used today?
Due to its ease of use, broad industry adoption and open nature, MIDI is still in wide use today. Most digital audio workstation programs can work with MIDI files. USB-to-MIDI interfaces allow a computer to control a MIDI playback instrument or an external music keyboard to control the computer.
Most digital electronic instruments are MIDI compatible. This includes equipment such as synthesizers, sequencers, drum machines, keyboards and electronic drum kits. Some people also make their own specialized MIDI-compatible controllers for performances. For example, an artist might place sensors in their clothing that trigger MIDI notes and then play a song by tapping on their arms or legs.
MIDI advantages and disadvantages
MIDI technology has several advantages and disadvantages.
MIDI advantages include the following:
- open standard
- wide adoption
- easy to implement
- small file size
MIDI disadvantages include the following:
- does not specify the final sound
- inexact timing
- cannot reproduce speaking and singing
See how music composed by artificial intelligence breathes new life into video games.