Added quantization
This commit is contained in:
@ -82,6 +82,7 @@ int playingModes[6]; //actual channel modes array updated from channels object
|
||||
unsigned int pulsePeriod;
|
||||
bool isPlaying = false;
|
||||
bool isRecording = false;
|
||||
bool recordToNextStep = false;
|
||||
|
||||
unsigned int tickCount = 0;
|
||||
unsigned int pulseCount = 0;
|
||||
@ -318,6 +319,9 @@ void sendTriggers() {
|
||||
}
|
||||
if (sixteenthPulseCount < (PPQN / 4) - 1) {
|
||||
sixteenthPulseCount++;
|
||||
if (sixteenthPulseCount > 3) { //quantization. might need fine-tuning
|
||||
recordToNextStep = true;
|
||||
}
|
||||
} else {
|
||||
sixteenthPulseCount = 0;
|
||||
if (currentStep < 15) {
|
||||
@ -325,6 +329,7 @@ void sendTriggers() {
|
||||
} else {
|
||||
currentStep = 0;
|
||||
}
|
||||
recordToNextStep = false;
|
||||
}
|
||||
|
||||
//switching modes on the beat and resetting channel clock
|
||||
|
||||
Reference in New Issue
Block a user