Play multiple sounds simultaneously with a Raspberry Pi

Playing sound through a Raspberry Pi is a simple enough process. But what if you want to play multiple sounds through multiple speakers at the same time? Lucky for us, Devon Bray figured out how to do it.

Multiple audio files through multiple speakers

While working with artist Sara Dittrich on her These Blobs installation for Provincetown Art Association and Museum, Devon was faced with the challenge of playing “8 different mono sound files on 8 different loudspeakers”. Not an easy task, and one that most online tutorials simply do not cover.

These Blobs - Sarah Dittrich

These Blobs by Sara Dittrich

Turning to the sounddevice Python library for help, Devon got to work designing the hardware and code for the project.

The job was to create some kind of box that could play eight different audio files at the same time on eight different unpowered speakers. New audio files had to be able to be loaded via a USB thumb drive, enabling the user to easily switch files without having to use any sort of UI. Everything also had to be under five inches tall and super easy to power on and off.

Devon’s build uses a 12v 10 amp power supply controlled via a DC/DC converter. This supply powers the Raspberry Pi 3B+ and four $15 audio amplifiers, which in turn control simple non-powered speakers designed for use in laptops. As the sound is only required in mono, the four amplifiers can provide two audio tracks each, each track using a channel usually reserved for left or right audio output.

A full breakdown of the project can be seen in the video above, with more information available on Devon’s website, including the link to the GitHub repo.

And you can see the final project in action too! Watch a video of Sara Dittrich’s installation below, and find more of her work on her website.



Kyle avatar

I received (but have not used yet) an 8 channel audio card (HAT I guess) for Raspberry PI from Kickstarter – See the
RPi Octo Soundcard at I like this projects use of multiple USB soundcards.

Sara avatar

I looked into that Octo soundcard, but from what I understand I think it only allows for 6 input channels, and I needed something with 8 input channels.

nettings avatar

There are only 6 analog ins, but you can play eight different sounds to the outputs easily. You will want to use JACK for this, though.

Jaap Meijers avatar

I find this project very inspiring. The idea to use the left and right channels for separate audio tracks is clever, as is using the hub to be able to use all these USB soundcards. Well done!

Comments are closed