For my third keyboard, I decided that I wanted an instrument that ran Linux. Ever since Ubuntu announced a supported real-time kernel, I been wondering if that could be used as the basis for a stage instrument. Since there’s nothing like what I wanted on the market, I set out to build my own.
I bought a used keyboard (with a stand) for $100 on ebay. The seller was local, so I drove over, checked the condition of the keyboard, paid him, and drove off with it. It’s a Williams Allegro Model 1, which doesn’t have a great reputation, but that’s primarily due to the poor quality of its sound engine. It’s got 88 keys, weighted action, with a MIDI interface, and that’s all I need for my purposes.

I started out by setting up a laptop next to the keyboard, connecting it with a cheap USB MIDI interface, and listening to it with headphones plugged into the laptop. After trying several combinations of operating system and software, I settled on Ubuntu 24 for an operating system and Ardour for a DAW (Digital Audio Workstation). Then I replaced the laptop with a Raspberry Pi 5 with an add-on sound card (a HiFiBerry DAC2 ADC Pro), wired the sound card into the keyboard’s amplifier stage, and mounted the Raspberry Pi and the HiFiBerry inside the case.
Here’s what the internal circuits looked like before:

and after (the Raspberry Pi and the HiFiBerry have been mounted to the left):

I also decided to add connectors for some of the Raspberry Pi’s interfaces, as well as the audio input to the HiFiBerry. Here’s a closeup on the rear of the keyboard, showing the extra (unlabled) ports I added on the left for audio, Ethernet, HDMI, and USB:

Ubuntu 24 has a real-time kernel available for both Intel/AMD and ARM architectures, which I think makes a world of difference, though people working on the Ubuntu Studio project swear by their low latency kernel. A real-time kernel allows threads to be elevated to real-time priority, which enables them to preempt everything else running on the system.
Ardour. I remember reading that Paul Davis wrote jack and some other program that I didn’t know anything about. That other program is Ardour! Basically, jack is a server and a library that allows MIDI and audio to be routed around between the programs in a Linux system. Ardour presents a user interface similar to the mixing board in a sound studio. I’ve got a X11 VNC server configured to start on boot, and Ardour configured to start automatically, load a default session and go into full-screen mode. Then I just connect a tablet to the WiFi and use a VNC client to connect the VNC server. It looks like this:

Since I play a lot of classical piano music, I used Salamander all the time.
The original sound engine had no percussion voices to speak of, but there are many free drum samples available. My personal favorites are the AVL drumkits, especially the Black Pearl, which I use all the time, since I’ve got the metronome programmed to play the bass and snare on this drum kit.
How much did it all cost? That’s a little hard to say. Do I count things like the soldering iron or the headphones? How about the hole saw I needed to drill the larger holes in the case? If I drop all of those costs, and just add up the hardware itself, it was just over $500:
| Williams Allegro 1 (with stand) | $ 100.00 |
| Foot pedal | 14.09 |
| 12V power supply | 10.00 |
| Raspberry Pi 5 w/ active cooler | 137.59 |
| HiFiBerry DAC2 ADC Pro | 78.90 |
| Jacks (dual USB, Ethernet, HDMI) | 41.00 |
| Audio jack wired to stereo plug | 20.00 |
| 12V-to-5V converter | 10.00 |
| USB-MIDI interface | 8.69 |
| Custom PCB | 18.84 |
| Screws and nuts to mount Pi and HiFiBerry | 12.00 |
| MIDI jacks, 8 wire cable and header, 6 wire cable and headers, headers for power | 46.15 |
| USB cables (internal wiring) | 10.00 |
| Audio Isolation Transformers | 6.50 |
| Total | $ 513.76 |