|
@ -1,5 +1,6 @@ |
|
|
int ereaseRow = 0; |
|
|
int ereaseRow = 0; |
|
|
boolean doErease = false; |
|
|
boolean doErease = false; |
|
|
|
|
|
boolean doRec = false; |
|
|
|
|
|
|
|
|
void setBeat(int index, int sample) { |
|
|
void setBeat(int index, int sample) { |
|
|
samples[sample][index] = true; |
|
|
samples[sample][index] = true; |
|
@ -14,11 +15,17 @@ void keyPressed() { |
|
|
controller[0] = controller[0] == "PLAY" ? "STOP" : "PLAY"; |
|
|
controller[0] = controller[0] == "PLAY" ? "STOP" : "PLAY"; |
|
|
beat=0; |
|
|
beat=0; |
|
|
} |
|
|
} |
|
|
|
|
|
if(key == 'r') { |
|
|
|
|
|
controller[1] = controller[1] == "UNSET" ? "REC/OVERDUB" : "UNSET"; |
|
|
|
|
|
doRec = true; |
|
|
|
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
int sample = keyCode-65; |
|
|
int sample = keyCode-65; |
|
|
doErease = ereaseRow>0; |
|
|
doErease = ereaseRow>0; |
|
|
if(sample >= 0 && sample < numSounds && !doErease) { |
|
|
if(sample >= 0 && sample < numSounds && !doErease) { |
|
|
|
|
|
if(controller[1] != "EREASE" && controller[1] != "UNSET") { |
|
|
setBeat(beat, sample); |
|
|
setBeat(beat, sample); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|