What class should I use to play different wav files?

Hello everyone, I would like to creat a drum pad and I don’t understand How can I load more than one WAV. I am using the tutorial : build an audio player to load the first one.
Thanks

asking the question 3 times won’t get you the answer faster.

What you want to do is a wave based synth

https://docs.juce.com/master/tutorial_synth_using_midi_input.html
https://docs.juce.com/master/classSamplerVoice.html

thank you for your answer.
Yes I would like to use the SamplerVoice but I don’t really know how to implement it…

look at AudioSynthesiserDemo.h in the examples\Audio folder

Thanks, and Do you know where I can find information to implement the sampleSound ?
Because I think It doesn’t work like for the sinwave.

AudioSynthesiserDemo.h uses a SamplerSound so there is everything you need in there.

Oh yes sorry ! Thank you for you reply ! Do you know how can I play different wav sample on the same piano ?

I think you need to look a bit further on your own before asking question on the forum :slight_smile:
People tend to help people that do a bit their homework before asking for help.

3 Likes