… or simply “MIDI” - is the standard language spoken by digital music controllers.

a MIDI controller, like this keyboard,

sends data over to the computer every time I press a key,

and every time I release a key.

MIDI messages don’t contain any actual audio data -

they describe input from the user,

such as when a note begins & ends,

how hard a key was pressed or what other type of control was changed by the user.

All of the audio sample data here is stored on my computer.

MIDI simply tells the computer what sample to play and when.

Originally, MIDI was designed to be used

over one of these “5-pin DIN” cables.

But nowadays MIDI controllers are more likely

to send data over a standard USB cable.

Though it’s a different hardware connection,

it’s basically the same MIDI messages being sent.

and speaking of …


A basic MIDI message consist of three bytes, each byte containing 8 bits

For example, let’s take a look at a “note on” message …

The first byte is called the status byte

and it describes what kind of message is being sent

and what channel it’s being sent on.

The second byte tells us which note is being controlled.

The third byte tells us how hard the note was pressed

- this is known as “velocity”

Additional MIDI message types include note off events,

pitch bend, and other controller messages such as modulation.

But MIDI doesn’t have to be sent from a keyboard,

we can program a microcontroller,

like this Arduino, to send whatever MIDI messages we want.

For example … here I have an Arduino sending MIDI note messages

to a Music Maker shield which interprets those messages

just like a computer and plays back audio samples.

But instead of keyboard keys determining which notes are played,

the Arduino is using readings from a small photosensor to determine each note’s pitch.

Or for something a bit more traditional, we could use these piezo triggers as drum pads.

So, MIDI is not limited to just keyboards. You can do a lot with it. It’s quite versatile. I like it so much, that I named my cat Midi. No Really, I did.

Midi - Midi - come here, come here!

This guide was first published on Jun 11, 2014. It was last updated on Mar 08, 2024.

This page (Transcript) was last updated on May 20, 2014.

Text editor powered by tinymce.