Multi-Channel Audio for the Rasperry Pi - Part 2: The Octaphon project

In my last post, I said that was going to do a prototype 8-Out, 2-In HAT prototype PCB to continue this effort. I did so, made a few changes, and then did a small production run of 5 assembled boards:

This HAT has 8 unbalanced line outputs, each of which (signal and analog ground) is presented on adjacent pairs of standard 0.1" header pins. 2 line inputs are unbalanced by default, but can be configured for balanced operation by cutting a solder jumper on the PCB. Analog ground, 3.3V and a common-mode reference (1.5V) are also available on the 2x12 header with the thinking that a flat cable could connect to a balanced I/O board with audio connectors (not currently designed.)

This is not an audiophile board. The analog section is designed with the same philosophy as my SparkFun products: Separate analog power regulator, careful separation of analog and digital ground planes, but no electrolytic caps, so you can expect the audio performance to be quite similar to the WAV Trigger and Tsunami.

Now, regarding the software... I'm currently working on an open-source, 8-channel, polyphonic, low-latency player for the Raspberry Pi that I'm calling Octaphon. It is written in C++ using the Juce framework, and for the time being anyway, is specifically written for this HAT. It uses the Alsa Sound Architecture, and could pretty easily be adapted to work with standard stereo HATs, but that's not on my radar at the moment - I'm more interested in multi-channel support.

The application reads an Excel-generated csv file on startup that describes all the sound files to be loaded, with loop point information if desired, as well as function assignments for MIDI notes. Each MIDI note can trigger from 1 to 8 sounds, and each sound can be pitched up or down by a number of semitones as well as directed in any combination and volume levels to any or all outputs. This means, for example, that stereo, 5.1 or 7.1 surround or 8-channel audio (using discrete wav files for each channel) can be started with a single event.

Future development will add Ethernet control (probably via OSC), sound banks, or presets, as well as real-time panning of sources over the 8 channels of output.

It's meant to run headless, but as you can see above, I've created a GUI that fits on an 800x480 LCD which displays output levels and timing/performance information. I've previously done some work creating a minimal linux system using Buildroot and feel confident that one can achieve both short boot times as well as reliable low latency on a Raspberry Pi without the complexity of real time kernels.

The project is now live on github here. It's functional, but very preliminary, and unless you want to go off in a different direction with what I've already got working, I suggest waiting a few weeks until things are more complete and better documented. I just felt it had been awhile since my last post and wanted to provide an update.

The HAT Hardware Problem

I'm struggling a bit with the logistics around the HAT hardware. Namely, I haven't found a means to get them built for a price that would allow me to sell them for much less than $100, which I think may be too high. If I get them assembled in China, the prices of the components purchased by the assembler in China are much higher than I can purchase them myself here in the US. If I purchase the parts myself, then anyone that I can send them to here in the US charges a lot more for the assembly service. I understand that assembly services should be charging what they need to provide living wages, but the fact is that in the current market, with the global parts supply issues, it's hard to work the math on a product like this.

Would love feedback on any of this. Please feel free to comment here, or drop me an email via "info@" at this domain.

Previous
Previous

New for 2023

Next
Next

Multi-Channel Audio for the Raspberry Pi - Part 1