2 changed files with 20 additions and 2 deletions
@ -0,0 +1,18 @@ |
|||||
|
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); |
||||
|
} |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue