|
|
@ -3168,8 +3168,12 @@ void UI_func_volume(uint8_t param) |
|
|
|
|
|
|
|
|
|
|
|
void UI_func_load_performance(uint8_t param) |
|
|
|
void UI_func_load_performance(uint8_t param) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
static uint8_t mode; |
|
|
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
mode = 0; |
|
|
|
|
|
|
|
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 0); |
|
|
|
lcd.setCursor(0, 0); |
|
|
@ -3187,7 +3191,7 @@ void UI_func_load_performance(uint8_t param) |
|
|
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_loop()) // ****** LOOP *********
|
|
|
|
if (LCDML.FUNC_loop()) // ****** LOOP *********
|
|
|
|
{ |
|
|
|
{ |
|
|
|
if ((LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) || (LCDML.BT_checkUp() && encoderDir[ENC_R].Up())) |
|
|
|
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()) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -3197,6 +3201,23 @@ void UI_func_load_performance(uint8_t param) |
|
|
|
{ |
|
|
|
{ |
|
|
|
configuration.sys.performance_number = constrain(configuration.sys.performance_number - ENCODER[ENC_L].speed(), PERFORMANCE_NUM_MIN, PERFORMANCE_NUM_MAX); |
|
|
|
configuration.sys.performance_number = constrain(configuration.sys.performance_number - ENCODER[ENC_L].speed(), PERFORMANCE_NUM_MIN, PERFORMANCE_NUM_MAX); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
else if (LCDML.BT_checkEnter()) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
mode = 0xff; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
eeprom_write(); |
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
|
|
|
if (load_sd_performance(configuration.sys.performance_number) == false) |
|
|
|
|
|
|
|
lcd.print("Does not exist."); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
lcd.print("Done. "); |
|
|
|
|
|
|
|
delay(500); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (LCDML.MENU_getLastActivFunctionID() < 0xff) |
|
|
|
|
|
|
|
LCDML.OTHER_jumpToID(LCDML.MENU_getLastActivFunctionID()); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
LCDML.OTHER_setCursorToID(LCDML.MENU_getLastCursorPositionID()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
lcd.setCursor(0, 1); |
|
|
|
if (configuration.sys.performance_number == 0) |
|
|
|
if (configuration.sys.performance_number == 0) |
|
|
@ -3212,11 +3233,13 @@ void UI_func_load_performance(uint8_t param) |
|
|
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
{ |
|
|
|
{ |
|
|
|
eeprom_write(); |
|
|
|
if (mode < 0xff) |
|
|
|
load_sd_performance(configuration.sys.performance_number); |
|
|
|
{ |
|
|
|
lcd.setCursor(0, 1); |
|
|
|
lcd.setCursor(0, 1); |
|
|
|
lcd.print("Done. "); |
|
|
|
lcd.print("Canceled "); |
|
|
|
delay(500); |
|
|
|
delay(500); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -3282,7 +3305,20 @@ void UI_func_save_performance(uint8_t param) |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
{ |
|
|
|
LCDML.BT_quit(); // does not help :(
|
|
|
|
mode = 0xff; |
|
|
|
|
|
|
|
eeprom_write(); |
|
|
|
|
|
|
|
if (overwrite == false || yesno == true) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
save_sd_performance(configuration.performance.fx_number); |
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
|
|
|
lcd.print("Done. "); |
|
|
|
|
|
|
|
delay(500); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (LCDML.MENU_getLastActivFunctionID() < 0xff) |
|
|
|
|
|
|
|
LCDML.OTHER_jumpToID(LCDML.MENU_getLastActivFunctionID()); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
LCDML.OTHER_setCursorToID(LCDML.MENU_getLastCursorPositionID()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -3319,14 +3355,13 @@ void UI_func_save_performance(uint8_t param) |
|
|
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
{ |
|
|
|
{ |
|
|
|
eeprom_write(); |
|
|
|
if (mode < 0xff) |
|
|
|
if (overwrite == false || yesno == true) |
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
save_sd_performance(configuration.sys.performance_number); |
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
lcd.setCursor(0, 1); |
|
|
|
lcd.print("Done. "); |
|
|
|
lcd.print("Canceled "); |
|
|
|
delay(500); |
|
|
|
delay(500); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -3335,92 +3370,99 @@ void UI_func_load_voiceconfig(uint8_t param) |
|
|
|
{ |
|
|
|
{ |
|
|
|
#if NUMDEXED > 1 |
|
|
|
#if NUMDEXED > 1 |
|
|
|
static int8_t instance_id; |
|
|
|
static int8_t instance_id; |
|
|
|
static uint8_t chosen; |
|
|
|
|
|
|
|
#else |
|
|
|
#else |
|
|
|
uint8_t instance_id = 0; |
|
|
|
uint8_t instance_id = 0; |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
static bool yesno; |
|
|
|
|
|
|
|
|
|
|
|
static uint8_t mode; |
|
|
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
instance_id = 0; |
|
|
|
|
|
|
|
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 0); |
|
|
|
lcd.setCursor(0, 0); |
|
|
|
lcd.print(F("Load Config SD")); |
|
|
|
lcd.print(F("Load Voice Cfg")); |
|
|
|
|
|
|
|
|
|
|
|
#if NUMDEXED > 1 |
|
|
|
#if NUMDEXED > 1 |
|
|
|
instance_id = -1; |
|
|
|
mode = 0; |
|
|
|
chosen = 0; |
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
lcd.setCursor(0, 1); |
|
|
|
lcd.print(F("Instance [1]")); |
|
|
|
lcd.print(F("Instance [0]")); |
|
|
|
#else |
|
|
|
#else |
|
|
|
|
|
|
|
mode = 1; |
|
|
|
lcd.setCursor(0, 1); |
|
|
|
lcd.setCursor(0, 1); |
|
|
|
lcd.print(F("[NO ]")); |
|
|
|
if (configuration.performance.voiceconfig_number[instance_id] == 0) |
|
|
|
|
|
|
|
lcd.print(F("[DEFAULT]")); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
char tmp[10]; |
|
|
|
|
|
|
|
sprintf(tmp, "[%7d]", configuration.performance.voiceconfig_number[instance_id]); |
|
|
|
|
|
|
|
lcd.print(tmp); |
|
|
|
|
|
|
|
} |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
yesno = false; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_loop()) // ****** LOOP *********
|
|
|
|
if (LCDML.FUNC_loop()) // ****** LOOP *********
|
|
|
|
{ |
|
|
|
{ |
|
|
|
if ((LCDML.BT_checkEnter() && encoderDir[ENC_R].ButtonShort()) || (LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) || (LCDML.BT_checkUp() && encoderDir[ENC_R].Up())) |
|
|
|
if ((LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) || (LCDML.BT_checkUp() && encoderDir[ENC_R].Up()) || (LCDML.BT_checkEnter() && encoderDir[ENC_R].ButtonShort())) |
|
|
|
{ |
|
|
|
{ |
|
|
|
#if NUMDEXED > 1 |
|
|
|
if (LCDML.BT_checkDown()) |
|
|
|
if ((LCDML.BT_checkDown() || LCDML.BT_checkUp()) && instance_id < 0) |
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
chosen = (chosen + 1) % 2; |
|
|
|
if (mode == 0) |
|
|
|
|
|
|
|
instance_id = (instance_id + 1) % 2; |
|
|
|
|
|
|
|
else if (mode == 1) |
|
|
|
|
|
|
|
configuration.performance.voiceconfig_number[instance_id] = constrain(configuration.performance.voiceconfig_number[instance_id] + ENCODER[ENC_L].speed(), VOICECONFIG_NUM_MIN, VOICECONFIG_NUM_MAX); |
|
|
|
} |
|
|
|
} |
|
|
|
else if (LCDML.BT_checkEnter() && instance_id < 0) |
|
|
|
else if (LCDML.BT_checkUp()) |
|
|
|
{ |
|
|
|
{ |
|
|
|
instance_id = chosen; |
|
|
|
if (mode == 0) |
|
|
|
lcd.setCursor(0, 1); |
|
|
|
instance_id = (instance_id - 1) % 2; |
|
|
|
lcd.print(F("[NO ] ")); |
|
|
|
else if (mode == 1) |
|
|
|
|
|
|
|
configuration.performance.voiceconfig_number[instance_id] = constrain(configuration.performance.voiceconfig_number[instance_id] - ENCODER[ENC_L].speed(), VOICECONFIG_NUM_MIN, VOICECONFIG_NUM_MAX); |
|
|
|
} |
|
|
|
} |
|
|
|
else if ((LCDML.BT_checkDown() || LCDML.BT_checkUp()) && instance_id >= 0) |
|
|
|
else if (LCDML.BT_checkEnter()) |
|
|
|
#else |
|
|
|
|
|
|
|
if ((LCDML.BT_checkDown() || LCDML.BT_checkUp())) |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
yesno = !yesno; |
|
|
|
mode = 0xff; |
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
|
|
|
if (load_sd_voiceconfig(configuration.performance.voiceconfig_number[instance_id], instance_id) == false) |
|
|
|
|
|
|
|
lcd.print("Does not exist."); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
lcd.print("Done. "); |
|
|
|
|
|
|
|
delay(500); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (LCDML.MENU_getLastActivFunctionID() < 0xff) |
|
|
|
|
|
|
|
LCDML.OTHER_jumpToID(LCDML.MENU_getLastActivFunctionID()); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
LCDML.OTHER_setCursorToID(LCDML.MENU_getLastCursorPositionID()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#if NUMDEXED > 1 |
|
|
|
if (mode == 0) |
|
|
|
if (instance_id < 0) |
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
lcd.setCursor(10, 1); |
|
|
|
lcd.setCursor(10, 1); |
|
|
|
lcd.print(chosen + 1); |
|
|
|
lcd.print(instance_id); |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else if (mode == 1) |
|
|
|
{ |
|
|
|
{ |
|
|
|
#endif |
|
|
|
lcd.setCursor(0, 1); |
|
|
|
if (yesno == true) |
|
|
|
if (configuration.performance.voiceconfig_number[instance_id] == 0) |
|
|
|
{ |
|
|
|
lcd.print(F("[DEFAULT]")); |
|
|
|
lcd.setCursor(1, 1); |
|
|
|
|
|
|
|
lcd.print(F("YES")); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
{ |
|
|
|
lcd.setCursor(1, 1); |
|
|
|
char tmp[10]; |
|
|
|
lcd.print(F("NO ")); |
|
|
|
sprintf(tmp, "[%7d]", configuration.performance.voiceconfig_number[instance_id]); |
|
|
|
|
|
|
|
lcd.print(tmp); |
|
|
|
} |
|
|
|
} |
|
|
|
#if NUMDEXED > 1 |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
#endif |
|
|
|
|
|
|
|
//encoderDir[ENC_R].reset();
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
{ |
|
|
|
{ |
|
|
|
if (yesno == true) |
|
|
|
if (mode < 0xff) |
|
|
|
{ |
|
|
|
{ |
|
|
|
LCDML.DISP_clear(); |
|
|
|
|
|
|
|
lcd.print(F("Save Cfg SD")); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
load_sd_voiceconfig(configuration.performance.bank[instance_id], configuration.performance.voice[instance_id], instance_id); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
lcd.setCursor(0, 1); |
|
|
|
lcd.print(F("Done.")); |
|
|
|
lcd.print("Canceled "); |
|
|
|
delay(500); |
|
|
|
delay(500); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -3432,92 +3474,139 @@ void UI_func_save_voiceconfig(uint8_t param) |
|
|
|
{ |
|
|
|
{ |
|
|
|
#if NUMDEXED > 1 |
|
|
|
#if NUMDEXED > 1 |
|
|
|
static int8_t instance_id; |
|
|
|
static int8_t instance_id; |
|
|
|
static uint8_t chosen; |
|
|
|
|
|
|
|
#else |
|
|
|
#else |
|
|
|
uint8_t instance_id = 0; |
|
|
|
uint8_t instance_id = 0; |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static bool overwrite; |
|
|
|
static bool yesno; |
|
|
|
static bool yesno; |
|
|
|
|
|
|
|
static uint8_t mode; |
|
|
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
yesno = false; |
|
|
|
|
|
|
|
instance_id = 0; |
|
|
|
|
|
|
|
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 0); |
|
|
|
lcd.setCursor(0, 0); |
|
|
|
lcd.print(F("Save Config SD")); |
|
|
|
lcd.print(F("Save Config SD")); |
|
|
|
|
|
|
|
|
|
|
|
#if NUMDEXED > 1 |
|
|
|
#if NUMDEXED > 1 |
|
|
|
instance_id = -1; |
|
|
|
mode = 0; |
|
|
|
chosen = 0; |
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
lcd.setCursor(0, 1); |
|
|
|
lcd.print(F("Instance [1]")); |
|
|
|
lcd.print(F("Instance [0]")); |
|
|
|
#else |
|
|
|
#else |
|
|
|
|
|
|
|
mode = 1; |
|
|
|
lcd.setCursor(0, 1); |
|
|
|
lcd.setCursor(0, 1); |
|
|
|
lcd.print(F("[NO ]")); |
|
|
|
if (configuration.performance.voice[instance_id] == 0) |
|
|
|
#endif |
|
|
|
lcd.print(F("[DEFAULT]")); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
char tmp[10]; |
|
|
|
|
|
|
|
sprintf(tmp, "[%7d]", configuration.performance.voice[instance_id]); |
|
|
|
|
|
|
|
lcd.print(tmp); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
yesno = false; |
|
|
|
char tmp[FILENAME_LEN]; |
|
|
|
|
|
|
|
sprintf(tmp, "/%s%d.syx", VOICE_CONFIG_NAME, configuration.performance.voiceconfig_number[instance_id]); |
|
|
|
|
|
|
|
if (SD.exists(tmp)) |
|
|
|
|
|
|
|
overwrite = true; |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
overwrite = false; |
|
|
|
|
|
|
|
#endif |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_loop()) // ****** LOOP *********
|
|
|
|
if (LCDML.FUNC_loop()) // ****** LOOP *********
|
|
|
|
{ |
|
|
|
{ |
|
|
|
if ((LCDML.BT_checkEnter() && encoderDir[ENC_R].ButtonShort()) || (LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) || (LCDML.BT_checkUp() && encoderDir[ENC_R].Up())) |
|
|
|
if ((LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) || (LCDML.BT_checkUp() && encoderDir[ENC_R].Up()) || (LCDML.BT_checkEnter() && encoderDir[ENC_R].ButtonShort())) |
|
|
|
{ |
|
|
|
{ |
|
|
|
#if NUMDEXED > 1 |
|
|
|
if (LCDML.BT_checkDown()) |
|
|
|
if ((LCDML.BT_checkDown() || LCDML.BT_checkUp()) && instance_id < 0) |
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
chosen = (chosen + 1) % 2; |
|
|
|
if (mode == 0) |
|
|
|
|
|
|
|
instance_id = (instance_id + 1) % 2; |
|
|
|
|
|
|
|
else if (mode == 1) |
|
|
|
|
|
|
|
configuration.performance.voiceconfig_number[instance_id] = constrain(configuration.performance.voiceconfig_number[instance_id] + ENCODER[ENC_L].speed(), VOICECONFIG_NUM_MIN, VOICECONFIG_NUM_MAX); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
yesno = true; |
|
|
|
} |
|
|
|
} |
|
|
|
else if (LCDML.BT_checkEnter() && instance_id < 0) |
|
|
|
else if (LCDML.BT_checkUp()) |
|
|
|
{ |
|
|
|
{ |
|
|
|
instance_id = chosen; |
|
|
|
if (mode == 0) |
|
|
|
lcd.setCursor(0, 1); |
|
|
|
instance_id = (instance_id - 1) % 2; |
|
|
|
lcd.print(F("[NO ] ")); |
|
|
|
else if (mode == 1) |
|
|
|
|
|
|
|
configuration.performance.voiceconfig_number[instance_id] = constrain(configuration.performance.voiceconfig_number[instance_id] - ENCODER[ENC_L].speed(), VOICECONFIG_NUM_MIN, VOICECONFIG_NUM_MAX); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
yesno = false; |
|
|
|
} |
|
|
|
} |
|
|
|
else if ((LCDML.BT_checkDown() || LCDML.BT_checkUp()) && instance_id >= 0) |
|
|
|
else if (LCDML.BT_checkEnter()) |
|
|
|
#else |
|
|
|
|
|
|
|
if ((LCDML.BT_checkDown() || LCDML.BT_checkUp())) |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
yesno = !yesno; |
|
|
|
if (mode == 1 && overwrite == true) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
mode = 2; |
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
|
|
|
lcd.print(F("Overwrite: [ ]")); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
mode = 0xff; |
|
|
|
|
|
|
|
eeprom_write(); |
|
|
|
|
|
|
|
if (overwrite == false || yesno == true) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
save_sd_voiceconfig(configuration.performance.voiceconfig_number[instance_id], instance_id); |
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
|
|
|
lcd.print("Done. "); |
|
|
|
|
|
|
|
delay(500); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (LCDML.MENU_getLastActivFunctionID() < 0xff) |
|
|
|
|
|
|
|
LCDML.OTHER_jumpToID(LCDML.MENU_getLastActivFunctionID()); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
LCDML.OTHER_setCursorToID(LCDML.MENU_getLastCursorPositionID()); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#if NUMDEXED > 1 |
|
|
|
if (mode == 0) |
|
|
|
if (instance_id < 0) |
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
lcd.setCursor(10, 1); |
|
|
|
lcd.setCursor(10, 1); |
|
|
|
lcd.print(chosen + 1); |
|
|
|
lcd.print(configuration.performance.voiceconfig_number[instance_id]); |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else if (mode == 1) |
|
|
|
{ |
|
|
|
{ |
|
|
|
#endif |
|
|
|
char tmp[FILENAME_LEN]; |
|
|
|
if (yesno == true) |
|
|
|
sprintf(tmp, "/%s%d.syx", VOICE_CONFIG_NAME, configuration.performance.voiceconfig_number[instance_id]); |
|
|
|
|
|
|
|
if (SD.exists(tmp)) |
|
|
|
|
|
|
|
overwrite = true; |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
overwrite = false; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
|
|
|
if (configuration.performance.voiceconfig_number[instance_id] == 0) |
|
|
|
|
|
|
|
lcd.print(F("[DEFAULT]")); |
|
|
|
|
|
|
|
else |
|
|
|
{ |
|
|
|
{ |
|
|
|
lcd.setCursor(1, 1); |
|
|
|
char tmp[10]; |
|
|
|
lcd.print(F("YES")); |
|
|
|
sprintf(tmp, "[%7d]", configuration.performance.voiceconfig_number[instance_id]); |
|
|
|
|
|
|
|
lcd.print(tmp); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else if (mode == 2) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
lcd.setCursor(12, 1); |
|
|
|
|
|
|
|
if (yesno == true) |
|
|
|
|
|
|
|
lcd.print(F("YES")); |
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
|
|
|
|
lcd.setCursor(1, 1); |
|
|
|
|
|
|
|
lcd.print(F("NO ")); |
|
|
|
lcd.print(F("NO ")); |
|
|
|
} |
|
|
|
|
|
|
|
#if NUMDEXED > 1 |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
#endif |
|
|
|
|
|
|
|
//encoderDir[ENC_R].reset();
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
{ |
|
|
|
{ |
|
|
|
if (yesno == true) |
|
|
|
if (mode < 0xff) |
|
|
|
{ |
|
|
|
{ |
|
|
|
LCDML.DISP_clear(); |
|
|
|
|
|
|
|
lcd.print(F("Save Cfg SD")); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
save_sd_voiceconfig(configuration.performance.bank[instance_id], configuration.performance.voice[instance_id], instance_id); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
lcd.setCursor(0, 1); |
|
|
|
lcd.print(F("Done.")); |
|
|
|
lcd.print("Canceled "); |
|
|
|
delay(500); |
|
|
|
delay(500); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -3525,60 +3614,14 @@ void UI_func_save_voiceconfig(uint8_t param) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void UI_func_save_voice(uint8_t param) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
static bool yesno; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 0); |
|
|
|
|
|
|
|
lcd.print(F("Save Voice")); |
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
|
|
|
lcd.print(F("[NO ]")); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_loop()) // ****** LOOP *********
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if ((LCDML.BT_checkDown() || LCDML.BT_checkUp())) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
yesno = !yesno; |
|
|
|
|
|
|
|
if (yesno == true) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
lcd.setCursor(1, 1); |
|
|
|
|
|
|
|
lcd.print(F("YES")); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
lcd.setCursor(1, 1); |
|
|
|
|
|
|
|
lcd.print(F("NO ")); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (yesno == true) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
LCDML.DISP_clear(); |
|
|
|
|
|
|
|
lcd.print(F("Save Cfg default")); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Storing on inside bank TBD
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
|
|
|
lcd.print(F("Done.")); |
|
|
|
|
|
|
|
delay(500); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void UI_func_load_fx(uint8_t param) |
|
|
|
void UI_func_load_fx(uint8_t param) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
static uint8_t mode; |
|
|
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
mode = 0; |
|
|
|
|
|
|
|
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 0); |
|
|
|
lcd.setCursor(0, 0); |
|
|
@ -3596,7 +3639,7 @@ void UI_func_load_fx(uint8_t param) |
|
|
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_loop()) // ****** LOOP *********
|
|
|
|
if (LCDML.FUNC_loop()) // ****** LOOP *********
|
|
|
|
{ |
|
|
|
{ |
|
|
|
if ((LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) || (LCDML.BT_checkUp() && encoderDir[ENC_R].Up())) |
|
|
|
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()) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -3606,6 +3649,22 @@ void UI_func_load_fx(uint8_t param) |
|
|
|
{ |
|
|
|
{ |
|
|
|
configuration.performance.fx_number = constrain(configuration.performance.fx_number - ENCODER[ENC_L].speed(), FX_NUM_MIN, FX_NUM_MAX); |
|
|
|
configuration.performance.fx_number = constrain(configuration.performance.fx_number - ENCODER[ENC_L].speed(), FX_NUM_MIN, FX_NUM_MAX); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
else if (LCDML.BT_checkEnter()) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
mode = 0xff; |
|
|
|
|
|
|
|
eeprom_write(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (load_sd_fx(configuration.performance.fx_number) == false) |
|
|
|
|
|
|
|
lcd.print("Does not exist."); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
lcd.print("Done. "); |
|
|
|
|
|
|
|
delay(500); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (LCDML.MENU_getLastActivFunctionID() < 0xff) |
|
|
|
|
|
|
|
LCDML.OTHER_jumpToID(LCDML.MENU_getLastActivFunctionID()); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
LCDML.OTHER_setCursorToID(LCDML.MENU_getLastCursorPositionID()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
lcd.setCursor(0, 1); |
|
|
|
if (configuration.performance.fx_number == 0) |
|
|
|
if (configuration.performance.fx_number == 0) |
|
|
@ -3621,11 +3680,13 @@ void UI_func_load_fx(uint8_t param) |
|
|
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
{ |
|
|
|
{ |
|
|
|
eeprom_write(); |
|
|
|
if (mode < 0xff) |
|
|
|
load_sd_fx(configuration.performance.fx_number); |
|
|
|
{ |
|
|
|
lcd.setCursor(0, 1); |
|
|
|
lcd.setCursor(0, 1); |
|
|
|
lcd.print("Done. "); |
|
|
|
lcd.print("Canceled "); |
|
|
|
delay(500); |
|
|
|
delay(500); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -3691,7 +3752,20 @@ void UI_func_save_fx(uint8_t param) |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
{ |
|
|
|
LCDML.BT_quit(); // does not help :(
|
|
|
|
mode = 0xff; |
|
|
|
|
|
|
|
eeprom_write(); |
|
|
|
|
|
|
|
if (overwrite == false || yesno == true) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
save_sd_fx(configuration.performance.fx_number); |
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
|
|
|
lcd.print("Done. "); |
|
|
|
|
|
|
|
delay(500); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (LCDML.MENU_getLastActivFunctionID() < 0xff) |
|
|
|
|
|
|
|
LCDML.OTHER_jumpToID(LCDML.MENU_getLastActivFunctionID()); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
LCDML.OTHER_setCursorToID(LCDML.MENU_getLastCursorPositionID()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -3728,15 +3802,64 @@ void UI_func_save_fx(uint8_t param) |
|
|
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
{ |
|
|
|
{ |
|
|
|
eeprom_write(); |
|
|
|
if (mode < 0xff) |
|
|
|
if (overwrite == false || yesno == true) |
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
save_sd_fx(configuration.performance.fx_number); |
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
lcd.setCursor(0, 1); |
|
|
|
lcd.print("Done. "); |
|
|
|
lcd.print("Canceled "); |
|
|
|
delay(500); |
|
|
|
delay(500); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void UI_func_save_voice(uint8_t param) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
static bool yesno; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
|
|
|
|
{ |
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 0); |
|
|
|
|
|
|
|
lcd.print(F("Save Voice")); |
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
|
|
|
lcd.print(F("[NO ]")); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_loop()) // ****** LOOP *********
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if ((LCDML.BT_checkDown() || LCDML.BT_checkUp())) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
yesno = !yesno; |
|
|
|
|
|
|
|
if (yesno == true) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
lcd.setCursor(1, 1); |
|
|
|
|
|
|
|
lcd.print(F("YES")); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
lcd.setCursor(1, 1); |
|
|
|
|
|
|
|
lcd.print(F("NO ")); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (yesno == true) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
LCDML.DISP_clear(); |
|
|
|
|
|
|
|
lcd.print(F("Save Cfg default")); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Storing on inside bank TBD
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 1); |
|
|
|
|
|
|
|
lcd.print(F("Done.")); |
|
|
|
|
|
|
|
delay(500); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|