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.
18 lines
346 B
18 lines
346 B
int activeRow = 0;
|
|
|
|
void setBeat(int row, int index, int sample) {
|
|
samples[row][index] = sample;
|
|
}
|
|
|
|
|
|
void keyPressed() {
|
|
if(keyCode >= 49 && keyCode < 53) {
|
|
activeRow = keyCode-49;
|
|
} else {
|
|
int sample = keyCode-65;
|
|
println(sample);
|
|
if(sample >= 0 && sample < numsounds) {
|
|
setBeat(activeRow, beat, sample);
|
|
}
|
|
}
|
|
}
|