mixture-art@Q
技術+アイディア+世俗+なんとなく思ったこと、すべての融合がmixture-art
Arduino MIDI Controller @Maker Faire by “kuz lab”

The project called “Arduino MIDI Controller Project”, it’s succeeded to exhibit at Maker Faire in Bay Area.
As for record and help for undestanding what this project made, here I wrote some explanatinos.

First of all, let’s see the video of first prototyping.

What Arduino does?

For ease of understand, here is the case only six switches and one slider.

assign_map.h describes just pin confgurations as below.

How Arduino signal converted to MIDI signal?

Simply thinking “how can I read MIDI signal from external device?”, here would be two typical solutions, use USB MIDI or use MIDI signal and connect it to Mac through USB MIDI Converter.

However… for Arduino, it is possible to write USB MIDI Driver on Arduino micro controller but usually it needs ISP(In System Programmer) tools. It’s not comfortable for happy, easy DIY life!
Generating MIDI signal and put converter before Mac… it’s messy.

Finally I chose to connect USB Serial signal(default) to Mac. And then, it’s translated to CoreMIDI signal by Python code.
Here is Python code working on Mac.

Before execute this code, please install “simplecoremidi” and pyserial.

sudo pip install simplecoremidi

sudo pip install pyserial

F.Y.I. From line 6 to 24, it’s detecting USB Port automatically.

I confirmed these codes on Yosemite.

Maker Faire version

These codes above are simplified for ease of understand.
Actually I’m using over 10 switches and 5 analogs, 2 USB devices and 1 BLE devices.
The final version for Maker Faire demo,

github link
https://github.com/kuzlab/midi_controller_pj

If you did not visit “kuz lab” boose at Maker Faire yet, please check #50521 in ZONE2 EXPO hall!