I used Claude to help code an interactive lesson to help musicians understand how MIDI works. Please feel free to share if this is helpful to you.
MIDI for Beginners
MIDI isn't a recording. It's closer to sheet music, or the holes in a player-piano roll: a list of instructions such as “press middle C, fairly hard” or “lift the sustain pedal.” A keyboard sends these instructions, and whatever receives them (a synth, a piano app, notation software) decides what they should sound like.
Each instruction is sent as a short group of numbers, usually three. This page lets you play and watch those numbers go by, then explains what each one means. No coding knowledge needed.
Start here
Five ideas cover most of what MIDI does. You'll see each of them in action in the lab below, and a checklist at the end of the page ticks itself off as you try things.
Messages, not sound
Press a key and the keyboard sends a “key pressed” message. Let go and it sends “key released.” The sound itself is made by whatever is listening. That's why the same MIDI part can be played back as piano, strings, or drums.
Everything is 0 to 127
Notes, loudness, knob positions, and sound choices are all numbers from 0 to 127. Middle C is note 60. A knob turned all the way down is 0; all the way up is 127.
Velocity is dynamics
Velocity means how hard (really, how fast) a key was struck. Low numbers are soft, high numbers are loud, roughly from ppp near 1 to fff near 127.
16 channels
One MIDI cable can carry 16 separate parts, like 16 staves in a score. A synth set to channel 2 plays only what's addressed to channel 2, so one cable can drive bass, piano, and drums at once.
Knobs and pedals have numbers too
Every knob, slider, and pedal is a “controller” with its own ID number. The sustain pedal is controller 64, the mod wheel is 1, volume is 7. Moving one sends its new position, 0 to 127.
How to read the numbers on this page
MIDI gear often writes numbers in “hex.” Hex counts up to 15 in a single digit by borrowing letters after 9:
You never have to convert it yourself. Wherever this page shows hex, the everyday number is right beside it. A few you'll see often:
Why bother with hex? Because the first number of every message holds two facts, and in hex each digit is one fact:
Why does 0 mean channel 1? Computers start counting at 0, so channels 1 to 16 are sent as 0 to 15.
The lab
Play the keyboard, move the wheels, or change the settings. Each thing you do is turned into a MIDI message, and you'll see its numbers appear under “What was just sent.” The small synth built into this page hears only those numbers, just like a real synth on the other end of a MIDI cable. Sound starts after your first click or key press, so turn your volume up a little.
Controller
MIDI OUTbend
CC 1
Computer keys: A to ' play white keys, W E T Y U O P play black keys, hold Space for sustain, Z/X shift octave.
What was just sent
MIDI INPlay a note to see its message here. The first number says what kind of message it is and which channel it's for. The next numbers give the details, such as which note and how hard.
Message history
| Gap | Numbers (hex) | Ch | Message | Detail |
|---|
Newest at the top. “Gap” is the time since the previous message, in milliseconds (thousandths of a second). This is how MIDI captures rhythm: there's no tempo or note length in a message, just when each key goes down and comes back up. A MIDI file saves these gaps alongside the messages, which is why it can play your performance back with your exact timing.
How a message is built
Inside the cable, every number travels as a byte: a row of eight tiny on/off switches, written as 1s and 0s. (That's what “binary” means. Tick “Show binary” in the lab to see them.) MIDI uses the first switch as a flag. If it's on, the number starts a new message. If it's off, the number is a detail belonging to the message before it. That way an instrument always knows where each message begins, like a bar line in a score.
First number of a message · “status”
The first switch is on. The next three switches (t) say what kind of message it is, such as “key pressed” or “pedal moved.” The last four (c) say which of the 16 channels it's for. In hex this reads neatly as two digits: 90 is “key pressed” (9) on channel 1 (0).
The numbers after it · “data”
The first switch is off, leaving seven switches for the value. Seven on/off switches can make exactly 128 combinations, which is why almost everything in MIDI runs from 0 to 127: notes, velocities, knob positions, and sound numbers.
The seven everyday messages
These seven cover nearly everything a performer does. Press “Try it” to send one through the lab and hear it. Notes let go on their own after a moment. Examples use the channel chosen in the lab.
| Starts with | Message | What it means | The details that follow | Example |
|---|
Note numbers
MIDI doesn't use letter names. Every key gets a number instead, counting up by half steps: middle C is 60, C♯ is 61, D is 62, and so on. Up an octave is always +12, so the C above middle C is 72. The full range is 0 to 127, wider than any piano. Drag the slider or click the strip to explore.
A heads-up: brands disagree on octave names. Some call note 60 “C3” instead of “C4.” The note number is the same either way, which is one reason MIDI uses numbers.
Why the math? A synth needs a pitch in Hz (vibrations per second), and MIDI only gives it a note number. Starting from A440 (note 69), each half step multiplies the frequency by about 1.06, so 12 half steps double it, which is an octave. That's standard equal temperament.
Translate MIDI numbers
Sometimes you'll meet raw MIDI numbers: in a manual's chart, a MIDI monitor app, or a forum post about fixing a setup. Paste them below (in hex, the way they're usually written) and this translator turns them into plain English.
The sample shows a shortcut called running status. After the first “key pressed” message (90 3C 64), the next two notes skip the first number entirely, because when a message starts without one, the instrument assumes “same kind as last time.” It's a bit like writing “sim.” in a part instead of repeating a marking. Early MIDI cables were slow, so saving numbers kept big chords tight.
Your MIDI checklist
Try each task using the lab and the translator above. The page watches the MIDI messages you send and ticks each task off by itself when you've done it. Stuck? Open “How” for a hint.
All done! You've sent every everyday kind of MIDI message, and read one you wrote yourself. That covers most of what MIDI does in a real studio.
Words you'll see
A quick reference for terms that show up on gear, in software menus, and in manuals.
- MIDI
- Musical Instrument Digital Interface. A shared language, agreed on in 1983, so instruments and software from different companies can talk to each other.
- Message
- One instruction, such as “key pressed” or “pedal down.” Usually two or three numbers long.
- Note On / Note Off
- The messages for a key going down and coming back up. Note length is simply the time between them.
- Velocity
- How hard a key was played, 1–127. Synths usually make higher velocities louder and often brighter.
- Channel
- One of 16 separate lanes on a single MIDI connection, like separate staves in a score. Drums are traditionally on channel 10.
- Control Change (CC)
- A message saying a knob, slider, or pedal moved. Each control has an ID number: 1 mod wheel, 7 volume, 10 pan, 11 expression, 64 sustain.
- Program Change
- A message that switches sounds, like choosing a preset or patch.
- General MIDI (GM)
- A standard list of 128 sounds in a fixed order, so program 0 is piano and program 40 is violin on any GM instrument. Some gear counts these from 1 instead of 0.
- Pitch bend
- The wheel or lever that slides pitch. It uses extra-fine steps (16,384 of them) so slides sound smooth.
- Aftertouch
- Pressing harder into a key you're already holding. Often used to add vibrato or swell.
- Byte
- A single number as a computer stores it: eight on/off switches. MIDI sends everything one byte at a time.
- Hex (hexadecimal)
- Writing numbers in base 16, using 0–9 and A–F. MIDI charts use it because the first digit and second digit of a status number each mean something.
- Status / data
- The first number of a message (what kind, which channel) and the numbers after it (the details).
- System Exclusive (SysEx)
- Brand-specific messages for things the standard doesn't cover, like saving a synth's patches. Always starts with F0 and ends with F7.
- MIDI clock
- A steady tick, 24 per quarter note, that keeps drum machines and sequencers in tempo with each other.
- MIDI file (.mid)
- A saved list of messages with their timing. Small, editable, and openable in any DAW or notation program.