|
|
@ -336,7 +336,6 @@ void display_meter_float(const char* title, float value, float factor, float off |
|
|
|
void lcd_active_instance_number(uint8_t instance_id); |
|
|
|
void lcd_active_instance_number(uint8_t instance_id); |
|
|
|
void lcd_OP_active_instance_number(uint8_t instance_id, uint8_t op); |
|
|
|
void lcd_OP_active_instance_number(uint8_t instance_id, uint8_t op); |
|
|
|
void lcd_special_chars(uint8_t mode); |
|
|
|
void lcd_special_chars(uint8_t mode); |
|
|
|
void lcd_display_delay_sync(uint8_t sync); |
|
|
|
|
|
|
|
void string_trim(char* s); |
|
|
|
void string_trim(char* s); |
|
|
|
void save_favorite(uint8_t b, uint8_t v, uint8_t instance_id); |
|
|
|
void save_favorite(uint8_t b, uint8_t v, uint8_t instance_id); |
|
|
|
void draw_favorite_icon(uint8_t b, uint8_t v, uint8_t instance_id); |
|
|
|
void draw_favorite_icon(uint8_t b, uint8_t v, uint8_t instance_id); |
|
|
@ -1263,15 +1262,15 @@ void UI_func_delay_time(uint8_t param) { |
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
|
|
|
|
|
|
|
lcd_special_chars(BLOCKBAR); |
|
|
|
lcd_special_chars(BLOCKBAR); |
|
|
|
if (configuration.fx.delay_sync[selected_instance_id] > 0) { |
|
|
|
|
|
|
|
lcd_display_delay_sync(configuration.fx.delay_sync[selected_instance_id]); //goto MIDI Sync
|
|
|
|
#if DELAY_TIME_MAX >= 1000 |
|
|
|
} else { |
|
|
|
display_bar_int("Delay Time", configuration.fx.delay_time[selected_instance_id], 10.0, DELAY_TIME_MIN, DELAY_TIME_MAX, 5, false, false, true); |
|
|
|
#if DELAY_TIME_MAX >= 100 |
|
|
|
#elif DELAY_TIME_MAX >= 100 |
|
|
|
display_bar_int("Delay Time", configuration.fx.delay_time[selected_instance_id], 10.0, DELAY_TIME_MIN, DELAY_TIME_MAX, 4, false, false, true); |
|
|
|
display_bar_int("Delay Time", configuration.fx.delay_time[selected_instance_id], 10.0, DELAY_TIME_MIN, DELAY_TIME_MAX, 4, false, false, true); |
|
|
|
#else |
|
|
|
#else |
|
|
|
display_bar_int("Delay Time", configuration.fx.delay_time[selected_instance_id], 10.0, DELAY_TIME_MIN, DELAY_TIME_MAX, 3, false, false, true); |
|
|
|
display_bar_int("Delay Time", configuration.fx.delay_time[selected_instance_id], 10.0, DELAY_TIME_MIN, DELAY_TIME_MAX, 3, false, false, true); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
} |
|
|
|
|
|
|
|
lcd_active_instance_number(selected_instance_id); |
|
|
|
lcd_active_instance_number(selected_instance_id); |
|
|
|
UI_update_instance_icons(); |
|
|
|
UI_update_instance_icons(); |
|
|
|
} |
|
|
|
} |
|
|
@ -1280,49 +1279,31 @@ void UI_func_delay_time(uint8_t param) { |
|
|
|
{ |
|
|
|
{ |
|
|
|
if ((LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) || (LCDML.BT_checkUp() && encoderDir[ENC_R].Up()) || (LCDML.BT_checkEnter() && encoderDir[ENC_R].ButtonShort())) { |
|
|
|
if ((LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) || (LCDML.BT_checkUp() && encoderDir[ENC_R].Up()) || (LCDML.BT_checkEnter() && encoderDir[ENC_R].ButtonShort())) { |
|
|
|
if (LCDML.BT_checkDown()) { |
|
|
|
if (LCDML.BT_checkDown()) { |
|
|
|
if (configuration.fx.delay_time[selected_instance_id] == DELAY_TIME_MIN && configuration.fx.delay_sync[selected_instance_id] > DELAY_SYNC_MIN) { |
|
|
|
|
|
|
|
// MIDI-sync delay
|
|
|
|
|
|
|
|
configuration.fx.delay_sync[selected_instance_id] = constrain(configuration.fx.delay_sync[selected_instance_id] - 1, DELAY_SYNC_MIN, DELAY_SYNC_MAX); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
configuration.fx.delay_time[selected_instance_id] = constrain(configuration.fx.delay_time[selected_instance_id] + ENCODER[ENC_R].speed(), DELAY_TIME_MIN, DELAY_TIME_MAX); |
|
|
|
configuration.fx.delay_time[selected_instance_id] = constrain(configuration.fx.delay_time[selected_instance_id] + ENCODER[ENC_R].speed(), DELAY_TIME_MIN, DELAY_TIME_MAX); |
|
|
|
MD_sendControlChange(configuration.dexed[selected_instance_id].midi_channel, 105, configuration.fx.delay_time[selected_instance_id]); |
|
|
|
MD_sendControlChange(configuration.dexed[selected_instance_id].midi_channel, 105, configuration.fx.delay_time[selected_instance_id]); |
|
|
|
} |
|
|
|
} |
|
|
|
} else if (LCDML.BT_checkUp()) { |
|
|
|
} else if (LCDML.BT_checkUp()) { |
|
|
|
if (configuration.fx.delay_time[selected_instance_id] == DELAY_TIME_MIN && configuration.fx.delay_sync[selected_instance_id] > DELAY_SYNC_MIN) { |
|
|
|
|
|
|
|
// MIDI-sync delay
|
|
|
|
|
|
|
|
configuration.fx.delay_sync[selected_instance_id] = constrain(configuration.fx.delay_sync[selected_instance_id] + 1, DELAY_SYNC_MIN, DELAY_SYNC_MAX); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
if (configuration.fx.delay_time[selected_instance_id] == DELAY_TIME_MIN) |
|
|
|
|
|
|
|
configuration.fx.delay_sync[selected_instance_id] = DELAY_SYNC_MIN + 1; |
|
|
|
|
|
|
|
else { |
|
|
|
|
|
|
|
configuration.fx.delay_time[selected_instance_id] = constrain(configuration.fx.delay_time[selected_instance_id] - ENCODER[ENC_R].speed(), DELAY_TIME_MIN, DELAY_TIME_MAX); |
|
|
|
configuration.fx.delay_time[selected_instance_id] = constrain(configuration.fx.delay_time[selected_instance_id] - ENCODER[ENC_R].speed(), DELAY_TIME_MIN, DELAY_TIME_MAX); |
|
|
|
MD_sendControlChange(configuration.dexed[selected_instance_id].midi_channel, 105, configuration.fx.delay_time[selected_instance_id]); |
|
|
|
MD_sendControlChange(configuration.dexed[selected_instance_id].midi_channel, 105, configuration.fx.delay_time[selected_instance_id]); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
#if NUM_DEXED > 1 |
|
|
|
#if NUM_DEXED > 1 |
|
|
|
else if (LCDML.BT_checkEnter()) { |
|
|
|
if (LCDML.BT_checkEnter()) { |
|
|
|
selected_instance_id = !selected_instance_id; |
|
|
|
selected_instance_id = !selected_instance_id; |
|
|
|
lcd_active_instance_number(selected_instance_id); |
|
|
|
lcd_active_instance_number(selected_instance_id); |
|
|
|
UI_update_instance_icons(); |
|
|
|
UI_update_instance_icons(); |
|
|
|
} |
|
|
|
} |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (configuration.fx.delay_sync[selected_instance_id] > 0) { |
|
|
|
#if DELAY_TIME_MAX >= 1000 |
|
|
|
lcd_display_delay_sync(configuration.fx.delay_sync[selected_instance_id]); //MIDI Sync Delay
|
|
|
|
display_bar_int("Delay Time", configuration.fx.delay_time[selected_instance_id], 10.0, DELAY_TIME_MIN, DELAY_TIME_MAX, 45, false, false, true); |
|
|
|
} else { |
|
|
|
#elif DELAY_TIME_MAX >= 100 |
|
|
|
#if DELAY_TIME_MAX >= 100 |
|
|
|
|
|
|
|
display_bar_int("Delay Time", configuration.fx.delay_time[selected_instance_id], 10.0, DELAY_TIME_MIN, DELAY_TIME_MAX, 4, false, false, true); |
|
|
|
display_bar_int("Delay Time", configuration.fx.delay_time[selected_instance_id], 10.0, DELAY_TIME_MIN, DELAY_TIME_MAX, 4, false, false, true); |
|
|
|
#else |
|
|
|
#else |
|
|
|
display_bar_int("Delay Time", configuration.fx.delay_time[selected_instance_id], 10.0, DELAY_TIME_MIN, DELAY_TIME_MAX, 3, false, false, true); |
|
|
|
display_bar_int("Delay Time", configuration.fx.delay_time[selected_instance_id], 10.0, DELAY_TIME_MIN, DELAY_TIME_MAX, 3, false, false, true); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
if (configuration.fx.delay_time[selected_instance_id] <= DELAY_TIME_MIN) |
|
|
|
|
|
|
|
delay_fx[selected_instance_id]->disable(0); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
delay_fx[selected_instance_id]->delay(0, constrain(configuration.fx.delay_time[selected_instance_id], DELAY_TIME_MIN, DELAY_TIME_MAX) * 10); |
|
|
|
delay_fx[selected_instance_id]->delay(0, constrain(configuration.fx.delay_time[selected_instance_id], DELAY_TIME_MIN, DELAY_TIME_MAX) * 10); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
{ |
|
|
|
{ |
|
|
@ -6475,53 +6456,6 @@ void lcd_special_chars(uint8_t mode) { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void lcd_display_delay_sync(uint8_t sync) { |
|
|
|
|
|
|
|
display.show(0, 0, LCD_cols - 2, "Delay Sync"); |
|
|
|
|
|
|
|
display.show(1, 0, 10, "MIDI Sync "); |
|
|
|
|
|
|
|
switch (sync) { |
|
|
|
|
|
|
|
case 1: |
|
|
|
|
|
|
|
display.show(1, 10, 6, "1/16"); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case 2: |
|
|
|
|
|
|
|
display.show(1, 10, 6, "1/16T"); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case 3: |
|
|
|
|
|
|
|
display.show(1, 10, 6, "1/8"); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case 4: |
|
|
|
|
|
|
|
display.show(1, 10, 6, "1/8T"); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case 5: |
|
|
|
|
|
|
|
display.show(1, 10, 6, "1/4"); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case 6: |
|
|
|
|
|
|
|
display.show(1, 10, 6, "1/4T"); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case 7: |
|
|
|
|
|
|
|
display.show(1, 10, 6, "1/2"); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case 8: |
|
|
|
|
|
|
|
display.show(1, 10, 6, "1/2T"); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
case 9: |
|
|
|
|
|
|
|
display.show(1, 10, 6, "1/1"); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
uint16_t midi_sync_delay_time = uint16_t(60000.0 * midi_ticks_factor[sync] / midi_bpm + 0.5); |
|
|
|
|
|
|
|
if (midi_sync_delay_time > DELAY_MAX_TIME) { |
|
|
|
|
|
|
|
#ifdef DEBUG |
|
|
|
|
|
|
|
Serial.println(F("Calculated MIDI-Sync delay: ")); |
|
|
|
|
|
|
|
Serial.print(round(60000.0 * midi_ticks_factor[sync] / midi_bpm), DEC); |
|
|
|
|
|
|
|
Serial.println(F("ms")); |
|
|
|
|
|
|
|
Serial.println(F("MIDI-Sync delay: midi_sync_delay_time")); |
|
|
|
|
|
|
|
Serial.print(midi_sync_delay_time, DEC); |
|
|
|
|
|
|
|
Serial.println(F("ms")); |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
display.show(1, 15, 1, "!"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void string_trim(char* s) { |
|
|
|
void string_trim(char* s) { |
|
|
|
int i; |
|
|
|
int i; |
|
|
|
|
|
|
|
|
|
|
|