Enigmastation.com

Joseph Ottinger's blog

Alcyone Beta: MIDI end-to-end with the Raspberry Pi

Saturday, I hooked up the Raspberry Pi to a MIDI connector, and then hooked that up to an Arturia synth: we now have end-to-end MIDI from the Pi to a MIDI device. Baud rates worked out, note on and note off signals went through as intended (although I sent them on the wrong channel).

That means that Alcyone Beta’s physical milestones have been passed.

I’ve already detected the switched inputs on the breadboard on the Pi through the chained MCP23008s. (That was the first milestone for Alcyone Beta, actually.) That means I can detect pedal presses.

The MIDI connection was the other physical test, and the one I was most concerned about, since the RX/TX on the Pi doesn’t naturally support the right baud rate for MIDI. I found a few references on how to fix this, and this did the trick:

  1. First, modify /boot/config.txt to make sure it contains the following lines:

    For me, they’re at the end of the file.

  2. Change /boot/cmdline.txt to remove the serial console on RX/TX, by changing the line to look like this:

    This is supposed to be ONE line, not two.

  3. Uncomment the TTY in /etc/inittab:

Anyway, this underclocks the serial line and frees it up for programmatic use. Setting it to 38400 baud ends up writing at 31250 baud (because it’s underclocked); hello, MIDI baud rate.

Now I can use wiringPi’s serial library (for example) and write MIDI data.

So the next milestone is simple: I write a program to translate the inputs from the pedals (the chained MCP23008s) into MIDI data, which should be a fairly straightforward port from the Alcyone Alpha code (the Arduino codebase, in other words.)

And now I get to go back to a more traditional C/C++ environment, too, which will be nice. The Arduino IDE is convenient, but constraining.

I’ll need to work out boot processes for the Pi in a way that makes me happy – and I’ll also need to address display and input capabilities. This will all boost the effective cost of the Alcyone Beta to a respectable amount – from the Alcyone Alpha’s investment of about $100, we’re looking closer to $250 or so estimated for the Beta’s implementation.

But I’m not building this for a production line, just for myself; the implementation cost is only for my personal gratification. After that $250, I’d have a portable sonic platform, controlled by foot pedal (and other mechanisms, too!), expandable and rather overpowered until I come up with more uses.

And it’s fun, which is a win all around.

Leave a Reply

Enigmastation.com © 2014 Frontier Theme
%d bloggers like this: