MIDI to Arduino – USB Edition

Yet another delay in the camera shipment date. And, because I’m an optimistic fool, I returned the cheap-ass on-camera monitor I’d gotten, and back-ordered the on-camera monitor from the same company the camera is back-ordered from. At this rate the camera and monitor will ship in January.

As I wait, I forge on with the next phase of the camera control – automation. How to make repeatable camera adjustments? Make the Iris breathe to the beat? I am going to make it happen with Midi.

There has been a very whole lot written about midi serial and arduino, and usb and arduino, and bluetooth and arduino, and bluetooth and midi. And somehow, I couldn’t find anyone who was trying to do what I am trying to do – connect a midi control device to an arduino through bluetooth le with a USB Host shield and a bluetooth dongle. There are lots of things close:

I am currently using a sample script that comes with the USBH library by Yuuichi Akagawa, with some inspiration from Dave at Notes and Volts and his Reading CC Messages. I just added a few lines to the example USBH_MIDI_dump sketch.

The sketch reads everything coming in the Serial port, then prints it. I added an if that reads the bit that I want from the stream. If I want to see if a note was started I can compare if(bufMidi[1] = 144){}.

I can control the LEDs on the Arduino with the knobs on the midi board. I can start and start ‘recording’ with a drum pad.

Up next: Automation at last – use a midi sequencer out from the iPad to control the Arduino. First make it work over USB, then bluetooth.

2017-05-04T16:13:53+00:00 November 12th, 2015|Tags: , |