|
|
|
@ -6626,7 +6626,7 @@ void UI_func_save_performance(uint8_t param) |
|
|
|
|
|
|
|
|
|
void UI_func_load_voiceconfig(uint8_t param) |
|
|
|
|
{ |
|
|
|
|
#if NUMDEXED > 1 |
|
|
|
|
#if NUM_DEXED > 1 |
|
|
|
|
static int8_t selected_instance_id; |
|
|
|
|
#else |
|
|
|
|
uint8_t selected_instance_id = 0; |
|
|
|
@ -6636,15 +6636,14 @@ void UI_func_load_voiceconfig(uint8_t param) |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
|
{ |
|
|
|
|
char tmp[10]; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
selected_instance_id = 0; |
|
|
|
|
|
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 0); |
|
|
|
|
lcd.print(F("Load VoiceCfg SD")); |
|
|
|
|
#if NUMDEXED > 1 |
|
|
|
|
#if NUM_DEXED > 1 |
|
|
|
|
mode = 0; |
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
lcd.print(F("Instance [0]")); |
|
|
|
@ -6663,29 +6662,33 @@ void UI_func_load_voiceconfig(uint8_t param) |
|
|
|
|
if (LCDML.BT_checkDown()) |
|
|
|
|
{ |
|
|
|
|
if (mode == 0) |
|
|
|
|
selected_instance_id = (selected_instance_id + 1) % 2; |
|
|
|
|
selected_instance_id = 1; |
|
|
|
|
//selected_instance_id = (selected_instance_id + 1) % 2;
|
|
|
|
|
else if (mode == 1) |
|
|
|
|
configuration.performance.voiceconfig_number[selected_instance_id] = constrain(configuration.performance.voiceconfig_number[selected_instance_id] + ENCODER[ENC_L].speed(), VOICECONFIG_NUM_MIN, VOICECONFIG_NUM_MAX); |
|
|
|
|
} |
|
|
|
|
else if (LCDML.BT_checkUp()) |
|
|
|
|
{ |
|
|
|
|
if (mode == 0) |
|
|
|
|
selected_instance_id = (selected_instance_id - 1) % 2; |
|
|
|
|
//selected_instance_id = (selected_instance_id - 1) % 2;
|
|
|
|
|
selected_instance_id = 0; |
|
|
|
|
else if (mode == 1) |
|
|
|
|
configuration.performance.voiceconfig_number[selected_instance_id] = constrain(configuration.performance.voiceconfig_number[selected_instance_id] - ENCODER[ENC_L].speed(), VOICECONFIG_NUM_MIN, VOICECONFIG_NUM_MAX); |
|
|
|
|
} |
|
|
|
|
else if (LCDML.BT_checkEnter()) |
|
|
|
|
{ |
|
|
|
|
mode = 0xff; |
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
if (load_sd_voiceconfig_json(configuration.performance.voiceconfig_number[selected_instance_id], selected_instance_id) == false) |
|
|
|
|
lcd.print("Does not exist. "); |
|
|
|
|
else |
|
|
|
|
lcd.print("Done. "); |
|
|
|
|
if (mode > 0) { |
|
|
|
|
mode = 0xff; |
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
if (load_sd_voiceconfig_json(configuration.performance.voiceconfig_number[selected_instance_id], selected_instance_id) == false) |
|
|
|
|
lcd.print("Does not exist. "); |
|
|
|
|
else |
|
|
|
|
lcd.print("Done. "); |
|
|
|
|
|
|
|
|
|
delay(MESSAGE_WAIT_TIME); |
|
|
|
|
delay(MESSAGE_WAIT_TIME); |
|
|
|
|
|
|
|
|
|
LCDML.FUNC_goBackToMenu(); |
|
|
|
|
LCDML.FUNC_goBackToMenu(); |
|
|
|
|
} else mode = 1; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (mode == 0) |
|
|
|
@ -6727,7 +6730,7 @@ void UI_func_load_voiceconfig(uint8_t param) |
|
|
|
|
|
|
|
|
|
void UI_func_save_voiceconfig(uint8_t param) |
|
|
|
|
{ |
|
|
|
|
#if NUMDEXED > 1 |
|
|
|
|
#if NUM_DEXED > 1 |
|
|
|
|
static int8_t selected_instance_id; |
|
|
|
|
#else |
|
|
|
|
uint8_t selected_instance_id = 0; |
|
|
|
@ -6739,8 +6742,6 @@ void UI_func_save_voiceconfig(uint8_t param) |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
|
{ |
|
|
|
|
char tmp[FILENAME_LEN]; |
|
|
|
|
|
|
|
|
|
yesno = false; |
|
|
|
|
selected_instance_id = 0; |
|
|
|
|
|
|
|
|
@ -6748,7 +6749,7 @@ void UI_func_save_voiceconfig(uint8_t param) |
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 0); |
|
|
|
|
lcd.print(F("Save VoiceCfg SD")); |
|
|
|
|
#if NUMDEXED > 1 |
|
|
|
|
#if NUM_DEXED > 1 |
|
|
|
|
mode = 0; |
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
lcd.print(F("Instance [0]")); |
|
|
|
@ -6773,7 +6774,8 @@ void UI_func_save_voiceconfig(uint8_t param) |
|
|
|
|
if (LCDML.BT_checkDown()) |
|
|
|
|
{ |
|
|
|
|
if (mode == 0) |
|
|
|
|
selected_instance_id = (selected_instance_id + 1) % 2; |
|
|
|
|
selected_instance_id = 1; |
|
|
|
|
// selected_instance_id = (selected_instance_id +1) % 2;
|
|
|
|
|
else if (mode == 1) |
|
|
|
|
configuration.performance.voiceconfig_number[selected_instance_id] = constrain(configuration.performance.voiceconfig_number[selected_instance_id] + ENCODER[ENC_L].speed(), VOICECONFIG_NUM_MIN, VOICECONFIG_NUM_MAX); |
|
|
|
|
else |
|
|
|
@ -6782,7 +6784,8 @@ void UI_func_save_voiceconfig(uint8_t param) |
|
|
|
|
else if (LCDML.BT_checkUp()) |
|
|
|
|
{ |
|
|
|
|
if (mode == 0) |
|
|
|
|
selected_instance_id = (selected_instance_id - 1) % 2; |
|
|
|
|
selected_instance_id = 0; |
|
|
|
|
//selected_instance_id = (selected_instance_id - 1) % 2;
|
|
|
|
|
else if (mode == 1) |
|
|
|
|
configuration.performance.voiceconfig_number[selected_instance_id] = constrain(configuration.performance.voiceconfig_number[selected_instance_id] - ENCODER[ENC_L].speed(), VOICECONFIG_NUM_MIN, VOICECONFIG_NUM_MAX); |
|
|
|
|
else |
|
|
|
@ -6796,7 +6799,7 @@ void UI_func_save_voiceconfig(uint8_t param) |
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
lcd.print(F("Overwrite: [ ]")); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
else if (mode > 0 ) |
|
|
|
|
{ |
|
|
|
|
mode = 0xff; |
|
|
|
|
if (overwrite == false || yesno == true) |
|
|
|
@ -6822,12 +6825,18 @@ void UI_func_save_voiceconfig(uint8_t param) |
|
|
|
|
lcd.print(tmp); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
else { |
|
|
|
|
mode = 1; |
|
|
|
|
lcd.setCursor(4, 1); |
|
|
|
|
lcd.print(" "); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (mode == 0) |
|
|
|
|
{ |
|
|
|
|
lcd.setCursor(10, 1); |
|
|
|
|
lcd.print(configuration.performance.voiceconfig_number[selected_instance_id]); |
|
|
|
|
//lcd.print(configuration.performance.voiceconfig_number[selected_instance_id]);
|
|
|
|
|
lcd.print(selected_instance_id); |
|
|
|
|
} |
|
|
|
|
else if (mode == 1) |
|
|
|
|
{ |
|
|
|
@ -7708,11 +7717,8 @@ void UI_func_eq_1(uint8_t param) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
lcd_display_meter_float("EQ 50Hz", configuration.fx.eq_1, 0.1, 0.0, EQ_1_MIN, EQ_1_MAX, 1, 1, false, true, true); |
|
|
|
|
sgtl5000.setEQGain(1, mapfloat(configuration.fx.eq_1, EQ_1_MIN, EQ_1_MAX, -9.9, 9.9)); |
|
|
|
|
sgtl5000.setEQGain(1, mapfloat(configuration.fx.eq_1, EQ_1_MIN, EQ_1_MAX, 0.0, 1.0)); |
|
|
|
|
sgtl5000.commitFilter(1); |
|
|
|
|
#ifdef DEBUG |
|
|
|
|
sgtl5000.show_params(1); |
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
@ -7756,11 +7762,8 @@ void UI_func_eq_2(uint8_t param) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
lcd_display_meter_float("EQ 120Hz", configuration.fx.eq_2, 0.1, 0.0, EQ_2_MIN, EQ_2_MAX, 1, 1, false, true, true); |
|
|
|
|
sgtl5000.setEQGain(2, mapfloat(configuration.fx.eq_2, EQ_2_MIN, EQ_2_MAX, -9.9, 9.9)); |
|
|
|
|
sgtl5000.setEQGain(2, mapfloat(configuration.fx.eq_2, EQ_2_MIN, EQ_2_MAX, 0.0, 1.0)); |
|
|
|
|
sgtl5000.commitFilter(2); |
|
|
|
|
#ifdef DEBUG |
|
|
|
|
sgtl5000.show_params(2); |
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
@ -7804,11 +7807,8 @@ void UI_func_eq_3(uint8_t param) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
lcd_display_meter_float("EQ 220Hz", configuration.fx.eq_3, 0.1, 0.0, EQ_3_MIN, EQ_3_MAX, 1, 1, false, true, true); |
|
|
|
|
sgtl5000.setEQGain(3, mapfloat(configuration.fx.eq_3, EQ_3_MIN, EQ_3_MAX, -9.9, 9.9)); |
|
|
|
|
sgtl5000.setEQGain(3, mapfloat(configuration.fx.eq_3, EQ_3_MIN, EQ_3_MAX, 0.0, 1.0)); |
|
|
|
|
sgtl5000.commitFilter(3); |
|
|
|
|
#ifdef DEBUG |
|
|
|
|
sgtl5000.show_params(3); |
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
@ -7852,11 +7852,8 @@ void UI_func_eq_4(uint8_t param) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
lcd_display_meter_float("EQ 1000Hz", configuration.fx.eq_4, 0.1, 0.0, EQ_4_MIN, EQ_4_MAX, 1, 1, false, true, true); |
|
|
|
|
sgtl5000.setEQGain(4, mapfloat(configuration.fx.eq_4, EQ_4_MIN, EQ_4_MAX, -9.9, 9.9)); |
|
|
|
|
sgtl5000.setEQGain(4, mapfloat(configuration.fx.eq_4, EQ_4_MIN, EQ_4_MAX, 0.0, 1.0)); |
|
|
|
|
sgtl5000.commitFilter(4); |
|
|
|
|
#ifdef DEBUG |
|
|
|
|
sgtl5000.show_params(4); |
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
@ -7900,11 +7897,8 @@ void UI_func_eq_5(uint8_t param) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
lcd_display_meter_float("EQ 2000Hz", configuration.fx.eq_5, 0.1, 0.0, EQ_5_MIN, EQ_5_MAX, 1, 1, false, true, true); |
|
|
|
|
sgtl5000.setEQGain(5, mapfloat(configuration.fx.eq_5, EQ_5_MIN, EQ_5_MAX, -9.9, 9.9)); |
|
|
|
|
sgtl5000.setEQGain(5, mapfloat(configuration.fx.eq_5, EQ_5_MIN, EQ_5_MAX, 0.0, 1.0)); |
|
|
|
|
sgtl5000.commitFilter(5); |
|
|
|
|
#ifdef DEBUG |
|
|
|
|
sgtl5000.show_params(5); |
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
@ -7948,11 +7942,8 @@ void UI_func_eq_6(uint8_t param) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
lcd_display_meter_float("EQ 7000Hz", configuration.fx.eq_6, 0.1, 0.0, EQ_6_MIN, EQ_6_MAX, 1, 1, false, true, true); |
|
|
|
|
sgtl5000.setEQGain(6, mapfloat(configuration.fx.eq_6, EQ_6_MIN, EQ_6_MAX, -9.9, 9.9)); |
|
|
|
|
sgtl5000.setEQGain(6, mapfloat(configuration.fx.eq_6, EQ_6_MIN, EQ_6_MAX, 0.0, 1.0)); |
|
|
|
|
sgtl5000.commitFilter(6); |
|
|
|
|
#ifdef DEBUG |
|
|
|
|
sgtl5000.show_params(1); |
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
@ -7998,9 +7989,6 @@ void UI_func_eq_7(uint8_t param) |
|
|
|
|
lcd_display_meter_float("EQ 10000Hz", configuration.fx.eq_7, 0.1, 0.0, EQ_7_MIN, EQ_7_MAX, 1, 1, false, true, true); |
|
|
|
|
sgtl5000.setEQGain(7, mapfloat(configuration.fx.eq_7, EQ_7_MIN, EQ_7_MAX, 0.0, 1.0)); |
|
|
|
|
sgtl5000.commitFilter(7); |
|
|
|
|
#ifdef DEBUG |
|
|
|
|
sgtl5000.show_params(7); |
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|