Arduino USB MIDI tutorial

The following description will work with Atmega32U4 Arduino Boards.

TOOLCHAIN

  1. download the arduino ide: www.arduino.cc
  2. install the arduino ide
  3. install the MIDIUSB library: Sketch -> Include Library -> Library Manager… -> search for “MIDIUSB” -> install
  4. load the midi example to the arduino board: File -> Examples -> MIDIUSB -> MIDIUSB_write -> upload
  5. open your favourite midi software and choose arduino as midi input
  6. now you should get midi events every second

 

MIDI BASICS

  • 3 byte message
  • 4 byte if you are using USB

standard MIDI message:

  • 1st byte: message type (0..7) and channel (0..15)
  • 2nd byte: id (0..127)
  • 3rd byte: value (0..127)

most used message types (www.midi.org -> specs -> midi reference tables -> summary of midi messages):

  • 0x08: note off
  • 0x09: note on
  • 0x0B: control change (cc)

example messages:

 

First example – Button

EXAMPle 2 – KEYBOARD

EXAMPle 3 – ANALOG I

 

example 4 – Analog II