limit files in minim
in
Core Library Questions
•
11 months ago
Hi !
I have a problem with the minim library.
I create a random sound player program broken up in 3 array making sentences with nouns, verbs and adverbs.
This works until i put a total of 35 different sounds. If i put more, some sounds files aren't play.
Is-it just a limit of minim or a wrong use of it ?
Thank you !
import ddf.minim.*;
Minim minim;
AudioSample[] groupenominal= new AudioSample [11];
AudioSample[] verbefutur= new AudioSample [11];
AudioSample[] adverbe= new AudioSample [11];
int GN;
int VB;
int ADV;
void setup() {
minim = new Minim(this);
for(int i=0; i<11; i++) { // laisser l'ordinateur déterminer combien
groupenominal[i] = minim.loadSample("gn_" + i + ".wav");
}
for(int u=0; u<11; u++) { // laisser l'ordinateur déterminer combien
verbefutur[u] = minim.loadSample("vb_" + u + ".wav");
}
for(int p=0; p<11; p++) { // laisser l'ordinateur déterminer combien
adverbe[p] = minim.loadSample("adv_" + p + ".wav");
}
}
void draw() {
}
void keyPressed (){
if (key == 'a'){
int number=int (random(11));
println(number);
groupenominal[number].trigger();
}
if (key == 'z'){
int VB = int(random(11));
println(VB);
verbefutur[VB].trigger();
}
if (key == 'e'){
int ADV = int(random(11));
println(ADV);
adverbe[ADV].trigger();
}
}
2