Start here
MIDI in five minutes
MIDI is how musical instruments and computers tell each other what to play. It doesn't carry sound: it carries instructions, like “press middle C, fairly hard” and “let go of it now”.
What MIDI is, and isn't
MIDI (Musical Instrument Digital Interface) is a standard from 1983 that lets keyboards, drum machines, synths, computers and apps from any maker work together. A MIDI connection sends short messages describing a performance: which key went down, how hard it was struck, when it was released, which knob moved and where to.
Because MIDI is instructions, not audio, the sound comes from whatever receives it. The same MIDI notes can play a grand piano in one app and a drum kit in another. That's also why MIDI files are tiny: a whole song is a few kilobytes of “play this note now” rather than megabytes of recorded sound.
What travels down the cable
Most of what you'll ever see is a handful of message types, each a few bytes long:
| Message | What it says | Example |
|---|---|---|
| Note On / Note Off | A key went down or came up, with its note number and how hard (velocity, 1–127). | Middle C is note 60 |
| Control Change | A knob, slider, wheel or pedal moved to a value from 0 to 127. | Sustain pedal is controller 64 |
| Program Change | Switch to a different sound or preset. | Program 1 is “Acoustic Grand Piano” in General MIDI |
| Pitch Bend | The pitch wheel moved, with fine resolution. | Centered is “no bend” |
Each message is sent on one of 16 channels, so one cable can drive 16 different sounds at once: piano on channel 1, bass on channel 2, and so on. Notes are numbered 0 to 127, a little over ten octaves. Messages shows exactly how these are encoded, byte by byte.
How gear connects
- USB is the most common today. Most controllers are “class compliant”: plug them into a computer, phone or tablet and they work without a driver.
- 5-pin DIN cables are the classic MIDI connection, still on most synths and drum machines. Smaller gear often uses 3.5 mm TRS jacks with an adapter to DIN. Data flows one way per cable: OUT on one device to IN on the next.
- Bluetooth (BLE-MIDI) and network MIDI carry the same messages wirelessly or over Ethernet and Wi-Fi.
See Transports for the details of each.
Three common setups
- Controller → computer. A USB keyboard or pad controller makes no sound itself; a DAW or software instrument on the computer turns its notes into audio.
- Keyboard → synth. One instrument's MIDI OUT plays another's MIDI IN, so you can play the synth's sounds from a better keyboard.
- Computer → hardware. A sequencer or DAW sends notes and clock to drum machines and synths, so they play back parts in time.
MIDI files
A .mid file stores timed MIDI messages, usually one track per instrument. To hear one, something has to
play the notes: a software synth, a DAW, or the MIDI Reader on this site. Most files are
written for General MIDI, a shared map of 128 instrument sounds plus drums on
channel 10, so they sound roughly right on any compatible player.
What about MIDI 2.0?
MIDI 2.0, published in 2020, adds much finer resolution, more channels, per-note control and devices that can describe their own capabilities. It is designed to work alongside MIDI 1.0, which remains what almost all gear speaks today. Start with MIDI 1.0; MIDI 2.0 & UMP covers the new format when you need it.
Two common misconceptions
- “MIDI sounds cheap.” MIDI has no sound of its own. It sounds as good as the instrument that plays it.
- “MIDI is obsolete.” It's in nearly every keyboard, controller, DAW and phone music app, and its 1983 messages still work unchanged.
Try it now
- Plug in a controller and watch its messages in the Web MIDI monitor (Chrome, Edge, Firefox or Opera on a computer).
- Open a
.midfile, or one of the demos, in the MIDI Reader and see every note and byte. - Play free instruments on the Samples page with your mouse, keyboard or controller.
- Then read Messages, Notes & Pitch and Control Change, in that order.
Spotted an error? Edit this page on GitHub.