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?
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.