MIDI, first established back in 1983, is the defacto standard for digital music notation. MIDI messages are relatively easy to understand and generate – and open up a variety of interesting project ideas using a microcontroller.

Also – MIDI makes for an excellent pet name.;)

MUSICAL INSTRUMENT DIGITAL INTERFACE

… 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 …

MIDI MESSAGES

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!

What is MIDI?

from Wikipedia

MIDI (short for Musical Instrument Digital Interface) is a technical standard that describes a protocol, digital interface and connectors and allows a wide variety of electronic musical instruments, computers and other related devices to connect and communicate with one another. A single MIDI link can carry up to sixteen channels of information, each of which can be routed to a separate device.

MIDI carries event messages that specify notation, pitch and velocity, control signals for parameters such as volume,vibrato, audio panning, cues, and clock signals that set and synchronize tempo between multiple devices. These messages are sent to other devices where they control sound generation and other features. This data can also be recorded into a hardware or software device called a sequencer, which can be used to edit the data and to play it back at a later time.

MIDI technology was standardized in 1983 by a panel of music industry representatives, and is maintained by the MIDI Manufacturers Association (MMA). All official MIDI standards are jointly developed and published by the MMA in Los Angeles, California, US, and for Japan, the MIDI Committee of the Association of Musical Electronics Industry (AMEI) in Tokyo.

Advantages of MIDI include compactness (an entire song can be coded in a few hundred lines, i.e. in a few kilobytes), ease of modification and manipulation and choice of instruments.

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