Multiple Wave-Files simultaneous

Hi,

I'm a complete arduino newbie.

I've a question: Is it possible (respectively is there a shield) to playback multiple audio-files simultaneously ?
The audio-files (wav) can have a length between a few and 30 or even more secs.
Additionally I would like to record something from an audio input.

(I would like to build something similar to a multi-track recorder)

Any help & ideas are welcome.

Thanks,
Uezi

I'm not sure how a WAV/MP3 shield interacts with the software/sketch...

"Mixing" is simply done by addition (in digital or analog). Digitally, you just add the samples from each file together. If it's a compressed file, you need decode the file and mix the raw PCM data (i.e. 44.100 samples per second).

Like I said, I don't know how the audio shields work, and I don't know if the audio data passes-through the Arduino (where it would be easy to sum/manipulate the audio data) or if the Arduino is just controlling the shield to get the audio data from memory and send it to the ADC (where mixing might be impossible).

You need to scale-down the sample values (i.e. cut them in half, etc.) so that when you sum two 16-bit values together, you don't get a number bigger than 16-bits (assuming a 16-bit ADC).

The catch is, both files need to have the same sample rate (i.e. 44.1 kHz). If not, one or both data streams needs to be re-sampled before mixing.

Is it possible (respectively is there a shield) to playback multiple audio-files simultaneously

No.
You can only open one file at a time on SD cards, and you can't read two SD cards fast enough. A wave shield is limited to 25KHz wav files anyway.

Thanks for the replies.

If there is a one-file limitation on the wave shield, can I use multiple wave shields for multiple files ? (e.g. sample 1 comes from shield1, sample 2 from shield2)
Would this be possible (doesn't seem like an engineering approach)?

The wave shield bit bangs the SPI bus so in theory yes. But you still have the time problem. That is you won't be able to access it quickly enough.