Arduino controlled Analog Synthesizer

MIDI control from PC to control voltage

The original MIDI protocol ran over a serial UART framed bit stream, at 31.25 KHz. The data connection is one way, and optically isolated at the receiving end. The connector used is a 5 pin DIN connector. Now the MIDI protcol can be carried over the USB bus, or even Ethernet.

MIDI on Wikipedia
MIDI 1.0 specificatioin

MIDI byte protocol

The MIDI byte protocol, starts out simple, but can get very involved as more features are used. The first byte is the command, with upper nibble basic function like note on/off. The lower nibble is the channel number, of which there are 16 possible channels.

List of byte sequence in the MIDI stream

  • 1st - Status byte has two nibbles, the high nibble represents the message type, the low nibble represents the channel number (0-15)
  • 2nd - For Note on message, the first data byte specifies the note number (0-127). Piano keyboard has 88 notes (21-108 on MIDI note number). Middle C is 60.
  • For Note on message, the second data byte specifies the velocity (1-127). Velocity indicates how hard or how fast you press the instrument.



Arduino Libary for MIDI control

Here is a simple example of Arduino code to accept MIDI commands and send output to Audio. In the Arduino IDE, look under the files menu for Examples, and scroll down to the MIDI code examples.

MIDI with Arduino
MIDI Device - Listens


MIDI Controller - Talks