For this project you will need version 1.6.3 of the Arduino IDE with the Adafruit Arduino Board Manager proxy added to your Arduino preferences. If you haven't configured the proxy yet, check out our guide on setting up your Arduino IDE to use the proxy.

Virtual MIDI Synths

You will need a virtual MIDI synth installed on your computer for this project. For Windows, the best one seems to be VirtualMIDISynth, and for OS X SimpleSynth is your best bet.

Installing the Arduino Library Dependencies

You will need to install a few things using the new Arduino Library and Board Managers. First, open up the Arduino Library Manager under the Sketch->Include Library menu. Select the Manage Libraries... item from the menu.

You will need to use the search box to find and install these three libraries:

  • FifteenStep
  • Adafruit NeoPixel
  • Adafruit MPR121

Adding USB MIDI Support

Next, you will need to install USB MIDI support for the Leonardo using the Boards Manager. Click on the Boards Manager item under the Tools->Board menu.

Search for MIDI using the search box, and install the Leonardo & Micro MIDI-USB package.

Next, make sure you have selected the Arduino Leonardo (MIDI) from the Tools->Board menu, and plug in the Leonardo to your computer's USB port using a micro USB cable.

Now we are ready to open the example sketch. Open the neo_mpr121 example from the File->Examples->FifteenStep menu. The example code is heavily commented, so we won't go into too much detail here. If you have any problems with it, please file an issue on GitHub.

Next, upload the example sketch to your Leonardo using the right arrow icon at the top of the sketch window.

If everything goes as expected, you will see a Done Uploading message at the bottom of the window.

Running the Example

Now that you have uploaded the sketch, you should see a sequence running on the NeoPixels. Open up your software synth that you downloaded earlier, and select the USB MIDI device as your input source. Then select a drum set from the list of available instruments. I'm using the TR-808 patch in SimpleSynth on OS X. Press a few of the pads, and your drum machine should save them to the sequence and play them back through the MIDI software synth.

Next, we will look at the simple user interface in the example sketch.

This guide was first published on Apr 29, 2015. It was last updated on Apr 29, 2015.

This page (Code) was last updated on Apr 24, 2015.

Text editor powered by tinymce.