|
|
|
@ -4056,7 +4056,7 @@ void _check_display_name_min_max(uint8_t input_mode, uint8_t input_type, uint8_t |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
void UI_func_drum_midi_channel(uint8_t param) { |
|
|
|
|
#if NUM_DRUMS > 0 |
|
|
|
|
#if NUM_DRUMS == 0 |
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
|
{ |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
@ -4109,7 +4109,7 @@ void UI_func_drum_midi_channel(uint8_t param) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void UI_func_drums_main_volume(uint8_t param) { |
|
|
|
|
#if NUM_DRUMS > 0 |
|
|
|
|
#if NUM_DRUMS == 0 |
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
|
{ |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
@ -4148,7 +4148,7 @@ void UI_func_drums_main_volume(uint8_t param) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void UI_func_drum_pitch(uint8_t param) { |
|
|
|
|
#if NUM_DRUMS > 0 |
|
|
|
|
#if NUM_DRUMS == 0 |
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
|
{ |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
@ -4225,7 +4225,7 @@ void UI_func_drum_pitch(uint8_t param) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void UI_func_drum_vol_min_max(uint8_t param) { |
|
|
|
|
#if NUM_DRUMS > 0 |
|
|
|
|
#if NUM_DRUMS == 0 |
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
|
{ |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
@ -4334,7 +4334,7 @@ void UI_func_drum_vol_min_max(uint8_t param) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void UI_func_drum_pan(uint8_t param) { |
|
|
|
|
#if NUM_DRUMS > 0 |
|
|
|
|
#if NUM_DRUMS == 0 |
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
|
{ |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
@ -4412,7 +4412,7 @@ void UI_func_drum_pan(uint8_t param) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void UI_func_drum_reverb_send(uint8_t param) { |
|
|
|
|
#if NUM_DRUMS > 0 |
|
|
|
|
#if NUM_DRUMS == 0 |
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
|
{ |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
@ -4490,7 +4490,7 @@ void UI_func_drum_reverb_send(uint8_t param) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void UI_func_drum_midi_note(uint8_t param) { |
|
|
|
|
#if NUM_DRUMS > 0 |
|
|
|
|
#if NUM_DRUMS == 0 |
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
|
{ |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
@ -4605,9 +4605,11 @@ void UI_func_save_performance(uint8_t param) { |
|
|
|
|
if (configuration.performance.name_temp[0] != 0) |
|
|
|
|
display.show(1, 5, 11, configuration.performance.name_temp); |
|
|
|
|
else |
|
|
|
|
display.print(" -- DATA --"); |
|
|
|
|
} |
|
|
|
|
display.print("-- DATA -- "); |
|
|
|
|
} else |
|
|
|
|
display.print("-- EMPTY --"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_loop()) // ****** LOOP *********
|
|
|
|
|
{ |
|
|
|
|
if ((LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) || (LCDML.BT_checkUp() && encoderDir[ENC_R].Up()) || (LCDML.BT_checkEnter() && encoderDir[ENC_R].ButtonShort())) { |
|
|
|
@ -4629,8 +4631,7 @@ void UI_func_save_performance(uint8_t param) { |
|
|
|
|
} else { |
|
|
|
|
mode = 0xff; |
|
|
|
|
if (overwrite == false || yesno == true) { |
|
|
|
|
display.show(1, 0, 16, "Done."); |
|
|
|
|
delay(MESSAGE_WAIT_TIME); |
|
|
|
|
display.show(1, 0, 16, "Writing..."); |
|
|
|
|
LCDML.FUNC_goBackToMenu(); |
|
|
|
|
} else if (overwrite == true && yesno == false) { |
|
|
|
|
char tmp[10]; |
|
|
|
@ -4661,9 +4662,8 @@ void UI_func_save_performance(uint8_t param) { |
|
|
|
|
get_sd_performance_name_json(temp_int); |
|
|
|
|
if (configuration.performance.name_temp[0] != 0) |
|
|
|
|
display.show(1, 5, 11, configuration.performance.name_temp); |
|
|
|
|
else |
|
|
|
|
display.print("-- DATA --"); |
|
|
|
|
} else display.print(" "); |
|
|
|
|
else display.print("-- DATA -- "); |
|
|
|
|
} else display.print("-- EMPTY --"); |
|
|
|
|
} else if (mode < 0xff) { |
|
|
|
|
display.setCursor(12, 1); |
|
|
|
|
if (yesno == true) { |
|
|
|
@ -4672,7 +4672,7 @@ void UI_func_save_performance(uint8_t param) { |
|
|
|
|
display.print(F("NO ")); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
//encoderDir[ENC_R].reset();
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
@ -4689,18 +4689,28 @@ void UI_func_save_performance(uint8_t param) { |
|
|
|
|
|
|
|
|
|
void UI_func_load_performance(uint8_t param) { |
|
|
|
|
static uint8_t mode; |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
|
{ |
|
|
|
|
char tmp[10]; |
|
|
|
|
char tmp[CONFIG_FILENAME_LEN]; |
|
|
|
|
temp_int = 0; |
|
|
|
|
mode = 0; |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
display.setCursor(0, 0); |
|
|
|
|
display.print(F("Load Performance ")); |
|
|
|
|
|
|
|
|
|
display.setCursor(0, 1); |
|
|
|
|
snprintf_P(tmp, sizeof(tmp), PSTR("[%2d]"), param); |
|
|
|
|
snprintf_P(tmp, sizeof(tmp), PSTR("[%2d]"), temp_int); |
|
|
|
|
display.print(tmp); |
|
|
|
|
if (check_sd_performance_exists(temp_int)) { |
|
|
|
|
get_sd_performance_name_json(temp_int); |
|
|
|
|
if (configuration.performance.name_temp[0] != 0) |
|
|
|
|
display.show(1, 5, 11, configuration.performance.name_temp); |
|
|
|
|
else |
|
|
|
|
display.print(" -- DATA -- "); |
|
|
|
|
} else display.print(" -- EMPTY --"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_loop()) // ****** LOOP *********
|
|
|
|
|
{ |
|
|
|
|
if ((LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) || (LCDML.BT_checkUp() && encoderDir[ENC_R].Up()) || (LCDML.BT_checkEnter() && encoderDir[ENC_R].ButtonShort())) { |
|
|
|
@ -4712,27 +4722,29 @@ void UI_func_load_performance(uint8_t param) { |
|
|
|
|
mode = 0xff; |
|
|
|
|
display.setCursor(0, 1); |
|
|
|
|
if (load_sd_performance_json(temp_int) == false) |
|
|
|
|
display.print("Does not exist."); |
|
|
|
|
display.print("Does not exist. "); |
|
|
|
|
else { |
|
|
|
|
display.print("Loading... "); |
|
|
|
|
load_sd_performance_json(temp_int); |
|
|
|
|
display.print("Done. "); |
|
|
|
|
} |
|
|
|
|
delay(MESSAGE_WAIT_TIME); |
|
|
|
|
LCDML.FUNC_goBackToMenu(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
display.setCursor(0, 1); |
|
|
|
|
char tmp[10]; |
|
|
|
|
snprintf_P(tmp, sizeof(tmp), PSTR("[%2d]"), temp_int); |
|
|
|
|
display.print(tmp); |
|
|
|
|
if (check_sd_performance_exists(temp_int)) { |
|
|
|
|
get_sd_performance_name_json(temp_int); |
|
|
|
|
if (configuration.performance.name_temp[0] != 0) |
|
|
|
|
display.show(1, 5, 11, configuration.performance.name_temp); |
|
|
|
|
else |
|
|
|
|
display.print(" -- DATA -- "); |
|
|
|
|
} else display.print(" -- EMPTY --"); |
|
|
|
|
} |
|
|
|
|
display.setCursor(0, 1); |
|
|
|
|
char tmp[10]; |
|
|
|
|
snprintf_P(tmp, sizeof(tmp), PSTR("[%2d]"), temp_int); |
|
|
|
|
display.print(tmp); |
|
|
|
|
if (check_sd_performance_exists(temp_int)) { |
|
|
|
|
get_sd_performance_name_json(temp_int); |
|
|
|
|
if (configuration.performance.name_temp[0] != 0) |
|
|
|
|
display.show(1, 5, 11, configuration.performance.name_temp); |
|
|
|
|
else |
|
|
|
|
display.print(" -- DATA --"); |
|
|
|
|
} else display.print(" "); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
{ |
|
|
|
|
if (mode < 0xff) { |
|
|
|
@ -4740,7 +4752,6 @@ void UI_func_load_performance(uint8_t param) { |
|
|
|
|
delay(MESSAGE_WAIT_TIME); |
|
|
|
|
} else { |
|
|
|
|
configuration.sys.performance_number = temp_int; |
|
|
|
|
save_sd_sys_json(); |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|