Minim library: why only the first instance is played back?
in
Contributed Library Questions
•
10 months ago
Hi,
Maybe this is a noob question but I'm getting some strange trouble when trying to use several audio samples inside draw(); I firstly declare:
import ddf.minim.*;
Minim minim;
AudioSample sndMySample1, sndMySample2, sndMySample3, .........;
Then I instantiate (inside setup()):
minim = new Minim(this);
sndMySample1 = minim.loadSample("mySample1.wav");
sndMySample2 = minim.loadSample("mySample2.wav");
sndMySample3 = minim.loadSample("mySample3.wav");
.
.
.
And scattered inside draw() and class methods I have:
sndMySample1.trigger();
.
.
sndMySample2.trigger();
.
etc.
Then I only get sound from sndMySample1 regardless of its associated sound file (i.e. if I do sndMySample1 = minim.loadSample("mySample2.wav"); I'll get sound from mySample2.wav).
Any ideas?
Regards,
Antonio
Maybe this is a noob question but I'm getting some strange trouble when trying to use several audio samples inside draw(); I firstly declare:
import ddf.minim.*;
Minim minim;
AudioSample sndMySample1, sndMySample2, sndMySample3, .........;
Then I instantiate (inside setup()):
minim = new Minim(this);
sndMySample1 = minim.loadSample("mySample1.wav");
sndMySample2 = minim.loadSample("mySample2.wav");
sndMySample3 = minim.loadSample("mySample3.wav");
.
.
.
And scattered inside draw() and class methods I have:
sndMySample1.trigger();
.
.
sndMySample2.trigger();
.
etc.
Then I only get sound from sndMySample1 regardless of its associated sound file (i.e. if I do sndMySample1 = minim.loadSample("mySample2.wav"); I'll get sound from mySample2.wav).
Any ideas?
Regards,
Antonio
1