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