Learn Piano Game Play free
Home › Guides › Keyboards, MIDI and Bluetooth › What Is MIDI and How Does It Work on a Piano?

What Is MIDI and How Does It Work on a Piano?

MIDI is a standard way for a digital piano to send instructions (which key you pressed, how hard, and when) to a computer, phone or app. It carries no sound itself, only the information needed to make sound somewhere else.

MIDI stands for Musical Instrument Digital Interface. It is a shared language that lets a digital piano, a computer, a phone and music apps understand each other. When you press a key, the piano sends a tiny message saying which key you pressed and how hard, and no audio travels through the cable at all.

MIDI is instructions, not sound

This surprises many beginners. MIDI is closer to sheet music being played live than to a recording. The message says play this note now, fairly softly, and something else decides what that note sounds like. That something can be the speakers inside your digital piano, a piano app on your tablet, or a game.

This is why the same performance can be heard as a grand piano, an organ or strings without you playing any differently. It is also why MIDI files are tiny compared with audio recordings: they store instructions, not sound waves.

What is inside a MIDI message

MIDI has been around since 1983 and is still the standard today. Each message is only a few bytes long. These are the ones a piano player meets most often:

MessageWhat it tells the receiverExample
Note onA key went down, with a note number and a velocityYou press a key firmly
Note offThe key came back upYou let go
Control changeA pedal, knob or slider movedYou press the sustain pedal
Program changeSwitch to a different soundPiano to strings
Pitch bendA wheel was movedBending a synth note

Two numbers matter most. Note numbers run from 0 to 127. A full 88-key piano covers 21 to 108, and middle C is usually number 60. Be aware that software disagrees on the octave label for number 60: some programs call it C3 and others C4. The number is the same, only the name differs.

Velocity also runs from 0 to 127 and describes how fast the key was moving when it went down. That is how an app knows whether to play a note loudly or softly. A keyboard without touch sensitivity sends the same velocity every time, so every note sounds equally loud.

MIDI also has 16 channels, which let one cable carry several instruments at once. For a single piano you will rarely need to think about this.

How a digital piano creates MIDI

Under each key there is a sensor. Many keyboards use two contacts per key and measure the tiny time gap between them to work out velocity, although the exact design varies between models and brands. The keyboard's electronics turn that into a note on message, and later a note off message when you release the key.

The same message usually goes two places: to the keyboard's own sound engine, so you hear it, and out of the MIDI port, so other devices can use it. If you connect to an app that also plays a piano sound, you might hear two sounds at once. This guide explains why and how to fix it.

USB, Bluetooth and 5-pin connections

MIDI can travel in three common ways:

If you want to link a keyboard to a phone, how to connect a keyboard to a phone walks through the steps.

What you can do with MIDI

Once your piano speaks MIDI, a lot opens up:

Keyfall, the free game on this site, can read a digital piano over USB MIDI or Bluetooth MIDI and checks each note you play. If you want to try it, here is how to use a MIDI keyboard with a piano game.

What about acoustic pianos?

A traditional acoustic piano has no MIDI output. Some can be fitted with add-on systems, but that is a specialist upgrade. The simpler option is a microphone, which listens to the sound and tries to work out the notes. Keyfall supports this too. A microphone has to guess from the audio, while MIDI knows exactly which key was pressed, so MIDI is generally more reliable when you have a digital piano.

Quick fixes when MIDI does not work

MIDI sounds technical, but for a beginner it comes down to one idea: your piano tells other devices what you played, and they decide how it sounds.

More about keyboards, midi and bluetooth

61 keys or 88 keys: which should a beginner choose?What should you look for in headphones for a digital piano?What is the right keyboard stand and bench height for piano practice?Bluetooth MIDI vs USB MIDI: which should you use?Can you use Bluetooth headphones with a digital piano?Digital piano vs keyboard: which should a beginner buy?Do You Need a Driver for a USB MIDI Keyboard?Do you need a sustain pedal on a digital piano?

FAQ

Does MIDI record sound?

No. MIDI records which notes you played, when, and how hard, not the audio. That is why the files are very small and why you can change the sound afterward.

Do I need MIDI to learn piano?

No. You can learn on any piano or keyboard without ever using MIDI. It is simply a useful extra for apps, games and recording.

Can any digital piano use MIDI?

Most modern digital pianos have USB MIDI, Bluetooth MIDI or both, but very basic or older models may not. Check the ports on the back or the manual for the word MIDI.

Is MIDI the same as USB?

No. USB is a type of connection, and MIDI is the language sent over it. Many keyboards use USB to carry MIDI messages, but MIDI can also travel over Bluetooth or 5-pin cables.

Why does my phone not see my keyboard?

The connection method may not match: a phone may need an adapter for USB, or Bluetooth pairing may need to be done inside the app or browser you are using. Try another cable and check that the keyboard is switched on and in the right mode.

Does MIDI make my piano sound better?

It can, because it lets software play a different or higher quality piano sound than the keyboard's own. The quality depends on the app or software that receives the notes.

Practise it on your own piano. Keyfall is a free piano game: notes fall toward the keys and you play them on a digital piano, keyboard, phone or computer.

Play free