This is the back of the panels. Any hole that holds an LED was drilled twice: 5mm all the way through for the LED to stick out through, and 7mm part way through to allow the LED bevel to go through to the required depth. 123 holes drilled in this panel, and a few less in the other which has a 7" touchscreen panel instead of the status LEDs, shutdown bottons, and power switches. Making sure everything was in the correct place and nice and neat was definitely an exercise in 'Measure twice, cut (or drill in this case) once.' The zig-zag black wire is the ground lead going between LED cathodes, and it also serves to hold the ribbon cable in place.
) I have four already, and will probably end up with six of these in the end, stacked two on top of each of three RPIs. One monitors the notes and the other the stops and controls the stop indicator LEDs.
The code is purely in Python, which is just about fast enough at the moment. One program monitors the hardware and sends a UDP packet to the other on any status change (note up/down, stop or preset pressed). The second uses the python interface to fluidsynth to generate the sounds. For a single keyboard the two could have been combined, but splitting them allows the couplers to come in to play, where one keyboard generates notes based on the active stops of another. I would like to add some kind of save/replay functionality, but capturing the state across all the RPIs in a suitably synchronised fashion (and then retransmitting it for playback) presents a challenge, especially if I want to be able to play along on top of a recording as well.
I've seen mention of direct MIDI connections, quite possibly from some of TonyD's posts, or there is the possibility of using USB MIDI ports. Although I started by using the MIDI library which is part of PyGame, some upgrade or other stopped it working, so there is no longer any MIDI involved at all. And as I mentioned before, the low baud rate introduces too much latency with big chords. Coupling the keyboards together would have been a problem too, although there are ways of handling MIDI over a network.
Any single cable ends up going to either the power rails or to a GPIO pin. The ribbon cables go to a dual MPC23017 board (