Several fixes for polyphony.

Now long pressing preset encoder changes between instances.
Small display fixes.
pull/32/head
Holger Wirtz 5 years ago
parent 507223248b
commit 8fce47f550
  1. BIN
      .swo
  2. 212
      UI.hpp
  3. 2
      config.h

BIN
.swo

Binary file not shown.

212
UI.hpp

@ -157,7 +157,7 @@ const uint8_t meter_bar[5][8] = {
}; };
*/ */
const uint8_t special_chars[17][8] = { const uint8_t special_chars[18][8] = {
{B11111, B11011, B10011, B11011, B11011, B11011, B11011, B11111}, // [0] 1 small invers {B11111, B11011, B10011, B11011, B11011, B11011, B11011, B11111}, // [0] 1 small invers
{B11111, B11011, B10101, B11101, B11011, B10111, B10001, B11111}, // [1] 2 small invers {B11111, B11011, B10101, B11101, B11011, B10111, B10001, B11111}, // [1] 2 small invers
{B11111, B11011, B10011, B11011, B11011, B11011, B11011, B11111}, // [2] 1 OP invers {B11111, B11011, B10011, B11011, B11011, B11011, B11011, B11111}, // [2] 1 OP invers
@ -174,7 +174,8 @@ const uint8_t special_chars[17][8] = {
{B00000, B00000, B11111, B11111, B11111, B11111, B11111, B11111}, // [13] Level 6 {B00000, B00000, B11111, B11111, B11111, B11111, B11111, B11111}, // [13] Level 6
{B00000, B11111, B11111, B11111, B11111, B11111, B11111, B11111}, // [14] Level 7 {B00000, B11111, B11111, B11111, B11111, B11111, B11111, B11111}, // [14] Level 7
{B11111, B11111, B11111, B11111, B11111, B11111, B11111, B11111}, // [15] Level 8 {B11111, B11111, B11111, B11111, B11111, B11111, B11111, B11111}, // [15] Level 8
{B00100, B00110, B00101, B00101, B01101, B11101, B11100, B11000} // [16] Note {B00100, B00110, B00101, B00101, B01101, B11101, B11100, B11000}, // [16] Note
{B01110, B10001, B10001, B11111, B11011, B11011, B11111, B00000} // [17] Disabled 2nd instance symbol
}; };
enum { SCROLLBAR, BLOCKBAR, METERBAR }; enum { SCROLLBAR, BLOCKBAR, METERBAR };
@ -592,16 +593,6 @@ void lcdml_menu_control(void)
#endif #endif
//LCDML.BT_quit(); //LCDML.BT_quit();
encoderDir[ENC_R].ButtonLong(true); encoderDir[ENC_R].ButtonLong(true);
/*
if (LCDML.FUNC_getID() < 0xff)
LCDML.FUNC_setGBAToLastFunc();
else
LCDML.FUNC_setGBAToLastCursorPos();
//LCDML.FUNC_setGBA();
LCDML.OTHER_jumpToFunc(UI_func_voice_select);
*/
} }
else if ((millis() - g_LCDML_CONTROL_button_press_time[ENC_R]) >= BUT_DEBOUNCE_MS) else if ((millis() - g_LCDML_CONTROL_button_press_time[ENC_R]) >= BUT_DEBOUNCE_MS)
{ {
@ -622,12 +613,27 @@ void lcdml_menu_control(void)
#endif #endif
encoderDir[ENC_R].ButtonLong(true); encoderDir[ENC_R].ButtonLong(true);
#if NUM_DEXED > 1
if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_voice_select))
{
selected_instance_id = !selected_instance_id;
lcd_active_instance_number(selected_instance_id);
LCDML.OTHER_updateFunc();
LCDML.loop_menu();
}
else
{
#endif
if (LCDML.FUNC_getID() < 0xff) if (LCDML.FUNC_getID() < 0xff)
LCDML.FUNC_setGBAToLastFunc(); LCDML.FUNC_setGBAToLastFunc();
else else
LCDML.FUNC_setGBAToLastCursorPos(); LCDML.FUNC_setGBAToLastCursorPos();
LCDML.OTHER_jumpToFunc(UI_func_voice_select); LCDML.OTHER_jumpToFunc(UI_func_voice_select);
#if NUM_DEXED > 1
}
#endif
encoderDir[ENC_R].reset();
} }
// LEFT // LEFT
@ -708,10 +714,6 @@ void lcdml_menu_control(void)
#endif #endif
//encoderDir[ENC_L].ButtonLong(true); //encoderDir[ENC_L].ButtonLong(true);
//LCDML.BT_quit(); //LCDML.BT_quit();
/*
for (uint8_t i = 0; i < NUM_DEXED; i++)
MicroDexed[i]->panic();
*/
} }
else if ((millis() - g_LCDML_CONTROL_button_press_time[ENC_L]) >= BUT_DEBOUNCE_MS) else if ((millis() - g_LCDML_CONTROL_button_press_time[ENC_L]) >= BUT_DEBOUNCE_MS)
{ {
@ -907,7 +909,7 @@ void UI_func_reverb_roomsize(uint8_t param)
encoderDir[ENC_R].reset(); encoderDir[ENC_R].reset();
lcd_special_chars(BLOCKBAR); lcd_special_chars(BLOCKBAR);
lcd_display_bar_int("Reverb Room", configuration.fx.reverb_roomsize, 1.0, REVERB_ROOMSIZE_MIN, REVERB_ROOMSIZE_MAX, 3, false, false, true); lcd_display_bar_int("Reverb Room", configuration.fx.reverb_roomsize, 1.0, REVERB_ROOMSIZE_MIN, REVERB_ROOMSIZE_MAX, 2, false, false, true);
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -919,7 +921,7 @@ void UI_func_reverb_roomsize(uint8_t param)
else if (LCDML.BT_checkUp()) else if (LCDML.BT_checkUp())
configuration.fx.reverb_roomsize = constrain(configuration.fx.reverb_roomsize - ENCODER[ENC_R].speed(), REVERB_ROOMSIZE_MIN, REVERB_ROOMSIZE_MAX); configuration.fx.reverb_roomsize = constrain(configuration.fx.reverb_roomsize - ENCODER[ENC_R].speed(), REVERB_ROOMSIZE_MIN, REVERB_ROOMSIZE_MAX);
} }
lcd_display_bar_int("Reverb Room", configuration.fx.reverb_roomsize, 1.0, REVERB_ROOMSIZE_MIN, REVERB_ROOMSIZE_MAX, 3, false, false, false); lcd_display_bar_int("Reverb Room", configuration.fx.reverb_roomsize, 1.0, REVERB_ROOMSIZE_MIN, REVERB_ROOMSIZE_MAX, 2, false, false, false);
freeverb_r.roomsize(mapfloat(configuration.fx.reverb_roomsize, REVERB_ROOMSIZE_MIN, REVERB_ROOMSIZE_MAX, 0.0, 1.0)); freeverb_r.roomsize(mapfloat(configuration.fx.reverb_roomsize, REVERB_ROOMSIZE_MIN, REVERB_ROOMSIZE_MAX, 0.0, 1.0));
freeverb_l.roomsize(mapfloat(configuration.fx.reverb_roomsize, REVERB_ROOMSIZE_MIN, REVERB_ROOMSIZE_MAX, 0.0, 1.0)); freeverb_l.roomsize(mapfloat(configuration.fx.reverb_roomsize, REVERB_ROOMSIZE_MIN, REVERB_ROOMSIZE_MAX, 0.0, 1.0));
@ -940,7 +942,7 @@ void UI_func_reverb_damping(uint8_t param)
encoderDir[ENC_R].reset(); encoderDir[ENC_R].reset();
lcd_special_chars(BLOCKBAR); lcd_special_chars(BLOCKBAR);
lcd_display_bar_int("Reverb Damp.", configuration.fx.reverb_damping, 1.0, REVERB_DAMPING_MIN, REVERB_DAMPING_MAX, 3, false, false, true); lcd_display_bar_int("Reverb Damp.", configuration.fx.reverb_damping, 1.0, REVERB_DAMPING_MIN, REVERB_DAMPING_MAX, 2, false, false, true);
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -953,7 +955,7 @@ void UI_func_reverb_damping(uint8_t param)
configuration.fx.reverb_damping = constrain(configuration.fx.reverb_damping - ENCODER[ENC_R].speed(), REVERB_DAMPING_MIN, REVERB_DAMPING_MAX); configuration.fx.reverb_damping = constrain(configuration.fx.reverb_damping - ENCODER[ENC_R].speed(), REVERB_DAMPING_MIN, REVERB_DAMPING_MAX);
} }
lcd_display_bar_int("Reverb Damp.", configuration.fx.reverb_damping, 1.0, REVERB_DAMPING_MIN, REVERB_DAMPING_MAX, 3, false, false, false); lcd_display_bar_int("Reverb Damp.", configuration.fx.reverb_damping, 1.0, REVERB_DAMPING_MIN, REVERB_DAMPING_MAX, 2, false, false, false);
freeverb_l.damping(mapfloat(configuration.fx.reverb_damping, REVERB_DAMPING_MIN, REVERB_DAMPING_MAX, 0.0, 1.0)); freeverb_l.damping(mapfloat(configuration.fx.reverb_damping, REVERB_DAMPING_MIN, REVERB_DAMPING_MAX, 0.0, 1.0));
freeverb_r.damping(mapfloat(configuration.fx.reverb_damping, REVERB_DAMPING_MIN, REVERB_DAMPING_MAX, 0.0, 1.0)); freeverb_r.damping(mapfloat(configuration.fx.reverb_damping, REVERB_DAMPING_MIN, REVERB_DAMPING_MAX, 0.0, 1.0));
@ -974,7 +976,7 @@ void UI_func_reverb_level(uint8_t param)
encoderDir[ENC_R].reset(); encoderDir[ENC_R].reset();
lcd_special_chars(BLOCKBAR); lcd_special_chars(BLOCKBAR);
lcd_display_bar_int("Reverb Level", configuration.fx.reverb_level, 1.0, REVERB_LEVEL_MIN, REVERB_LEVEL_MAX, 3, false, false, true); lcd_display_bar_int("Reverb Level", configuration.fx.reverb_level, 1.0, REVERB_LEVEL_MIN, REVERB_LEVEL_MAX, 2, false, false, true);
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -987,7 +989,7 @@ void UI_func_reverb_level(uint8_t param)
configuration.fx.reverb_level = constrain(configuration.fx.reverb_level - ENCODER[ENC_R].speed(), REVERB_LEVEL_MIN, REVERB_LEVEL_MAX); configuration.fx.reverb_level = constrain(configuration.fx.reverb_level - ENCODER[ENC_R].speed(), REVERB_LEVEL_MIN, REVERB_LEVEL_MAX);
} }
lcd_display_bar_int("Reverb Level", configuration.fx.reverb_level, 1.0, REVERB_LEVEL_MIN, REVERB_LEVEL_MAX, 3, false, false, true); lcd_display_bar_int("Reverb Level", configuration.fx.reverb_level, 1.0, REVERB_LEVEL_MIN, REVERB_LEVEL_MAX, 2, false, false, true);
master_mixer_r.gain(3, configuration.fx.reverb_level / 100.0); master_mixer_r.gain(3, configuration.fx.reverb_level / 100.0);
master_mixer_l.gain(3, configuration.fx.reverb_level / 100.0); master_mixer_l.gain(3, configuration.fx.reverb_level / 100.0);
@ -1010,14 +1012,11 @@ void UI_func_chorus_frequency(uint8_t param)
lcd_special_chars(BLOCKBAR); lcd_special_chars(BLOCKBAR);
lcd_display_bar_float("Chorus Frq.", configuration.fx.chorus_frequency[selected_instance_id], 0.1, CHORUS_FREQUENCY_MIN, CHORUS_FREQUENCY_MAX, 2, 1, false, false, true); lcd_display_bar_float("Chorus Frq.", configuration.fx.chorus_frequency[selected_instance_id], 0.1, CHORUS_FREQUENCY_MIN, CHORUS_FREQUENCY_MAX, 2, 1, false, false, true);
#if NUM_DEXED > 1
lcd_active_instance_number(selected_instance_id); lcd_active_instance_number(selected_instance_id);
lcd.setCursor(14, 0); lcd.setCursor(14, 0);
lcd.write(0); lcd.write(0);
lcd.setCursor(15, 0); lcd.setCursor(15, 0);
lcd.write(1); lcd.write(1);
#endif
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -1065,13 +1064,11 @@ void UI_func_chorus_waveform(uint8_t param)
lcd.setCursor(0, 0); lcd.setCursor(0, 0);
lcd.print(F("Chorus Waveform")); lcd.print(F("Chorus Waveform"));
#if NUM_DEXED > 1
lcd_active_instance_number(selected_instance_id); lcd_active_instance_number(selected_instance_id);
lcd.setCursor(14, 0); lcd.setCursor(14, 0);
lcd.write(0); lcd.write(0);
lcd.setCursor(15, 0); lcd.setCursor(15, 0);
lcd.write(1); lcd.write(1);
#endif
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -1128,15 +1125,13 @@ void UI_func_chorus_depth(uint8_t param)
encoderDir[ENC_R].reset(); encoderDir[ENC_R].reset();
lcd_special_chars(BLOCKBAR); lcd_special_chars(BLOCKBAR);
lcd_display_bar_int("Chorus Dpt.", configuration.fx.chorus_depth[selected_instance_id], 1.0, CHORUS_DEPTH_MIN, CHORUS_DEPTH_MAX, 3, false, false, true); lcd_display_bar_int("Chorus Dpt.", configuration.fx.chorus_depth[selected_instance_id], 1.0, CHORUS_DEPTH_MIN, CHORUS_DEPTH_MAX, 2, false, false, true);
#if NUM_DEXED > 1
lcd_active_instance_number(selected_instance_id); lcd_active_instance_number(selected_instance_id);
lcd.setCursor(14, 0); lcd.setCursor(14, 0);
lcd.write(0); lcd.write(0);
lcd.setCursor(15, 0); lcd.setCursor(15, 0);
lcd.write(1); lcd.write(1);
#endif
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -1160,7 +1155,7 @@ void UI_func_chorus_depth(uint8_t param)
#endif #endif
} }
lcd_display_bar_int("Chorus Dpt.", configuration.fx.chorus_depth[selected_instance_id], 1.0, CHORUS_DEPTH_MIN, CHORUS_DEPTH_MAX, 3, false, false, false); lcd_display_bar_int("Chorus Dpt.", configuration.fx.chorus_depth[selected_instance_id], 1.0, CHORUS_DEPTH_MIN, CHORUS_DEPTH_MAX, 2, false, false, false);
chorus_modulator[selected_instance_id]->amplitude(configuration.fx.chorus_depth[selected_instance_id] / 100.0); chorus_modulator[selected_instance_id]->amplitude(configuration.fx.chorus_depth[selected_instance_id] / 100.0);
} }
@ -1183,15 +1178,13 @@ void UI_func_chorus_level(uint8_t param)
encoderDir[ENC_R].reset(); encoderDir[ENC_R].reset();
lcd_special_chars(BLOCKBAR); lcd_special_chars(BLOCKBAR);
lcd_display_bar_int("Chorus Lvl.", configuration.fx.chorus_level[selected_instance_id], 1.0, CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 3, false, false, true); lcd_display_bar_int("Chorus Lvl.", configuration.fx.chorus_level[selected_instance_id], 1.0, CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 2, false, false, true);
#if NUM_DEXED > 1
lcd_active_instance_number(selected_instance_id); lcd_active_instance_number(selected_instance_id);
lcd.setCursor(14, 0); lcd.setCursor(14, 0);
lcd.write(0); lcd.write(0);
lcd.setCursor(15, 0); lcd.setCursor(15, 0);
lcd.write(1); lcd.write(1);
#endif
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -1215,7 +1208,7 @@ void UI_func_chorus_level(uint8_t param)
#endif #endif
} }
lcd_display_bar_int("Chorus Lvl.", configuration.fx.chorus_level[selected_instance_id], 1.0, CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 3, false, false, false); lcd_display_bar_int("Chorus Lvl.", configuration.fx.chorus_level[selected_instance_id], 1.0, CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 2, false, false, false);
//chorus_mixer[selected_instance_id]->gain(0, 1.0 - pseudo_log_curve(mapfloat(configuration.fx.chorus_level[selected_instance_id], CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 0.0, 1.0), true)); //chorus_mixer[selected_instance_id]->gain(0, 1.0 - pseudo_log_curve(mapfloat(configuration.fx.chorus_level[selected_instance_id], CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 0.0, 1.0), true));
//chorus_mixer[selected_instance_id]->gain(1, pseudo_log_curve(mapfloat(configuration.fx.chorus_level[selected_instance_id], CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 0.0, 1.0), true)); //chorus_mixer[selected_instance_id]->gain(1, pseudo_log_curve(mapfloat(configuration.fx.chorus_level[selected_instance_id], CHORUS_LEVEL_MIN, CHORUS_LEVEL_MAX, 0.0, 1.0), true));
@ -1241,15 +1234,13 @@ void UI_func_delay_time(uint8_t param)
encoderDir[ENC_R].reset(); encoderDir[ENC_R].reset();
lcd_special_chars(BLOCKBAR); lcd_special_chars(BLOCKBAR);
lcd_display_bar_int("Delay Time", configuration.fx.delay_time[selected_instance_id], 10.0, DELAY_TIME_MIN, DELAY_TIME_MAX, 3, false, false, true); lcd_display_bar_int("Delay Time", configuration.fx.delay_time[selected_instance_id], 10.0, DELAY_TIME_MIN, DELAY_TIME_MAX, 2, false, false, true);
#if NUM_DEXED > 1
lcd_active_instance_number(selected_instance_id); lcd_active_instance_number(selected_instance_id);
lcd.setCursor(14, 0); lcd.setCursor(14, 0);
lcd.write(0); lcd.write(0);
lcd.setCursor(15, 0); lcd.setCursor(15, 0);
lcd.write(1); lcd.write(1);
#endif
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -1273,7 +1264,7 @@ void UI_func_delay_time(uint8_t param)
#endif #endif
} }
lcd_display_bar_int("Delay Time", configuration.fx.delay_time[selected_instance_id], 10.0, DELAY_TIME_MIN, DELAY_TIME_MAX, 3, false, false, true); lcd_display_bar_int("Delay Time", configuration.fx.delay_time[selected_instance_id], 10.0, DELAY_TIME_MIN, DELAY_TIME_MAX, 2, false, false, true);
delay_fx[selected_instance_id]->delay(0, configuration.fx.delay_time[selected_instance_id] * 10); delay_fx[selected_instance_id]->delay(0, configuration.fx.delay_time[selected_instance_id] * 10);
} }
@ -1296,15 +1287,13 @@ void UI_func_delay_feedback(uint8_t param)
encoderDir[ENC_R].reset(); encoderDir[ENC_R].reset();
lcd_special_chars(BLOCKBAR); lcd_special_chars(BLOCKBAR);
lcd_display_bar_int("Delay Feedb.", configuration.fx.delay_feedback[selected_instance_id], 1.0, DELAY_FEEDBACK_MIN, DELAY_FEEDBACK_MAX, 3, false, false, true); lcd_display_bar_int("Delay Feedb.", configuration.fx.delay_feedback[selected_instance_id], 1.0, DELAY_FEEDBACK_MIN, DELAY_FEEDBACK_MAX, 2, false, false, true);
#if NUM_DEXED > 1
lcd_active_instance_number(selected_instance_id); lcd_active_instance_number(selected_instance_id);
lcd.setCursor(14, 0); lcd.setCursor(14, 0);
lcd.write(0); lcd.write(0);
lcd.setCursor(15, 0); lcd.setCursor(15, 0);
lcd.write(1); lcd.write(1);
#endif
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -1328,7 +1317,7 @@ void UI_func_delay_feedback(uint8_t param)
#endif #endif
} }
lcd_display_bar_int("Delay Feedb.", configuration.fx.delay_feedback[selected_instance_id], 1.0, DELAY_FEEDBACK_MIN, DELAY_FEEDBACK_MAX, 3, false, false, false); lcd_display_bar_int("Delay Feedb.", configuration.fx.delay_feedback[selected_instance_id], 1.0, DELAY_FEEDBACK_MIN, DELAY_FEEDBACK_MAX, 2, false, false, false);
delay_fb_mixer[selected_instance_id]->gain(1, configuration.fx.delay_feedback[selected_instance_id] / 100.0); // amount of feedback delay_fb_mixer[selected_instance_id]->gain(1, configuration.fx.delay_feedback[selected_instance_id] / 100.0); // amount of feedback
} }
@ -1351,15 +1340,13 @@ void UI_func_delay_level(uint8_t param)
encoderDir[ENC_R].reset(); encoderDir[ENC_R].reset();
lcd_special_chars(BLOCKBAR); lcd_special_chars(BLOCKBAR);
lcd_display_bar_int("Delay Lvl.", configuration.fx.delay_level[selected_instance_id], 1.0, DELAY_LEVEL_MIN, DELAY_LEVEL_MAX, 3, false, false, true); lcd_display_bar_int("Delay Lvl.", configuration.fx.delay_level[selected_instance_id], 1.0, DELAY_LEVEL_MIN, DELAY_LEVEL_MAX, 2, false, false, true);
#if NUM_DEXED > 1
lcd_active_instance_number(selected_instance_id); lcd_active_instance_number(selected_instance_id);
lcd.setCursor(14, 0); lcd.setCursor(14, 0);
lcd.write(0); lcd.write(0);
lcd.setCursor(15, 0); lcd.setCursor(15, 0);
lcd.write(1); lcd.write(1);
#endif
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -1383,7 +1370,7 @@ void UI_func_delay_level(uint8_t param)
#endif #endif
} }
lcd_display_bar_int("Delay Lvl.", configuration.fx.delay_level[selected_instance_id], 1.0, DELAY_LEVEL_MIN, DELAY_LEVEL_MAX, 3, false, false, false); lcd_display_bar_int("Delay Lvl.", configuration.fx.delay_level[selected_instance_id], 1.0, DELAY_LEVEL_MIN, DELAY_LEVEL_MAX, 2, false, false, false);
delay_mixer[selected_instance_id]->gain(1, mapfloat(configuration.fx.delay_level[selected_instance_id], DELAY_LEVEL_MIN, DELAY_LEVEL_MAX, 0.0, 1.0)); delay_mixer[selected_instance_id]->gain(1, mapfloat(configuration.fx.delay_level[selected_instance_id], DELAY_LEVEL_MIN, DELAY_LEVEL_MAX, 0.0, 1.0));
} }
@ -1406,15 +1393,13 @@ void UI_func_reverb_send(uint8_t param)
encoderDir[ENC_R].reset(); encoderDir[ENC_R].reset();
lcd_special_chars(BLOCKBAR); lcd_special_chars(BLOCKBAR);
lcd_display_bar_int("Reverb Send", configuration.fx.reverb_send[selected_instance_id], 1.0, REVERB_SEND_MIN, REVERB_SEND_MAX, 3, false, false, true); lcd_display_bar_int("Reverb Send", configuration.fx.reverb_send[selected_instance_id], 1.0, REVERB_SEND_MIN, REVERB_SEND_MAX, 2, false, false, true);
#if NUM_DEXED > 1
lcd_active_instance_number(selected_instance_id); lcd_active_instance_number(selected_instance_id);
lcd.setCursor(14, 0); lcd.setCursor(14, 0);
lcd.write(0); lcd.write(0);
lcd.setCursor(15, 0); lcd.setCursor(15, 0);
lcd.write(1); lcd.write(1);
#endif
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -1438,7 +1423,7 @@ void UI_func_reverb_send(uint8_t param)
#endif #endif
} }
lcd_display_bar_int("Reverb Send", configuration.fx.reverb_send[selected_instance_id], 1.0, REVERB_SEND_MIN, REVERB_SEND_MAX, 3, false, false, false); lcd_display_bar_int("Reverb Send", configuration.fx.reverb_send[selected_instance_id], 1.0, REVERB_SEND_MIN, REVERB_SEND_MAX, 2, false, false, false);
reverb_mixer_r.gain(selected_instance_id, configuration.fx.reverb_send[selected_instance_id] / 100.0); reverb_mixer_r.gain(selected_instance_id, configuration.fx.reverb_send[selected_instance_id] / 100.0);
reverb_mixer_l.gain(selected_instance_id, configuration.fx.reverb_send[selected_instance_id] / 100.0); reverb_mixer_l.gain(selected_instance_id, configuration.fx.reverb_send[selected_instance_id] / 100.0);
@ -1462,15 +1447,13 @@ void UI_func_filter_cutoff(uint8_t param)
encoderDir[ENC_R].reset(); encoderDir[ENC_R].reset();
lcd_special_chars(BLOCKBAR); lcd_special_chars(BLOCKBAR);
lcd_display_bar_int("Filter Cut", configuration.dexed[selected_instance_id].filter_cutoff, 1.0, FILTER_CUTOFF_MIN, FILTER_CUTOFF_MAX, 3, false, false, true); lcd_display_bar_int("Filter Cut", configuration.dexed[selected_instance_id].filter_cutoff, 1.0, FILTER_CUTOFF_MIN, FILTER_CUTOFF_MAX, 2, false, false, true);
#if NUM_DEXED > 1
lcd_active_instance_number(selected_instance_id); lcd_active_instance_number(selected_instance_id);
lcd.setCursor(14, 0); lcd.setCursor(14, 0);
lcd.write(0); lcd.write(0);
lcd.setCursor(15, 0); lcd.setCursor(15, 0);
lcd.write(1); lcd.write(1);
#endif
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -1494,7 +1477,7 @@ void UI_func_filter_cutoff(uint8_t param)
#endif #endif
} }
lcd_display_bar_int("Filter Cut", configuration.dexed[selected_instance_id].filter_cutoff, 1.0, FILTER_CUTOFF_MIN, FILTER_CUTOFF_MAX, 3, false, false, false); lcd_display_bar_int("Filter Cut", configuration.dexed[selected_instance_id].filter_cutoff, 1.0, FILTER_CUTOFF_MIN, FILTER_CUTOFF_MAX, 2, false, false, false);
MicroDexed[selected_instance_id]->fx.Cutoff = mapfloat(configuration.dexed[selected_instance_id].filter_cutoff, FILTER_CUTOFF_MIN, FILTER_CUTOFF_MAX, 1.0, 0.0); MicroDexed[selected_instance_id]->fx.Cutoff = mapfloat(configuration.dexed[selected_instance_id].filter_cutoff, FILTER_CUTOFF_MIN, FILTER_CUTOFF_MAX, 1.0, 0.0);
} }
@ -1517,15 +1500,13 @@ void UI_func_filter_resonance(uint8_t param)
encoderDir[ENC_R].reset(); encoderDir[ENC_R].reset();
lcd_special_chars(BLOCKBAR); lcd_special_chars(BLOCKBAR);
lcd_display_bar_int("Filter Res", configuration.dexed[selected_instance_id].filter_resonance, 1.0, FILTER_RESONANCE_MIN, FILTER_RESONANCE_MAX, 3, false, false, true); lcd_display_bar_int("Filter Res", configuration.dexed[selected_instance_id].filter_resonance, 1.0, FILTER_RESONANCE_MIN, FILTER_RESONANCE_MAX, 2, false, false, true);
#if NUM_DEXED > 1
lcd_active_instance_number(selected_instance_id); lcd_active_instance_number(selected_instance_id);
lcd.setCursor(14, 0); lcd.setCursor(14, 0);
lcd.write(0); lcd.write(0);
lcd.setCursor(15, 0); lcd.setCursor(15, 0);
lcd.write(1); lcd.write(1);
#endif
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -1549,7 +1530,7 @@ void UI_func_filter_resonance(uint8_t param)
#endif #endif
} }
lcd_display_bar_int("Filter Res", configuration.dexed[selected_instance_id].filter_resonance, 1.0, FILTER_RESONANCE_MIN, FILTER_RESONANCE_MAX, 3, false, false, false); lcd_display_bar_int("Filter Res", configuration.dexed[selected_instance_id].filter_resonance, 1.0, FILTER_RESONANCE_MIN, FILTER_RESONANCE_MAX, 2, false, false, false);
MicroDexed[selected_instance_id]->fx.Reso = mapfloat(configuration.dexed[selected_instance_id].filter_resonance, FILTER_RESONANCE_MIN, FILTER_RESONANCE_MAX, 1.0, 0.0); MicroDexed[selected_instance_id]->fx.Reso = mapfloat(configuration.dexed[selected_instance_id].filter_resonance, FILTER_RESONANCE_MIN, FILTER_RESONANCE_MAX, 1.0, 0.0);
} }
@ -1575,13 +1556,11 @@ void UI_func_transpose(uint8_t param)
lcd_special_chars(METERBAR); lcd_special_chars(METERBAR);
lcd_display_meter_int("Transpose", configuration.dexed[selected_instance_id].transpose, 1.0, -24.0, TRANSPOSE_MIN, TRANSPOSE_MAX, 2, false, true, true); lcd_display_meter_int("Transpose", configuration.dexed[selected_instance_id].transpose, 1.0, -24.0, TRANSPOSE_MIN, TRANSPOSE_MAX, 2, false, true, true);
#if NUM_DEXED > 1
lcd_active_instance_number(selected_instance_id); lcd_active_instance_number(selected_instance_id);
lcd.setCursor(14, 0); lcd.setCursor(14, 0);
lcd.write(0); lcd.write(0);
lcd.setCursor(15, 0); lcd.setCursor(15, 0);
lcd.write(1); lcd.write(1);
#endif
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -1631,13 +1610,11 @@ void UI_func_tune(uint8_t param)
lcd_special_chars(METERBAR); lcd_special_chars(METERBAR);
lcd_display_meter_int("Fine Tune", configuration.dexed[selected_instance_id].tune, 1.0, -100.0, TUNE_MIN, TUNE_MAX, 2, false, true, true); lcd_display_meter_int("Fine Tune", configuration.dexed[selected_instance_id].tune, 1.0, -100.0, TUNE_MIN, TUNE_MAX, 2, false, true, true);
#if NUM_DEXED > 1
lcd_active_instance_number(selected_instance_id); lcd_active_instance_number(selected_instance_id);
lcd.setCursor(14, 0); lcd.setCursor(14, 0);
lcd.write(0); lcd.write(0);
lcd.setCursor(15, 0); lcd.setCursor(15, 0);
lcd.write(1); lcd.write(1);
#endif
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -1687,13 +1664,11 @@ void UI_func_midi_channel(uint8_t param)
lcd.setCursor(0, 0); lcd.setCursor(0, 0);
lcd.print(F("MIDI Channel")); lcd.print(F("MIDI Channel"));
#if NUM_DEXED > 1
lcd_active_instance_number(selected_instance_id); lcd_active_instance_number(selected_instance_id);
lcd.setCursor(14, 0); lcd.setCursor(14, 0);
lcd.write(0); lcd.write(0);
lcd.setCursor(15, 0); lcd.setCursor(15, 0);
lcd.write(1); lcd.write(1);
#endif
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -1761,13 +1736,11 @@ void UI_func_lowest_note(uint8_t param)
lcd.print(note_name); lcd.print(note_name);
lcd.print(F("]")); lcd.print(F("]"));
#if NUM_DEXED > 1
lcd_active_instance_number(selected_instance_id); lcd_active_instance_number(selected_instance_id);
lcd.setCursor(14, 0); lcd.setCursor(14, 0);
lcd.write(0); lcd.write(0);
lcd.setCursor(15, 0); lcd.setCursor(15, 0);
lcd.write(1); lcd.write(1);
#endif
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -1822,13 +1795,11 @@ void UI_func_highest_note(uint8_t param)
lcd.print(note_name); lcd.print(note_name);
lcd.print(F("]")); lcd.print(F("]"));
#if NUM_DEXED > 1
lcd_active_instance_number(selected_instance_id); lcd_active_instance_number(selected_instance_id);
lcd.setCursor(14, 0); lcd.setCursor(14, 0);
lcd.write(0); lcd.write(0);
lcd.setCursor(15, 0); lcd.setCursor(15, 0);
lcd.write(1); lcd.write(1);
#endif
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -1876,13 +1847,11 @@ void UI_func_sound_intensity(uint8_t param)
lcd_special_chars(BLOCKBAR); lcd_special_chars(BLOCKBAR);
lcd_display_bar_int("Voice Level", configuration.dexed[selected_instance_id].sound_intensity, 1.0, SOUND_INTENSITY_MIN, SOUND_INTENSITY_MAX, 3, false, false, true); lcd_display_bar_int("Voice Level", configuration.dexed[selected_instance_id].sound_intensity, 1.0, SOUND_INTENSITY_MIN, SOUND_INTENSITY_MAX, 3, false, false, true);
#if NUM_DEXED > 1
lcd_active_instance_number(selected_instance_id); lcd_active_instance_number(selected_instance_id);
lcd.setCursor(14, 0); lcd.setCursor(14, 0);
lcd.write(0); lcd.write(0);
lcd.setCursor(15, 0); lcd.setCursor(15, 0);
lcd.write(1); lcd.write(1);
#endif
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -1940,13 +1909,11 @@ void UI_func_panorama(uint8_t param)
lcd_special_chars(METERBAR); lcd_special_chars(METERBAR);
lcd_display_meter_float("Panorama", configuration.dexed[selected_instance_id].pan, 0.05, -20.0, PANORAMA_MIN, PANORAMA_MAX, 1, 1, false, true, true); lcd_display_meter_float("Panorama", configuration.dexed[selected_instance_id].pan, 0.05, -20.0, PANORAMA_MIN, PANORAMA_MAX, 1, 1, false, true, true);
#if NUM_DEXED > 1
lcd_active_instance_number(selected_instance_id); lcd_active_instance_number(selected_instance_id);
lcd.setCursor(14, 0); lcd.setCursor(14, 0);
lcd.write(0); lcd.write(0);
lcd.setCursor(15, 0); lcd.setCursor(15, 0);
lcd.write(1); lcd.write(1);
#endif
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -2059,15 +2026,13 @@ void UI_func_polyphony(uint8_t param)
encoderDir[ENC_R].reset(); encoderDir[ENC_R].reset();
lcd_special_chars(BLOCKBAR); lcd_special_chars(BLOCKBAR);
lcd_display_bar_int("Polyphony", configuration.dexed[selected_instance_id].polyphony, 1.0, POLYPHONY_MIN, POLYPHONY_MAX, 3, false, false, true); lcd_display_bar_int("Polyphony", configuration.dexed[selected_instance_id].polyphony, 1.0, POLYPHONY_MIN, POLYPHONY_MAX, 2, false, false, true);
#if NUM_DEXED > 1
lcd_active_instance_number(selected_instance_id); lcd_active_instance_number(selected_instance_id);
lcd.setCursor(14, 0); lcd.setCursor(14, 0);
lcd.write(0); lcd.write(0);
lcd.setCursor(15, 0); lcd.setCursor(15, 0);
lcd.write(1); lcd.write(1);
#endif
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -2076,7 +2041,9 @@ void UI_func_polyphony(uint8_t param)
{ {
if (LCDML.BT_checkDown()) if (LCDML.BT_checkDown())
{ {
#if NUM_DEXED > 1
if (configuration.dexed[0].polyphony + configuration.dexed[1].polyphony + 1 <= POLYPHONY_MAX) if (configuration.dexed[0].polyphony + configuration.dexed[1].polyphony + 1 <= POLYPHONY_MAX)
#endif
configuration.dexed[selected_instance_id].polyphony = constrain(configuration.dexed[selected_instance_id].polyphony + 1, POLYPHONY_MIN, POLYPHONY_MAX); configuration.dexed[selected_instance_id].polyphony = constrain(configuration.dexed[selected_instance_id].polyphony + 1, POLYPHONY_MIN, POLYPHONY_MAX);
} }
else if (LCDML.BT_checkUp()) else if (LCDML.BT_checkUp())
@ -2096,11 +2063,11 @@ void UI_func_polyphony(uint8_t param)
lcd.setCursor(15, 0); lcd.setCursor(15, 0);
lcd.write(1); lcd.write(1);
} }
#endif
lcd_active_instance_number(selected_instance_id); lcd_active_instance_number(selected_instance_id);
#endif
} }
lcd_display_bar_int("Polyphony", configuration.dexed[selected_instance_id].polyphony, 1.0, POLYPHONY_MIN, POLYPHONY_MAX, 3, false, false, false); lcd_display_bar_int("Polyphony", configuration.dexed[selected_instance_id].polyphony, 1.0, POLYPHONY_MIN, POLYPHONY_MAX, 2, false, false, false);
MicroDexed[selected_instance_id]->setMaxNotes(configuration.dexed[selected_instance_id].polyphony); MicroDexed[selected_instance_id]->setMaxNotes(configuration.dexed[selected_instance_id].polyphony);
} }
@ -2125,13 +2092,11 @@ void UI_func_engine(uint8_t param)
lcd.setCursor(0, 0); lcd.setCursor(0, 0);
lcd.print(F("Engine")); lcd.print(F("Engine"));
#if NUM_DEXED > 1
lcd_active_instance_number(selected_instance_id); lcd_active_instance_number(selected_instance_id);
lcd.setCursor(14, 0); lcd.setCursor(14, 0);
lcd.write(0); lcd.write(0);
lcd.setCursor(15, 0); lcd.setCursor(15, 0);
lcd.write(1); lcd.write(1);
#endif
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -2191,13 +2156,11 @@ void UI_func_mono_poly(uint8_t param)
lcd.setCursor(0, 0); lcd.setCursor(0, 0);
lcd.print(F("Mono/Polyphonic")); lcd.print(F("Mono/Polyphonic"));
#if NUM_DEXED > 1
lcd_active_instance_number(selected_instance_id); lcd_active_instance_number(selected_instance_id);
lcd.setCursor(14, 0); lcd.setCursor(14, 0);
lcd.write(0); lcd.write(0);
lcd.setCursor(15, 0); lcd.setCursor(15, 0);
lcd.write(1); lcd.write(1);
#endif
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -2218,8 +2181,8 @@ void UI_func_mono_poly(uint8_t param)
lcd.setCursor(15, 0); lcd.setCursor(15, 0);
lcd.write(1); lcd.write(1);
} }
#endif
lcd_active_instance_number(selected_instance_id); lcd_active_instance_number(selected_instance_id);
#endif
} }
MicroDexed[selected_instance_id]->setMonoMode(!configuration.dexed[selected_instance_id].monopoly); MicroDexed[selected_instance_id]->setMonoMode(!configuration.dexed[selected_instance_id].monopoly);
@ -2257,13 +2220,11 @@ void UI_func_note_refresh(uint8_t param)
lcd.setCursor(0, 0); lcd.setCursor(0, 0);
lcd.print(F("Note Refresh")); lcd.print(F("Note Refresh"));
#if NUM_DEXED > 1
lcd_active_instance_number(selected_instance_id); lcd_active_instance_number(selected_instance_id);
lcd.setCursor(14, 0); lcd.setCursor(14, 0);
lcd.write(0); lcd.write(0);
lcd.setCursor(15, 0); lcd.setCursor(15, 0);
lcd.write(1); lcd.write(1);
#endif
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -2322,13 +2283,11 @@ void UI_func_pb_range(uint8_t param)
lcd_special_chars(BLOCKBAR); lcd_special_chars(BLOCKBAR);
lcd_display_bar_int("PB Range", configuration.dexed[selected_instance_id].pb_range, 1.0, PB_RANGE_MIN, PB_RANGE_MAX, 2, false, false, true); lcd_display_bar_int("PB Range", configuration.dexed[selected_instance_id].pb_range, 1.0, PB_RANGE_MIN, PB_RANGE_MAX, 2, false, false, true);
#if NUM_DEXED > 1
lcd_active_instance_number(selected_instance_id); lcd_active_instance_number(selected_instance_id);
lcd.setCursor(14, 0); lcd.setCursor(14, 0);
lcd.write(0); lcd.write(0);
lcd.setCursor(15, 0); lcd.setCursor(15, 0);
lcd.write(1); lcd.write(1);
#endif
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -2377,13 +2336,11 @@ void UI_func_pb_step(uint8_t param)
lcd_special_chars(BLOCKBAR); lcd_special_chars(BLOCKBAR);
lcd_display_bar_int("PB Step", configuration.dexed[selected_instance_id].pb_step, 1.0, PB_STEP_MIN, PB_STEP_MAX, 2, false, false, true); lcd_display_bar_int("PB Step", configuration.dexed[selected_instance_id].pb_step, 1.0, PB_STEP_MIN, PB_STEP_MAX, 2, false, false, true);
#if NUM_DEXED > 1
lcd_active_instance_number(selected_instance_id); lcd_active_instance_number(selected_instance_id);
lcd.setCursor(14, 0); lcd.setCursor(14, 0);
lcd.write(0); lcd.write(0);
lcd.setCursor(15, 0); lcd.setCursor(15, 0);
lcd.write(1); lcd.write(1);
#endif
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -2432,13 +2389,11 @@ void UI_func_mw_range(uint8_t param)
lcd_special_chars(BLOCKBAR); lcd_special_chars(BLOCKBAR);
lcd_display_bar_int("MW Range", configuration.dexed[selected_instance_id].mw_range, 1.0, MW_RANGE_MIN, MW_RANGE_MAX, 2, false, false, true); lcd_display_bar_int("MW Range", configuration.dexed[selected_instance_id].mw_range, 1.0, MW_RANGE_MIN, MW_RANGE_MAX, 2, false, false, true);
#if NUM_DEXED > 1
lcd_active_instance_number(selected_instance_id); lcd_active_instance_number(selected_instance_id);
lcd.setCursor(14, 0); lcd.setCursor(14, 0);
lcd.write(0); lcd.write(0);
lcd.setCursor(15, 0); lcd.setCursor(15, 0);
lcd.write(1); lcd.write(1);
#endif
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -2487,13 +2442,11 @@ void UI_func_mw_assign(uint8_t param)
lcd.setCursor(0, 0); lcd.setCursor(0, 0);
lcd.print(F("MW Assign")); lcd.print(F("MW Assign"));
#if NUM_DEXED > 1
lcd_active_instance_number(selected_instance_id); lcd_active_instance_number(selected_instance_id);
lcd.setCursor(14, 0); lcd.setCursor(14, 0);
lcd.write(0); lcd.write(0);
lcd.setCursor(15, 0); lcd.setCursor(15, 0);
lcd.write(1); lcd.write(1);
#endif
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -2569,13 +2522,11 @@ void UI_func_mw_mode(uint8_t param)
lcd.setCursor(0, 0); lcd.setCursor(0, 0);
lcd.print(F("MW Mode")); lcd.print(F("MW Mode"));
#if NUM_DEXED > 1
lcd_active_instance_number(selected_instance_id); lcd_active_instance_number(selected_instance_id);
lcd.setCursor(14, 0); lcd.setCursor(14, 0);
lcd.write(0); lcd.write(0);
lcd.setCursor(15, 0); lcd.setCursor(15, 0);
lcd.write(1); lcd.write(1);
#endif
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -2637,14 +2588,11 @@ void UI_func_fc_range(uint8_t param)
lcd_special_chars(BLOCKBAR); lcd_special_chars(BLOCKBAR);
lcd_display_bar_int("FC Range", configuration.dexed[selected_instance_id].fc_range, 1.0, FC_RANGE_MIN, FC_RANGE_MAX, 2, false, false, true); lcd_display_bar_int("FC Range", configuration.dexed[selected_instance_id].fc_range, 1.0, FC_RANGE_MIN, FC_RANGE_MAX, 2, false, false, true);
#if NUM_DEXED > 1
lcd_active_instance_number(selected_instance_id); lcd_active_instance_number(selected_instance_id);
lcd.setCursor(14, 0); lcd.setCursor(14, 0);
lcd.write(0); lcd.write(0);
lcd.setCursor(15, 0); lcd.setCursor(15, 0);
lcd.write(1); lcd.write(1);
#endif
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -2693,13 +2641,11 @@ void UI_func_fc_assign(uint8_t param)
lcd.setCursor(0, 0); lcd.setCursor(0, 0);
lcd.print(F("FC Assign")); lcd.print(F("FC Assign"));
#if NUM_DEXED > 1
lcd_active_instance_number(selected_instance_id); lcd_active_instance_number(selected_instance_id);
lcd.setCursor(14, 0); lcd.setCursor(14, 0);
lcd.write(0); lcd.write(0);
lcd.setCursor(15, 0); lcd.setCursor(15, 0);
lcd.write(1); lcd.write(1);
#endif
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -2775,13 +2721,11 @@ void UI_func_fc_mode(uint8_t param)
lcd.setCursor(0, 0); lcd.setCursor(0, 0);
lcd.print(F("FC Mode")); lcd.print(F("FC Mode"));
#if NUM_DEXED > 1
lcd_active_instance_number(selected_instance_id); lcd_active_instance_number(selected_instance_id);
lcd.setCursor(14, 0); lcd.setCursor(14, 0);
lcd.write(0); lcd.write(0);
lcd.setCursor(15, 0); lcd.setCursor(15, 0);
lcd.write(1); lcd.write(1);
#endif
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -2843,13 +2787,11 @@ void UI_func_bc_range(uint8_t param)
lcd_special_chars(BLOCKBAR); lcd_special_chars(BLOCKBAR);
lcd_display_bar_int("BC Range", configuration.dexed[selected_instance_id].bc_range, 1.0, BC_RANGE_MIN, BC_RANGE_MAX, 2, false, false, true); lcd_display_bar_int("BC Range", configuration.dexed[selected_instance_id].bc_range, 1.0, BC_RANGE_MIN, BC_RANGE_MAX, 2, false, false, true);
#if NUM_DEXED > 1
lcd_active_instance_number(selected_instance_id); lcd_active_instance_number(selected_instance_id);
lcd.setCursor(14, 0); lcd.setCursor(14, 0);
lcd.write(0); lcd.write(0);
lcd.setCursor(15, 0); lcd.setCursor(15, 0);
lcd.write(1); lcd.write(1);
#endif
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -2898,13 +2840,11 @@ void UI_func_bc_assign(uint8_t param)
lcd.setCursor(0, 0); lcd.setCursor(0, 0);
lcd.print(F("BC Assign")); lcd.print(F("BC Assign"));
#if NUM_DEXED > 1
lcd_active_instance_number(selected_instance_id); lcd_active_instance_number(selected_instance_id);
lcd.setCursor(14, 0); lcd.setCursor(14, 0);
lcd.write(0); lcd.write(0);
lcd.setCursor(15, 0); lcd.setCursor(15, 0);
lcd.write(1); lcd.write(1);
#endif
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -2980,13 +2920,11 @@ void UI_func_bc_mode(uint8_t param)
lcd.setCursor(0, 0); lcd.setCursor(0, 0);
lcd.print(F("BC Mode")); lcd.print(F("BC Mode"));
#if NUM_DEXED > 1
lcd_active_instance_number(selected_instance_id); lcd_active_instance_number(selected_instance_id);
lcd.setCursor(14, 0); lcd.setCursor(14, 0);
lcd.write(0); lcd.write(0);
lcd.setCursor(15, 0); lcd.setCursor(15, 0);
lcd.write(1); lcd.write(1);
#endif
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -3048,13 +2986,11 @@ void UI_func_at_range(uint8_t param)
lcd_special_chars(BLOCKBAR); lcd_special_chars(BLOCKBAR);
lcd_display_bar_int("AT Range", configuration.dexed[selected_instance_id].at_range, 1.0, AT_RANGE_MIN, AT_RANGE_MAX, 2, false, false, true); lcd_display_bar_int("AT Range", configuration.dexed[selected_instance_id].at_range, 1.0, AT_RANGE_MIN, AT_RANGE_MAX, 2, false, false, true);
#if NUM_DEXED > 1
lcd_active_instance_number(selected_instance_id); lcd_active_instance_number(selected_instance_id);
lcd.setCursor(14, 0); lcd.setCursor(14, 0);
lcd.write(0); lcd.write(0);
lcd.setCursor(15, 0); lcd.setCursor(15, 0);
lcd.write(1); lcd.write(1);
#endif
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -3104,13 +3040,11 @@ void UI_func_at_assign(uint8_t param)
lcd.setCursor(0, 0); lcd.setCursor(0, 0);
lcd.print(F("AT Assign")); lcd.print(F("AT Assign"));
#if NUM_DEXED > 1
lcd_active_instance_number(selected_instance_id); lcd_active_instance_number(selected_instance_id);
lcd.setCursor(14, 0); lcd.setCursor(14, 0);
lcd.write(0); lcd.write(0);
lcd.setCursor(15, 0); lcd.setCursor(15, 0);
lcd.write(1); lcd.write(1);
#endif
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -3186,13 +3120,11 @@ void UI_func_at_mode(uint8_t param)
lcd.setCursor(0, 0); lcd.setCursor(0, 0);
lcd.print(F("AT Mode")); lcd.print(F("AT Mode"));
#if NUM_DEXED > 1
lcd_active_instance_number(selected_instance_id); lcd_active_instance_number(selected_instance_id);
lcd.setCursor(14, 0); lcd.setCursor(14, 0);
lcd.write(0); lcd.write(0);
lcd.setCursor(15, 0); lcd.setCursor(15, 0);
lcd.write(1); lcd.write(1);
#endif
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -3254,13 +3186,11 @@ void UI_func_portamento_mode(uint8_t param)
lcd.setCursor(0, 0); lcd.setCursor(0, 0);
lcd.print(F("Portamento Mode")); lcd.print(F("Portamento Mode"));
#if NUM_DEXED > 1
lcd_active_instance_number(selected_instance_id); lcd_active_instance_number(selected_instance_id);
lcd.setCursor(14, 0); lcd.setCursor(14, 0);
lcd.write(0); lcd.write(0);
lcd.setCursor(15, 0); lcd.setCursor(15, 0);
lcd.write(1); lcd.write(1);
#endif
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -3324,13 +3254,11 @@ void UI_func_portamento_glissando(uint8_t param)
lcd.setCursor(0, 0); lcd.setCursor(0, 0);
lcd.print(F("Portam. Gliss.")); lcd.print(F("Portam. Gliss."));
#if NUM_DEXED > 1
lcd_active_instance_number(selected_instance_id); lcd_active_instance_number(selected_instance_id);
lcd.setCursor(14, 0); lcd.setCursor(14, 0);
lcd.write(0); lcd.write(0);
lcd.setCursor(15, 0); lcd.setCursor(15, 0);
lcd.write(1); lcd.write(1);
#endif
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -3388,13 +3316,11 @@ void UI_func_portamento_time(uint8_t param)
lcd_special_chars(BLOCKBAR); lcd_special_chars(BLOCKBAR);
lcd_display_bar_int("Portam. Time", configuration.dexed[selected_instance_id].portamento_time, 1.0, PORTAMENTO_TIME_MIN, PORTAMENTO_TIME_MAX, 2, false, false, true); lcd_display_bar_int("Portam. Time", configuration.dexed[selected_instance_id].portamento_time, 1.0, PORTAMENTO_TIME_MIN, PORTAMENTO_TIME_MAX, 2, false, false, true);
#if NUM_DEXED > 1
lcd_active_instance_number(selected_instance_id); lcd_active_instance_number(selected_instance_id);
lcd.setCursor(14, 0); lcd.setCursor(14, 0);
lcd.write(0); lcd.write(0);
lcd.setCursor(15, 0); lcd.setCursor(15, 0);
lcd.write(1); lcd.write(1);
#endif
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -3450,12 +3376,10 @@ void UI_handle_OP(uint8_t param)
for (uint8_t i = 2; i < 8; i++) for (uint8_t i = 2; i < 8; i++)
lcd.write(i); lcd.write(i);
#if NUM_DEXED > 1
lcd.setCursor(14, 0); lcd.setCursor(14, 0);
lcd.write(0); lcd.write(0);
lcd.setCursor(15, 0); lcd.setCursor(15, 0);
lcd.write(1); lcd.write(1);
#endif
lcd.setCursor(op_selected, 1); lcd.setCursor(op_selected, 1);
lcd.blink(); lcd.blink();
@ -3701,19 +3625,17 @@ void UI_func_voice_select(uint8_t param)
if (!get_voice_by_bank_name(configuration.performance.bank[selected_instance_id], bank_name, configuration.performance.voice[selected_instance_id], voice_name, sizeof(voice_name))) if (!get_voice_by_bank_name(configuration.performance.bank[selected_instance_id], bank_name, configuration.performance.voice[selected_instance_id], voice_name, sizeof(voice_name)))
strncpy(voice_name, "*ERROR*", sizeof(voice_name)); strncpy(voice_name, "*ERROR*", sizeof(voice_name));
#if NUM_DEXED > 1
lcd.setCursor(14, 0); lcd.setCursor(14, 0);
lcd.write(0); lcd.write(0);
lcd.setCursor(15, 0); lcd.setCursor(15, 0);
lcd.write(1); lcd.write(1);
#endif
#ifdef TEENSY3 #ifdef TEENSY3_6
lcd.createChar(6, (uint8_t*)special_chars[16]); // MIDI activity note symbol lcd.createChar(6, (uint8_t*)special_chars[16]); // MIDI activity note symbol
lcd.createChar(7, (uint8_t*)special_chars[16]); // MIDI activity note symbol
#endif #endif
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
{ {
char bank_name[BANK_NAME_LEN]; char bank_name[BANK_NAME_LEN];
@ -3807,7 +3729,6 @@ void UI_func_voice_select(uint8_t param)
break; break;
} }
} }
#if NUM_DEXED == 1
else if (LCDML.BT_checkEnter()) else if (LCDML.BT_checkEnter())
{ {
if (menu_voice_select == MENU_VOICE_BANK) if (menu_voice_select == MENU_VOICE_BANK)
@ -3815,38 +3736,6 @@ void UI_func_voice_select(uint8_t param)
else else
menu_voice_select = MENU_VOICE_BANK; menu_voice_select = MENU_VOICE_BANK;
} }
#else
else if (LCDML.BT_checkEnter())
{
if (menu_voice_select == MENU_VOICE_BANK)
{
menu_voice_select = MENU_VOICE_SOUND;
selected_instance_id = !selected_instance_id;
lcd_active_instance_number(selected_instance_id);
char bank_name[BANK_NAME_LEN];
char voice_name[VOICE_NAME_LEN];
if (!get_bank_name(configuration.performance.bank[selected_instance_id], bank_name, sizeof(bank_name)))
strncpy(bank_name, "*ERROR*", sizeof(bank_name));
if (!get_voice_by_bank_name(configuration.performance.bank[selected_instance_id], bank_name, configuration.performance.voice[selected_instance_id], voice_name, sizeof(voice_name)))
strncpy(voice_name, "*ERROR*", sizeof(voice_name));
lcd.show(0, 0, 2, configuration.performance.bank[selected_instance_id]);
lcd.show(1, 0, 2, configuration.performance.voice[selected_instance_id] + 1);
lcd.show(0, 3, 10, bank_name);
lcd.show(1, 3, 10, voice_name);
lcd.setCursor(14, 0);
lcd.write(0);
lcd.setCursor(15, 0);
lcd.write(1);
}
else
menu_voice_select = MENU_VOICE_BANK;
}
#endif
} }
if (strlen(g_bank_name[selected_instance_id]) > 0) if (strlen(g_bank_name[selected_instance_id]) > 0)
@ -5163,8 +5052,13 @@ void lcd_active_instance_number(uint8_t instance_id)
} }
} }
#if NUM_DEXED == 1
lcd.createChar(0, instance_num[0]);
lcd.createChar(1, (uint8_t*)special_chars[17]);
#else
lcd.createChar(0, instance_num[0]); lcd.createChar(0, instance_num[0]);
lcd.createChar(1, instance_num[1]); lcd.createChar(1, instance_num[1]);
#endif
} }
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)

@ -245,7 +245,7 @@
//************************************************************************************************* //*************************************************************************************************
//* DO NO CHANGE ANYTHING BEYOND IF YOU DON'T KNOW WHAT YOU ARE DOING !!! //* DO NO CHANGE ANYTHING BEYOND IF YOU DON'T KNOW WHAT YOU ARE DOING !!!
//************************************************************************************************* //*************************************************************************************************
#define NUM_DEXED 1 // 1 or 2 - nothing else! #define NUM_DEXED 2 // 1 or 2 - nothing else!
#define MAX_DEXED 2 // No! - even don't think about increasing this number! IT WILL PRODUCE MASSIVE PROBLEMS! #define MAX_DEXED 2 // No! - even don't think about increasing this number! IT WILL PRODUCE MASSIVE PROBLEMS!
//#define CPU_OVERLOAD_THROTTLE 95.0 // Level (in percent) when throttling should start //#define CPU_OVERLOAD_THROTTLE 95.0 // Level (in percent) when throttling should start
#define CPU_OVERLOAD_THROTTLE_TIMER 100 // timer (in ms) when next throttling is possible #define CPU_OVERLOAD_THROTTLE_TIMER 100 // timer (in ms) when next throttling is possible

Loading…
Cancel
Save