Go Down

Topic: Playback of multiple sounds (wav files) simultaneously using Arduino (Read 511 times) previous topic - next topic

mkvenkit

I would like to play multiple pre-recorded audio samples (up to 5 wav files) simultaneously. These are in response to some sensors can be are triggered independently.

So the files can start and stop playing at any time - the output should be a mix of all these sounds.

What is a good approach for playback of multiple sounds simultaneously using Arduino? Do I need external hardware?

I was also considering generating MIDI. I don't know much about it - is it possible to create a MIDI file with multiple channels of data which keep changing?

Thanks & Regards

Grumpy_Mike

You can't do this simply. You need five wave shields and arduino's. Or you need five MP3 players controlled by one arduino.

MIDI is possible but it will not generate any sound just signals, I think one of the MP3 shields contains a MIDI sound synth so that might work.

jackrae

You also need to sample the signals at least twice the highest expected frequency.  That is why somewhere around 44KHz is frequently used by sampling systems.  And you also need to ensure there is adequate buffering (via opamps) between each of your signal sources before combining them to prevent the possibility of them "interfering" with each other.  Bear in mind that identical signals combined in opposition will cancel each other out, so the sound you expect to hear might not be a simple mix of the individual sounds.

mkvenkit

Thanks Grumpy_Mike & jackrae.

I think I'll look into the MIDI option.

Go Up