|
|
|
@ -3350,18 +3350,16 @@ void UI_func_voice_select(uint8_t param) |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
if (instance_id == 0) |
|
|
|
|
{ |
|
|
|
|
eeprom_update_var(offsetof(configuration_s, performance.voice[0]), configuration.performance.voice[0], "configuration.performance.voice[0]"); |
|
|
|
|
eeprom_update_var(offsetof(configuration_s, performance.bank[0]), configuration.performance.bank[0], "configuration.performance.bank[0]"); |
|
|
|
|
show_configuration(); |
|
|
|
|
|
|
|
|
|
//EEPROM.update(EEPROM_START_ADDRESS + offsetof(configuration_s, performance.voice[0]), configuration.performance.voice[0]);
|
|
|
|
|
//EEPROM.update(EEPROM_START_ADDRESS + offsetof(configuration_s, performance.bank[0]), configuration.performance.bank[0]);
|
|
|
|
|
//eeprom_update_var(offsetof(configuration_s, performance.voice[0]), configuration.performance.voice[0], "configuration.performance.voice[0]");
|
|
|
|
|
//eeprom_update_var(offsetof(configuration_s, performance.bank[0]), configuration.performance.bank[0], "configuration.performance.bank[0]");
|
|
|
|
|
EEPROM.update(EEPROM_START_ADDRESS + offsetof(configuration_s, performance.voice[0]), configuration.performance.voice[0]); |
|
|
|
|
EEPROM.update(EEPROM_START_ADDRESS + offsetof(configuration_s, performance.bank[0]), configuration.performance.bank[0]); |
|
|
|
|
} |
|
|
|
|
#if NUM_DEXED > 1 |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
EEPROM.update(EEPROM_START_ADDRESS + offsetof(configuration_s, performance.voice[1]), configuration.performance.voice[1]); |
|
|
|
|
EEPROM.update(EEPROM_START_ADDRESS + offsetof(configuration_s, performance.bank[1]), configuration.performance.bank[1]); |
|
|
|
|
EEPROM.update(EEPROM_START_ADDRESS + offsetof(configuration_s, performance.voice[0]), configuration.performance.voice[1]); |
|
|
|
|
EEPROM.update(EEPROM_START_ADDRESS + offsetof(configuration_s, performance.bank[0]), configuration.performance.bank[1]); |
|
|
|
|
} |
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
@ -3451,13 +3449,23 @@ void UI_func_load_performance(uint8_t param) |
|
|
|
|
if (load_sd_performance(configuration.sys.performance_number) == false) |
|
|
|
|
lcd.print("Does not exist."); |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
load_sd_voice(configuration.performance.bank[0], configuration.performance.voice[0], 0); |
|
|
|
|
load_sd_voiceconfig(configuration.performance.voiceconfig_number[0], 0); |
|
|
|
|
set_voiceconfig_params(0); |
|
|
|
|
#if NUM_DEXED > 1 |
|
|
|
|
set_voiceconfig_params(1); |
|
|
|
|
load_sd_voice(configuration.performance.bank[0], configuration.performance.voice[1], 1); |
|
|
|
|
load_sd_voiceconfig(configuration.performance.voiceconfig_number[1], 1); |
|
|
|
|
#endif |
|
|
|
|
load_sd_fx(configuration.performance.fx_number); |
|
|
|
|
set_fx_params(); |
|
|
|
|
|
|
|
|
|
lcd.print("Done. "); |
|
|
|
|
} |
|
|
|
|
delay(500); |
|
|
|
|
|
|
|
|
|
if (LCDML.MENU_getLastActivFunctionID() < 0xff) |
|
|
|
|
LCDML.OTHER_jumpToID(LCDML.MENU_getLastActivFunctionID()); |
|
|
|
|
else |
|
|
|
|
LCDML.OTHER_setCursorToID(LCDML.MENU_getLastCursorPositionID()); |
|
|
|
|
LCDML.FUNC_goBackToMenu(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
@ -3513,7 +3521,7 @@ void UI_func_save_performance(uint8_t param) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
char tmp[FILENAME_LEN]; |
|
|
|
|
sprintf(tmp, "/%s%d.syx", PERFORMANCE_CONFIG_NAME, configuration.sys.performance_number); |
|
|
|
|
sprintf(tmp, "/%s/%s%d.syx", PERFORMANCE_CONFIG_PATH, PERFORMANCE_CONFIG_NAME, configuration.sys.performance_number); |
|
|
|
|
if (SD.exists(tmp)) |
|
|
|
|
overwrite = true; |
|
|
|
|
else |
|
|
|
@ -3554,7 +3562,7 @@ void UI_func_save_performance(uint8_t param) |
|
|
|
|
if (yesno == true) |
|
|
|
|
{ |
|
|
|
|
char tmp[FILENAME_LEN]; |
|
|
|
|
sprintf(tmp, "/%s%d.syx", PERFORMANCE_CONFIG_NAME, configuration.sys.performance_number); |
|
|
|
|
sprintf(tmp, "/%s/%s%d.syx", PERFORMANCE_CONFIG_PATH, PERFORMANCE_CONFIG_NAME, configuration.sys.performance_number); |
|
|
|
|
SD.remove(tmp); |
|
|
|
|
} |
|
|
|
|
save_sd_performance(configuration.performance.fx_number); |
|
|
|
@ -3563,17 +3571,14 @@ void UI_func_save_performance(uint8_t param) |
|
|
|
|
delay(500); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.MENU_getLastActivFunctionID() < 0xff) |
|
|
|
|
LCDML.OTHER_jumpToID(LCDML.MENU_getLastActivFunctionID()); |
|
|
|
|
else |
|
|
|
|
LCDML.OTHER_setCursorToID(LCDML.MENU_getLastCursorPositionID()); |
|
|
|
|
LCDML.FUNC_goBackToMenu(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (mode == 0) |
|
|
|
|
{ |
|
|
|
|
char tmp[FILENAME_LEN]; |
|
|
|
|
sprintf(tmp, "/%s%d.syx", PERFORMANCE_CONFIG_NAME, configuration.sys.performance_number); |
|
|
|
|
sprintf(tmp, "/%s/%s%d.syx", PERFORMANCE_CONFIG_PATH, PERFORMANCE_CONFIG_NAME, configuration.sys.performance_number); |
|
|
|
|
if (SD.exists(tmp)) |
|
|
|
|
overwrite = true; |
|
|
|
|
else |
|
|
|
@ -3679,10 +3684,7 @@ void UI_func_load_voiceconfig(uint8_t param) |
|
|
|
|
|
|
|
|
|
delay(500); |
|
|
|
|
|
|
|
|
|
if (LCDML.MENU_getLastActivFunctionID() < 0xff) |
|
|
|
|
LCDML.OTHER_jumpToID(LCDML.MENU_getLastActivFunctionID()); |
|
|
|
|
else |
|
|
|
|
LCDML.OTHER_setCursorToID(LCDML.MENU_getLastCursorPositionID()); |
|
|
|
|
LCDML.FUNC_goBackToMenu(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (mode == 0) |
|
|
|
@ -3759,7 +3761,7 @@ void UI_func_save_voiceconfig(uint8_t param) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
char tmp[FILENAME_LEN]; |
|
|
|
|
sprintf(tmp, "/%s%d.syx", VOICE_CONFIG_NAME, configuration.performance.voiceconfig_number[instance_id]); |
|
|
|
|
sprintf(tmp, "/%s/%s%d.syx", VOICE_CONFIG_PATH, VOICE_CONFIG_NAME, configuration.performance.voiceconfig_number[instance_id]); |
|
|
|
|
if (SD.exists(tmp)) |
|
|
|
|
overwrite = true; |
|
|
|
|
else |
|
|
|
@ -3805,7 +3807,7 @@ void UI_func_save_voiceconfig(uint8_t param) |
|
|
|
|
if (yesno == true) |
|
|
|
|
{ |
|
|
|
|
char tmp[FILENAME_LEN]; |
|
|
|
|
sprintf(tmp, "/%s%d.syx", VOICE_CONFIG_NAME, configuration.performance.voiceconfig_number[instance_id]); |
|
|
|
|
sprintf(tmp, "/%s/%s%d.syx", VOICE_CONFIG_PATH, VOICE_CONFIG_NAME, configuration.performance.voiceconfig_number[instance_id]); |
|
|
|
|
SD.remove(tmp); |
|
|
|
|
} |
|
|
|
|
save_sd_voiceconfig(configuration.performance.voiceconfig_number[instance_id], instance_id); |
|
|
|
@ -3814,10 +3816,7 @@ void UI_func_save_voiceconfig(uint8_t param) |
|
|
|
|
delay(500); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.MENU_getLastActivFunctionID() < 0xff) |
|
|
|
|
LCDML.OTHER_jumpToID(LCDML.MENU_getLastActivFunctionID()); |
|
|
|
|
else |
|
|
|
|
LCDML.OTHER_setCursorToID(LCDML.MENU_getLastCursorPositionID()); |
|
|
|
|
LCDML.FUNC_goBackToMenu(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -3829,7 +3828,7 @@ void UI_func_save_voiceconfig(uint8_t param) |
|
|
|
|
else if (mode == 1) |
|
|
|
|
{ |
|
|
|
|
char tmp[FILENAME_LEN]; |
|
|
|
|
sprintf(tmp, "/%s%d.syx", VOICE_CONFIG_NAME, configuration.performance.voiceconfig_number[instance_id]); |
|
|
|
|
sprintf(tmp, "/%s/%s%d.syx", VOICE_CONFIG_PATH, VOICE_CONFIG_NAME, configuration.performance.voiceconfig_number[instance_id]); |
|
|
|
|
if (SD.exists(tmp)) |
|
|
|
|
overwrite = true; |
|
|
|
|
else |
|
|
|
@ -3917,10 +3916,7 @@ void UI_func_load_fx(uint8_t param) |
|
|
|
|
|
|
|
|
|
delay(500); |
|
|
|
|
|
|
|
|
|
if (LCDML.MENU_getLastActivFunctionID() < 0xff) |
|
|
|
|
LCDML.OTHER_jumpToID(LCDML.MENU_getLastActivFunctionID()); |
|
|
|
|
else |
|
|
|
|
LCDML.OTHER_setCursorToID(LCDML.MENU_getLastCursorPositionID()); |
|
|
|
|
LCDML.FUNC_goBackToMenu(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
@ -3976,7 +3972,7 @@ void UI_func_save_fx(uint8_t param) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
char tmp[FILENAME_LEN]; |
|
|
|
|
sprintf(tmp, "/%s%d.syx", FX_CONFIG_NAME, configuration.performance.fx_number); |
|
|
|
|
sprintf(tmp, "/%s/%s%d.syx", FX_CONFIG_PATH, FX_CONFIG_NAME, configuration.performance.fx_number); |
|
|
|
|
if (SD.exists(tmp)) |
|
|
|
|
overwrite = true; |
|
|
|
|
else |
|
|
|
@ -4017,7 +4013,7 @@ void UI_func_save_fx(uint8_t param) |
|
|
|
|
if (yesno == true) |
|
|
|
|
{ |
|
|
|
|
char tmp[FILENAME_LEN]; |
|
|
|
|
sprintf(tmp, "/%s%d.syx", FX_CONFIG_NAME, configuration.performance.fx_number); |
|
|
|
|
sprintf(tmp, "/%s/%s%d.syx", FX_CONFIG_PATH, FX_CONFIG_NAME, configuration.performance.fx_number); |
|
|
|
|
SD.remove(tmp); |
|
|
|
|
} |
|
|
|
|
save_sd_fx(configuration.performance.fx_number); |
|
|
|
@ -4026,17 +4022,14 @@ void UI_func_save_fx(uint8_t param) |
|
|
|
|
delay(500); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.MENU_getLastActivFunctionID() < 0xff) |
|
|
|
|
LCDML.OTHER_jumpToID(LCDML.MENU_getLastActivFunctionID()); |
|
|
|
|
else |
|
|
|
|
LCDML.OTHER_setCursorToID(LCDML.MENU_getLastCursorPositionID()); |
|
|
|
|
LCDML.FUNC_goBackToMenu(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (mode == 0) |
|
|
|
|
{ |
|
|
|
|
char tmp[FILENAME_LEN]; |
|
|
|
|
sprintf(tmp, "/%s%d.syx", FX_CONFIG_NAME, configuration.performance.fx_number); |
|
|
|
|
sprintf(tmp, "/%s/%s%d.syx", FX_CONFIG_PATH, FX_CONFIG_NAME, configuration.performance.fx_number); |
|
|
|
|
if (SD.exists(tmp)) |
|
|
|
|
overwrite = true; |
|
|
|
|
else |
|
|
|
|