|
|
|
@ -224,7 +224,7 @@ uint8_t midi_ticks[10] = {0, 6, 9, 12, 18, 24, 36, 48, 72, 96}; |
|
|
|
|
uint8_t midi_bpm_counter = 0; |
|
|
|
|
elapsedMillis midi_bpm; |
|
|
|
|
#ifdef USE_FX |
|
|
|
|
uint8_t midi_timing_counter[NUM_DEXED]; |
|
|
|
|
uint8_t midi_timing_counter[NUM_DEXED] = {0, 0}; |
|
|
|
|
elapsedMillis midi_timing_timer[NUM_DEXED]; |
|
|
|
|
#endif |
|
|
|
|
elapsedMillis long_button_pressed; |
|
|
|
@ -1407,7 +1407,14 @@ void handleClock(void) |
|
|
|
|
if (midi_timing_counter[instance_id] % midi_ticks[configuration.fx.delay_sync[instance_id]] == 0) |
|
|
|
|
{ |
|
|
|
|
int32_t t = midi_timing_timer[instance_id]; |
|
|
|
|
delay_fx[instance_id]->delay(0, constrain(t, DELAY_TIME_MIN, DELAY_TIME_MAX)); |
|
|
|
|
delay_fx[instance_id]->delay(0, constrain(t*10, DELAY_TIME_MIN*10, DELAY_TIME_MAX*10)); |
|
|
|
|
#ifdef DEBUG |
|
|
|
|
Serial.print(F("Delay-Sync to ")); |
|
|
|
|
Serial.print(constrain(t, DELAY_TIME_MIN, DELAY_TIME_MAX), DEC); |
|
|
|
|
Serial.print(F(" ms / ")); |
|
|
|
|
Serial.print(midi_timing_counter[instance_id], DEC); |
|
|
|
|
Serial.println(F(" ticks")); |
|
|
|
|
#endif |
|
|
|
|
midi_timing_counter[instance_id] = 0; |
|
|
|
|
midi_timing_timer[instance_id] = 0; |
|
|
|
|
} |
|
|
|
|