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.
Artist’s Website: http://www.saradittrich.com/ Blog Post: http://www.esologic.com/multi-audio/ Ever wanted to have multiple different sound files playing on different output devices attached to a host computer? Say you’re writing a DJing application where you want one mix for headphones and one for the speakers.
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.
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.
Poem written and recorded by Daniel Sofaer, speakers, conduit, clay, spray paint, electrical components; 4′ x 4′ x 5′ ft.