Audio Mp3 Wav Mixing Arduino, Rasberry Pie, Teensy

Hi There,

Want to build a project that we hope to build in quantity, have been trying with Arduino and some sound/mp3 shields with limited success.
Eg, only plays one mp3 at a time, for example

The Ultimate would be :

Arduino/Teensy/Rasberry pi controller (most powerful one), still need lots of I/O as well.

Running some type of audio board (or two if need be) that would allow me to play mp3 tracks as background music and from time to time drop an mp3 or wave file in at the same time so it is effectively mixed.
The result just needs to be go out to headphone/line out.

Can you help please, if so what products should I buy?


1 Like

Hi Jason,

I just made a similar project for an installation for Vivid in Sydney. The problem with using the Arduino Sound/mp3 shields is that there is no option to overlap the files played. It works like an Ipod and not like a sampler. I ended up using a combination of Arduino and Raspberry Pi. I used a Adafruit Circuit Playground Expresss, but you can also use and Arduino Leonardo or some other USB ready Arduino for your triggers. My setup uses sensors on the Arduino to send MIDI signals to the Raspberry Pi, which is running Sonic Pi. Sonic Pi is an open source synth. I’ve programmed Sonic Pi to play different samples when each MIDI note is received. They can overlap no problem, the raspberry pi can output audio on a headphone jack.

Some problems that I had was that Sonic Pi will only play uncompressed audio like .wav, .wave, .flac, .aiff. I found that any audio file over 10MB could not be trusted to run reliably, and would bog down the synth. So if you are playing full length songs that will be a problem. Perhaps there is a better suited MIDI synth that could run on the Raspberry Pi though.

Good luck, and please let me know what you end up going with!

Hi Stephen,

Thanks for that interesting solution.

I was hoping there might be a way to run background music on MP3 and mix in small Wav files on top at the same time.

Almost looks like I need to have my mp3 board running and a separate board like the teensy audio board running side by side and mix them on the output somehow?

Even sticking with mp3 music and adding mp3 sound effects would be fine, if I could find an MP3 board that will mix / run 2 things at once.

Many boards give the impression they can do this (perhaps in hardware), but not support for mixing

Does your method allow for playing both formats?

Any further ideas you can think of?



Hi Stephen,

Further to my reply.

Do you have a good suggestion for hobbyist circuit board manufacturer (just need a small run of a few small/simple boards)?

Do you have anyone in Brisbane you know of that could assist with this project I have as I can see it growing more complex and more units.

One we suss out the hardware, then might be good to have someone handy for the final programing as well.



Hi Jason,

The Teensy audio board can do multiple audio streams at once.

I wish I had known about it six months ago it looks like it would be MUCH easier than my method.

It’s very unlikely that you will be able to play MP3s simultaneously on a single device. You need to play uncompressed files. You could use two separate MP3 playing devices and mix the output. In theory, this shouldn’t be too hard:

As far as the circuit board manufacturing. If you are looking to do a small run of circuit boards, you probably can’t beat our rates. We recently started a PCB milling service aimed at supporting the maker community.

I hope that helps! I don’t know of anyone in Brisbane, but perhaps someone will read this post and take an interest. You could try posting a detailed description of your proposed project in the projects section of the forum. Threads that get the most hits are very detailed and specific about the nature of the project.

Good luck and let us know how the project progresses!

1 Like

Thanks for that.

So what should I try in my order :

1 x Teensy (most powerful is?) physical size does not matter.

1 x Teensy Audio Board

(I will try using my current mp3 from my previous link and mix the wav & MP3s at the end)

In regards to the circuit board manufacture what software do you suggest I use to make up the design file to send to you?



Check out Eagle by Autodesk for creating PCBs.

Here is a tutorial on using Eagle:

We use a Bantam Tools desktop mill. I’d pop over to their website as well to learn a little about the file formats needed.

Look at the specs for the Teensy Audio Board and make sure it works for you. It will not play MP3s. I think it looks like a great solution, you may just need to convert your MP3s to .wav. You can do that pretty easily with the free audio editing software Audacity.

There are many different flavours of Teensy, you would need the 3.0 or 3.1.

1 Like