You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
661 B

5 years ago
void setData() {
5 years ago
5 years ago
numSounds = 5;
numTracks = numSounds;
5 years ago
bpm = 280;
5 years ago
pattern = 1;
swing = 50;
5 years ago
divider = 16;
duration = int((60/float(bpm))*1000);
beat = 0;
5 years ago
String bank = controller[2];
println(bank);
5 years ago
println(patternLabel);
5 years ago
samples = new boolean[numTracks][divider];
for(int i=0; i<numTracks; i++) {
boolean[] tmp = new boolean[divider];
for(int x=0; x<divider; x++) {
tmp[x] = false;
}
samples[i] = tmp;
}
// Load sound files
file = new SoundFile[numSounds];
for (int i = 0; i < numSounds; i++) {
file[i] = new SoundFile(this, bank + "/" + (i+1) + ".wav");
}
}