Thanks to being able to blow it all up and start over, this is the "current" BeagleBoargan way of doing things. I call it the "web application", despite the fact it's considerably more than just that, for no other reason than to distinguish it from its Qt predecessor. Even though nobody would know about the Qt version, I stuck with it.
This is a from-the-ground-up rewrite (although not really as it borrows heavily from my Tommy project's event system) in C which uses a jQuery UI interface talking to a WebSocket instead of X11. A byproduct of the switch is this version is much more modular and not tied to any particular method of control so, for example, an OSC or dbus interface could be developed quite quickly.
At its core, this is basically one big event loop that sits idle until one of its modules generates an even that interests another. A common example would be the Linux-side component of SIDI receiving a MIDI event dispatched by the ALSA bridge and passing it off to the Arduino over the serial port.
Another common example would be the WebSocket interface dispatching a "control" event, which is then interpreted by the SIDI module and the appropriate SysEx message generated and sent over the serial port. This can all happen across many different threads and I've done my best to keep everything safe, but something thing here or there might break under odd circumstances.
The build system is kind of screwy but make run should get you something that works on a BeagleBone with the Debian image. You might need to install some additional packages but nothing you really wouldn't expect or have anyways. Modules can be added by creating new .mk files, including them in the Makefile and adding their targets.
Large swaths of the code are without documentation, but I've been doing my best to ensure the code is self-commenting to a certain degree, so you shouldn't really have any problems following along.
After launching successfully, the last log line appearing on the terminal should be:
> kphoned: System ready
To verify it's actually there, we use the aconnect command as with the Qt application. Note that this iteration registers itself as an output and three input devices:
jay@devbone:~$ aconnect -o client 128: 'Kraslophone' [type=user] 0 'SIDI ' jay@devbone:~$ aconnect -i client 0: 'System' [type=kernel] 0 'Timer ' 1 'Announce ' client 128: 'Kraslophone' [type=user] 1 'Solo ' 2 'Accompaniment ' 3 'Pedals ' jay@devbone:~$
To stop the application, simply press ^C on the terminal, use the kill command, or just play with it until it crashes.
Now that we've got that working, it's time to pick up the soldering iron and spend a lot of time whipping up some shift registers.
- The kphoned application lives here
- make run should get you going
- The web interface is on port 31337 by default
- SIDI will assume the Arduino is on /dev/ttyACM0 by default