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.
27 lines
563 B
27 lines
563 B
int ereaseRow = 0;
|
|
|
|
void setBeat(int index, int sample) {
|
|
samples[sample][index] = true;
|
|
}
|
|
|
|
|
|
void keyPressed() {
|
|
if(keyCode >= 48 && keyCode < 53) {
|
|
ereaseRow = keyCode-48;
|
|
println("Set ereaseRow"+ereaseRow);
|
|
} else {
|
|
int sample = keyCode-65;
|
|
println(sample);
|
|
if(sample >= 0 && sample < numSounds) {
|
|
println("ereaseRow"+ereaseRow);
|
|
setBeat(beat, sample);
|
|
|
|
if(ereaseRow>0) {
|
|
for(int x=0; x<divider; x++) {
|
|
samples[ereaseRow-1][x] = false;
|
|
}
|
|
//ereaseRow = 0;
|
|
}
|
|
}
|
|
}
|
|
}
|