Multichannel audio output

Hi,
I have a project that includes a 4 (or even more) channel diffusion of a sound file. Is there any way (without using my computer during diffusion) to do this?

I have a 4 track sound file, which I can split in 2 stereo files (.WAV, 44,1 KHz 16bits, about 3 or 4 minutes long). Is there a way to start the two stereo files (exactly or approximately but close) at the same time? I want to use 4 different outputs (4 small loudspeakers).

I have an (working) Adafruit MusicMaker shield on an Arduino Uno. If I buy another MusicMaker shield, is it possible to synchronize the stereo sound files on the 2 shields, so it results in 4 synchronized channels? (Or are there other solutions?)

Thanks for help
MickeyM

What Arduino are you using?
With a Uno then no. But with a Due or zero you might stand a chance if you write your own software.

Thanks for your answer.

Yes, I’m using an Uno.
Why only DUE or ZERO?
When I have a look at the characteristics (https://www.arduino.cc/en/Products/Compare ), I guess it’s the memory?
Or speed? (These two, together with the number of analog outputs are different from all the other boards).
Or is it the libraries (scheduler,RTC)?

So for the software, I’ll have to write my own time code program to synchronize the start of the 2 files.
I’m new to this time-code subject (learning on it!) :

  • I saw there is a RTC library for the Arduino ZERO. (https://www.arduino.cc/en/Reference/RTC)
  • Also that there are some RTC shields for Arduino that are sold (Adafruit, Sparkfun, Velleman).
  • I also saw the Teensy Audio adaptor board, (1 Teensy (v. 3.1/3.2) + 2 Audioboards ⇒ 4channels).

Still exploring this 3(and other) possibilities.

MickeyM:

  • I also saw the Teensy Audio adaptor board, (1 Teensy (v. 3.1/3.2) + 2 Audioboards ⇒ 4channels).

Getting this quad channel audio working is on my TO-DO list.....

I guess it's the memory? Or speed?

Yes it is both. Plus the fact that it is a 32 bit processor and not an 8 bit one. This means for example to add two 32 bit quantities together takes just one instruction on a Due where as it takes at least four operations on an 8 bit processor.

I (finally) got quad channel audio output working in the Teensy Audio Library.

Details and conversation are here:

Another update....

Teensy Audio now supports simultaneous 4 channel input and output.