|
|
@ -898,7 +898,7 @@ void lcdml_menu_control(void) |
|
|
|
|
|
|
|
|
|
|
|
// when in Voice select Menu, long left-press sets/unsets favorite
|
|
|
|
// when in Voice select Menu, long left-press sets/unsets favorite
|
|
|
|
if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_voice_select)) |
|
|
|
if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_voice_select)) |
|
|
|
save_favorite(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], selected_instance_id); |
|
|
|
save_favorite(configuration.dexed[selected_instance_id].bank, configuration.dexed[selected_instance_id].voice, selected_instance_id); |
|
|
|
// when not in Voice select Menu, long left-press starts/stops sequencer
|
|
|
|
// when not in Voice select Menu, long left-press starts/stops sequencer
|
|
|
|
else if (LCDML.FUNC_getID() != LCDML.OTHER_getIDFromFunction(UI_func_voice_select)) |
|
|
|
else if (LCDML.FUNC_getID() != LCDML.OTHER_getIDFromFunction(UI_func_voice_select)) |
|
|
|
toggle_sequencer_play_status(); |
|
|
|
toggle_sequencer_play_status(); |
|
|
@ -6266,7 +6266,7 @@ void UI_func_save_performance(uint8_t param) |
|
|
|
lcd.setCursor(0, 1); |
|
|
|
lcd.setCursor(0, 1); |
|
|
|
sprintf(tmp, "[%2d]", temp_int); |
|
|
|
sprintf(tmp, "[%2d]", temp_int); |
|
|
|
lcd.print(tmp); |
|
|
|
lcd.print(tmp); |
|
|
|
sprintf(tmp, "/%s/%d/%s.json", PERFORMANCE_CONFIG_PATH, temp_int, PERFORMANCE_CONFIG_NAME); |
|
|
|
sprintf(tmp, "/%s/%d/%s.json", PERFORMANCE_CONFIG_PATH, temp_int, SEQUENCER_CONFIG_NAME); |
|
|
|
if (SD.exists(tmp)) |
|
|
|
if (SD.exists(tmp)) |
|
|
|
overwrite = true; |
|
|
|
overwrite = true; |
|
|
|
else |
|
|
|
else |
|
|
@ -6314,7 +6314,7 @@ void UI_func_save_performance(uint8_t param) |
|
|
|
if (yesno == true) |
|
|
|
if (yesno == true) |
|
|
|
{ |
|
|
|
{ |
|
|
|
char tmp[FILENAME_LEN]; |
|
|
|
char tmp[FILENAME_LEN]; |
|
|
|
sprintf(tmp, "/%s/%d/%s.json", PERFORMANCE_CONFIG_PATH, temp_int, PERFORMANCE_CONFIG_NAME); |
|
|
|
sprintf(tmp, "/%s/%d/%s.json", PERFORMANCE_CONFIG_PATH, temp_int, SEQUENCER_CONFIG_NAME); |
|
|
|
SD.remove(tmp); |
|
|
|
SD.remove(tmp); |
|
|
|
} |
|
|
|
} |
|
|
|
lcd.show(1, 0, 16, "Done."); |
|
|
|
lcd.show(1, 0, 16, "Done."); |
|
|
@ -6336,7 +6336,7 @@ void UI_func_save_performance(uint8_t param) |
|
|
|
if (mode == 0) |
|
|
|
if (mode == 0) |
|
|
|
{ |
|
|
|
{ |
|
|
|
char tmp[FILENAME_LEN]; |
|
|
|
char tmp[FILENAME_LEN]; |
|
|
|
sprintf(tmp, "/%s/%d/%s.json", PERFORMANCE_CONFIG_PATH, temp_int, PERFORMANCE_CONFIG_NAME); |
|
|
|
sprintf(tmp, "/%s/%d/%s.json", PERFORMANCE_CONFIG_PATH, temp_int, SEQUENCER_CONFIG_NAME); |
|
|
|
if (SD.exists(tmp)) |
|
|
|
if (SD.exists(tmp)) |
|
|
|
overwrite = true; |
|
|
|
overwrite = true; |
|
|
|
else |
|
|
|
else |
|
|
@ -6555,9 +6555,9 @@ void UI_func_voice_select(uint8_t param) |
|
|
|
char bank_name[BANK_NAME_LEN]; |
|
|
|
char bank_name[BANK_NAME_LEN]; |
|
|
|
char voice_name[VOICE_NAME_LEN]; |
|
|
|
char voice_name[VOICE_NAME_LEN]; |
|
|
|
|
|
|
|
|
|
|
|
if (!get_bank_name(configuration.performance.bank[selected_instance_id], bank_name, sizeof(bank_name))) |
|
|
|
if (!get_bank_name(configuration.dexed[selected_instance_id].bank, bank_name, sizeof(bank_name))) |
|
|
|
strcpy(bank_name, "*ERROR*"); |
|
|
|
strcpy(bank_name, "*ERROR*"); |
|
|
|
if (!get_voice_by_bank_name(configuration.performance.bank[selected_instance_id], bank_name, configuration.performance.voice[selected_instance_id], voice_name, sizeof(voice_name))) |
|
|
|
if (!get_voice_by_bank_name(configuration.dexed[selected_instance_id].bank, bank_name, configuration.dexed[selected_instance_id].voice, voice_name, sizeof(voice_name))) |
|
|
|
strcpy(voice_name, "*ERROR*"); |
|
|
|
strcpy(voice_name, "*ERROR*"); |
|
|
|
|
|
|
|
|
|
|
|
UI_update_instance_icons(); |
|
|
|
UI_update_instance_icons(); |
|
|
@ -6597,36 +6597,36 @@ void UI_func_voice_select(uint8_t param) |
|
|
|
{ |
|
|
|
{ |
|
|
|
case MENU_VOICE_BANK: |
|
|
|
case MENU_VOICE_BANK: |
|
|
|
memset(g_bank_name[selected_instance_id], 0, BANK_NAME_LEN); |
|
|
|
memset(g_bank_name[selected_instance_id], 0, BANK_NAME_LEN); |
|
|
|
bank_tmp = constrain(configuration.performance.bank[selected_instance_id] - ENCODER[ENC_R].speed(), 0, MAX_BANKS - 1); |
|
|
|
bank_tmp = constrain(configuration.dexed[selected_instance_id].bank - ENCODER[ENC_R].speed(), 0, MAX_BANKS - 1); |
|
|
|
configuration.performance.bank[selected_instance_id] = bank_tmp; |
|
|
|
configuration.dexed[selected_instance_id].bank = bank_tmp; |
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
change_disp_sd(false); |
|
|
|
change_disp_sd(false); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
load_sd_voice(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], selected_instance_id); |
|
|
|
load_sd_voice(configuration.dexed[selected_instance_id].bank, configuration.dexed[selected_instance_id].voice, selected_instance_id); |
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
change_disp_sd(true); |
|
|
|
change_disp_sd(true); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
break; |
|
|
|
break; |
|
|
|
case MENU_VOICE_SOUND: |
|
|
|
case MENU_VOICE_SOUND: |
|
|
|
memset(g_voice_name[selected_instance_id], 0, VOICE_NAME_LEN); |
|
|
|
memset(g_voice_name[selected_instance_id], 0, VOICE_NAME_LEN); |
|
|
|
voice_tmp = configuration.performance.voice[selected_instance_id] - ENCODER[ENC_R].speed(); |
|
|
|
voice_tmp = configuration.dexed[selected_instance_id].voice - ENCODER[ENC_R].speed(); |
|
|
|
if (voice_tmp < 0 && configuration.performance.bank[selected_instance_id] - 1 >= 0) |
|
|
|
if (voice_tmp < 0 && configuration.dexed[selected_instance_id].voice - 1 >= 0) |
|
|
|
{ |
|
|
|
{ |
|
|
|
configuration.performance.bank[selected_instance_id]--; |
|
|
|
configuration.dexed[selected_instance_id].voice--; |
|
|
|
configuration.performance.bank[selected_instance_id] = constrain(configuration.performance.bank[selected_instance_id], 0, MAX_BANKS - 1); |
|
|
|
configuration.dexed[selected_instance_id].voice = constrain(configuration.dexed[selected_instance_id].voice, 0, MAX_BANKS - 1); |
|
|
|
} |
|
|
|
} |
|
|
|
else if (voice_tmp < 0 && configuration.performance.bank[selected_instance_id] - 1 <= 0) |
|
|
|
else if (voice_tmp < 0 && configuration.dexed[selected_instance_id].voice - 1 <= 0) |
|
|
|
{ |
|
|
|
{ |
|
|
|
voice_tmp = 0; |
|
|
|
voice_tmp = 0; |
|
|
|
} |
|
|
|
} |
|
|
|
if (voice_tmp < 0) |
|
|
|
if (voice_tmp < 0) |
|
|
|
voice_tmp = MAX_VOICES + voice_tmp; |
|
|
|
voice_tmp = MAX_VOICES + voice_tmp; |
|
|
|
configuration.performance.voice[selected_instance_id] = constrain(voice_tmp, 0, MAX_VOICES - 1); |
|
|
|
configuration.dexed[selected_instance_id].voice = constrain(voice_tmp, 0, MAX_VOICES - 1); |
|
|
|
|
|
|
|
|
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
change_disp_sd(false); |
|
|
|
change_disp_sd(false); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
load_sd_voice(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], selected_instance_id); |
|
|
|
load_sd_voice(configuration.dexed[selected_instance_id].bank, configuration.dexed[selected_instance_id].voice, selected_instance_id); |
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
change_disp_sd(true); |
|
|
|
change_disp_sd(true); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -6640,7 +6640,7 @@ void UI_func_voice_select(uint8_t param) |
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
change_disp_sd(false); |
|
|
|
change_disp_sd(false); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
load_sd_voice(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], selected_instance_id); |
|
|
|
load_sd_voice(configuration.dexed[selected_instance_id].bank, configuration.dexed[selected_instance_id].voice, selected_instance_id); |
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
change_disp_sd(true); |
|
|
|
change_disp_sd(true); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -6652,7 +6652,7 @@ void UI_func_voice_select(uint8_t param) |
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
change_disp_sd(false); |
|
|
|
change_disp_sd(false); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
load_sd_voice(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], selected_instance_id); |
|
|
|
load_sd_voice(configuration.dexed[selected_instance_id].bank, configuration.dexed[selected_instance_id].voice, selected_instance_id); |
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
change_disp_sd(true); |
|
|
|
change_disp_sd(true); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -6666,7 +6666,7 @@ void UI_func_voice_select(uint8_t param) |
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
change_disp_sd(false); |
|
|
|
change_disp_sd(false); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
load_sd_voice(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], selected_instance_id); |
|
|
|
load_sd_voice(configuration.dexed[selected_instance_id].bank, configuration.dexed[selected_instance_id].voice, selected_instance_id); |
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
change_disp_sd(true); |
|
|
|
change_disp_sd(true); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -6681,35 +6681,35 @@ void UI_func_voice_select(uint8_t param) |
|
|
|
{ |
|
|
|
{ |
|
|
|
case MENU_VOICE_BANK: |
|
|
|
case MENU_VOICE_BANK: |
|
|
|
memset(g_bank_name[selected_instance_id], 0, BANK_NAME_LEN); |
|
|
|
memset(g_bank_name[selected_instance_id], 0, BANK_NAME_LEN); |
|
|
|
bank_tmp = constrain(configuration.performance.bank[selected_instance_id] + ENCODER[ENC_R].speed(), 0, MAX_BANKS - 1); |
|
|
|
bank_tmp = constrain(configuration.dexed[selected_instance_id].bank + ENCODER[ENC_R].speed(), 0, MAX_BANKS - 1); |
|
|
|
configuration.performance.bank[selected_instance_id] = bank_tmp; |
|
|
|
configuration.dexed[selected_instance_id].bank = bank_tmp; |
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
change_disp_sd(false); |
|
|
|
change_disp_sd(false); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
load_sd_voice(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], selected_instance_id); |
|
|
|
load_sd_voice(configuration.dexed[selected_instance_id].bank, configuration.dexed[selected_instance_id].voice, selected_instance_id); |
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
change_disp_sd(true); |
|
|
|
change_disp_sd(true); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
break; |
|
|
|
break; |
|
|
|
case MENU_VOICE_SOUND: |
|
|
|
case MENU_VOICE_SOUND: |
|
|
|
memset(g_voice_name[selected_instance_id], 0, VOICE_NAME_LEN); |
|
|
|
memset(g_voice_name[selected_instance_id], 0, VOICE_NAME_LEN); |
|
|
|
voice_tmp = configuration.performance.voice[selected_instance_id] + ENCODER[ENC_R].speed(); |
|
|
|
voice_tmp = configuration.dexed[selected_instance_id].voice + ENCODER[ENC_R].speed(); |
|
|
|
if (voice_tmp >= MAX_VOICES && configuration.performance.bank[selected_instance_id] + 1 < MAX_BANKS) |
|
|
|
if (voice_tmp >= MAX_VOICES && configuration.dexed[selected_instance_id].voice + 1 < MAX_BANKS) |
|
|
|
{ |
|
|
|
{ |
|
|
|
voice_tmp %= MAX_VOICES; |
|
|
|
voice_tmp %= MAX_VOICES; |
|
|
|
configuration.performance.bank[selected_instance_id]++; |
|
|
|
configuration.dexed[selected_instance_id].voice++; |
|
|
|
configuration.performance.bank[selected_instance_id] = constrain(configuration.performance.bank[selected_instance_id], 0, MAX_BANKS - 1); |
|
|
|
configuration.dexed[selected_instance_id].voice = constrain(configuration.dexed[selected_instance_id].voice, 0, MAX_BANKS - 1); |
|
|
|
} |
|
|
|
} |
|
|
|
else if (voice_tmp >= MAX_VOICES && configuration.performance.bank[selected_instance_id] + 1 >= MAX_BANKS) |
|
|
|
else if (voice_tmp >= MAX_VOICES && configuration.dexed[selected_instance_id].voice + 1 >= MAX_BANKS) |
|
|
|
{ |
|
|
|
{ |
|
|
|
voice_tmp = MAX_VOICES - 1; |
|
|
|
voice_tmp = MAX_VOICES - 1; |
|
|
|
} |
|
|
|
} |
|
|
|
configuration.performance.voice[selected_instance_id] = constrain(voice_tmp, 0, MAX_VOICES - 1); |
|
|
|
configuration.dexed[selected_instance_id].voice = constrain(voice_tmp, 0, MAX_VOICES - 1); |
|
|
|
|
|
|
|
|
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
change_disp_sd(false); |
|
|
|
change_disp_sd(false); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
load_sd_voice(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], selected_instance_id); |
|
|
|
load_sd_voice(configuration.dexed[selected_instance_id].bank, configuration.dexed[selected_instance_id].voice, selected_instance_id); |
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
change_disp_sd(true); |
|
|
|
change_disp_sd(true); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -6725,7 +6725,7 @@ void UI_func_voice_select(uint8_t param) |
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
change_disp_sd(false); |
|
|
|
change_disp_sd(false); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
load_sd_voice(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], selected_instance_id); |
|
|
|
load_sd_voice(configuration.dexed[selected_instance_id].bank, configuration.dexed[selected_instance_id].voice, selected_instance_id); |
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
change_disp_sd(true); |
|
|
|
change_disp_sd(true); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -6738,7 +6738,7 @@ void UI_func_voice_select(uint8_t param) |
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
change_disp_sd(false); |
|
|
|
change_disp_sd(false); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
load_sd_voice(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], selected_instance_id); |
|
|
|
load_sd_voice(configuration.dexed[selected_instance_id].bank, configuration.dexed[selected_instance_id].voice, selected_instance_id); |
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
change_disp_sd(true); |
|
|
|
change_disp_sd(true); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -6750,7 +6750,7 @@ void UI_func_voice_select(uint8_t param) |
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
change_disp_sd(false); |
|
|
|
change_disp_sd(false); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
load_sd_voice(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], selected_instance_id); |
|
|
|
load_sd_voice(configuration.dexed[selected_instance_id].bank, configuration.dexed[selected_instance_id].voice, selected_instance_id); |
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
change_disp_sd(true); |
|
|
|
change_disp_sd(true); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -6780,7 +6780,7 @@ void UI_func_voice_select(uint8_t param) |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (!get_bank_name(configuration.performance.bank[selected_instance_id], bank_name, sizeof(bank_name))) |
|
|
|
if (!get_bank_name(configuration.dexed[selected_instance_id].bank, bank_name, sizeof(bank_name))) |
|
|
|
strcpy(bank_name, "*ERROR*"); |
|
|
|
strcpy(bank_name, "*ERROR*"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -6790,12 +6790,12 @@ void UI_func_voice_select(uint8_t param) |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (!get_voice_by_bank_name(configuration.performance.bank[selected_instance_id], bank_name, configuration.performance.voice[selected_instance_id], voice_name, sizeof(voice_name))) |
|
|
|
if (!get_voice_by_bank_name(configuration.dexed[selected_instance_id].bank, bank_name, configuration.dexed[selected_instance_id].voice, voice_name, sizeof(voice_name))) |
|
|
|
strcpy(voice_name, "*ERROR*"); |
|
|
|
strcpy(voice_name, "*ERROR*"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
lcd.show(0, 0, 2, configuration.performance.bank[selected_instance_id]); |
|
|
|
lcd.show(0, 0, 2, configuration.dexed[selected_instance_id].bank); |
|
|
|
lcd.show(1, 0, 2, configuration.performance.voice[selected_instance_id] + 1); |
|
|
|
lcd.show(1, 0, 2, configuration.dexed[selected_instance_id].voice + 1); |
|
|
|
#ifdef TESTDISPLAY20x4 |
|
|
|
#ifdef TESTDISPLAY20x4 |
|
|
|
string_toupper(bank_name); |
|
|
|
string_toupper(bank_name); |
|
|
|
lcd.show(0, 4, 8, bank_name); |
|
|
|
lcd.show(0, 4, 8, bank_name); |
|
|
@ -6839,7 +6839,7 @@ void UI_func_voice_select(uint8_t param) |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
draw_favorite_icon(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], selected_instance_id); |
|
|
|
draw_favorite_icon(configuration.dexed[selected_instance_id].bank, configuration.dexed[selected_instance_id].voice, selected_instance_id); |
|
|
|
} |
|
|
|
} |
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
{ |
|
|
|
{ |
|
|
@ -7047,12 +7047,12 @@ void UI_func_save_voice(uint8_t param) |
|
|
|
#if NUM_DEXED == 1 |
|
|
|
#if NUM_DEXED == 1 |
|
|
|
char bank_name[BANK_NAME_LEN]; |
|
|
|
char bank_name[BANK_NAME_LEN]; |
|
|
|
|
|
|
|
|
|
|
|
if (!get_bank_name(configuration.performance.bank[selected_instance_id], bank_name, sizeof(bank_name))) |
|
|
|
if (!get_bank_name(configuration.dexed[selected_instance_id].bank, bank_name, sizeof(bank_name))) |
|
|
|
strcpy(bank_name, "*ERROR*"); |
|
|
|
strcpy(bank_name, "*ERROR*"); |
|
|
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 0); |
|
|
|
lcd.setCursor(0, 0); |
|
|
|
lcd.print(F("Save to Bank")); |
|
|
|
lcd.print(F("Save to Bank")); |
|
|
|
lcd.show(1, 0, 2, configuration.performance.bank[selected_instance_id]); |
|
|
|
lcd.show(1, 0, 2, configuration.dexed[selected_instance_id].bank); |
|
|
|
lcd.show(1, 3, 10, bank_name); |
|
|
|
lcd.show(1, 3, 10, bank_name); |
|
|
|
lcd.show(1, 2, 1, "["); |
|
|
|
lcd.show(1, 2, 1, "["); |
|
|
|
lcd.show(1, 13, 1, "]"); |
|
|
|
lcd.show(1, 13, 1, "]"); |
|
|
@ -7088,28 +7088,28 @@ void UI_func_save_voice(uint8_t param) |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 1: // Bank selection
|
|
|
|
case 1: // Bank selection
|
|
|
|
if (LCDML.BT_checkDown()) |
|
|
|
if (LCDML.BT_checkDown()) |
|
|
|
configuration.performance.bank[selected_instance_id] = constrain(configuration.performance.bank[selected_instance_id] + ENCODER[ENC_R].speed(), 0, MAX_BANKS - 1); |
|
|
|
configuration.dexed[selected_instance_id].bank = constrain(configuration.dexed[selected_instance_id].bank + ENCODER[ENC_R].speed(), 0, MAX_BANKS - 1); |
|
|
|
else if (LCDML.BT_checkUp() && configuration.performance.bank[selected_instance_id] > 0) |
|
|
|
else if (LCDML.BT_checkUp() && configuration.dexed[selected_instance_id].voice > 0) |
|
|
|
configuration.performance.bank[selected_instance_id] = constrain(configuration.performance.bank[selected_instance_id] - ENCODER[ENC_R].speed(), 0, MAX_BANKS - 1); |
|
|
|
configuration.dexed[selected_instance_id].bank = constrain(configuration.dexed[selected_instance_id].bank - ENCODER[ENC_R].speed(), 0, MAX_BANKS - 1); |
|
|
|
|
|
|
|
|
|
|
|
if (!get_bank_name(configuration.performance.bank[selected_instance_id], bank_name, sizeof(bank_name))) |
|
|
|
if (!get_bank_name(configuration.dexed[selected_instance_id].bank, bank_name, sizeof(bank_name))) |
|
|
|
strcpy(bank_name, "*ERROR*"); |
|
|
|
strcpy(bank_name, "*ERROR*"); |
|
|
|
|
|
|
|
|
|
|
|
lcd.show(1, 0, 2, configuration.performance.bank[selected_instance_id]); |
|
|
|
lcd.show(1, 0, 2, configuration.dexed[selected_instance_id].bank); |
|
|
|
lcd.show(1, 3, 10, bank_name); |
|
|
|
lcd.show(1, 3, 10, bank_name); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 2: // Voice selection
|
|
|
|
case 2: // Voice selection
|
|
|
|
if (LCDML.BT_checkDown() && configuration.performance.voice[selected_instance_id] < MAX_VOICES - 1) |
|
|
|
if (LCDML.BT_checkDown() && configuration.dexed[selected_instance_id].voice < MAX_VOICES - 1) |
|
|
|
configuration.performance.voice[selected_instance_id] = constrain(configuration.performance.voice[selected_instance_id] + ENCODER[ENC_R].speed(), 0, MAX_VOICES - 1); |
|
|
|
configuration.dexed[selected_instance_id].voice = constrain(configuration.dexed[selected_instance_id].voice + ENCODER[ENC_R].speed(), 0, MAX_VOICES - 1); |
|
|
|
else if (LCDML.BT_checkUp() && configuration.performance.voice[selected_instance_id] > 0) |
|
|
|
else if (LCDML.BT_checkUp() && configuration.dexed[selected_instance_id].voice > 0) |
|
|
|
configuration.performance.voice[selected_instance_id] = constrain(configuration.performance.voice[selected_instance_id] - ENCODER[ENC_R].speed(), 0, MAX_VOICES - 1); |
|
|
|
configuration.dexed[selected_instance_id].voice = constrain(configuration.dexed[selected_instance_id].voice - ENCODER[ENC_R].speed(), 0, MAX_VOICES - 1); |
|
|
|
|
|
|
|
|
|
|
|
if (!get_bank_name(configuration.performance.bank[selected_instance_id], bank_name, sizeof(bank_name))) |
|
|
|
if (!get_bank_name(configuration.dexed[selected_instance_id].bank, bank_name, sizeof(bank_name))) |
|
|
|
strncpy(bank_name, "*ERROR*", sizeof(bank_name)); |
|
|
|
strncpy(bank_name, "*ERROR*", sizeof(bank_name)); |
|
|
|
if (!get_voice_by_bank_name(configuration.performance.bank[selected_instance_id], bank_name, configuration.performance.voice[selected_instance_id], voice_name, sizeof(voice_name))) |
|
|
|
if (!get_voice_by_bank_name(configuration.dexed[selected_instance_id].bank, bank_name, configuration.dexed[selected_instance_id].voice, voice_name, sizeof(voice_name))) |
|
|
|
strncpy(voice_name, "*ERROR*", sizeof(voice_name)); |
|
|
|
strncpy(voice_name, "*ERROR*", sizeof(voice_name)); |
|
|
|
|
|
|
|
|
|
|
|
lcd.show(1, 0, 2, configuration.performance.voice[selected_instance_id] + 1); |
|
|
|
lcd.show(1, 0, 2, configuration.dexed[selected_instance_id].voice + 1); |
|
|
|
lcd.show(1, 3, 10, voice_name); |
|
|
|
lcd.show(1, 3, 10, voice_name); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 3: // Yes/No selection
|
|
|
|
case 3: // Yes/No selection
|
|
|
@ -7132,24 +7132,24 @@ void UI_func_save_voice(uint8_t param) |
|
|
|
switch (mode) |
|
|
|
switch (mode) |
|
|
|
{ |
|
|
|
{ |
|
|
|
case 1: |
|
|
|
case 1: |
|
|
|
if (!get_bank_name(configuration.performance.bank[selected_instance_id], bank_name, sizeof(bank_name))) |
|
|
|
if (!get_bank_name(configuration.dexed[selected_instance_id].bank, bank_name, sizeof(bank_name))) |
|
|
|
strncpy(bank_name, "*ERROR*", sizeof(bank_name)); |
|
|
|
strncpy(bank_name, "*ERROR*", sizeof(bank_name)); |
|
|
|
lcd.setCursor(0, 0); |
|
|
|
lcd.setCursor(0, 0); |
|
|
|
lcd.print(F("Save to Bank")); |
|
|
|
lcd.print(F("Save to Bank")); |
|
|
|
lcd.show(1, 0, 2, configuration.performance.bank[selected_instance_id]); |
|
|
|
lcd.show(1, 0, 2, configuration.dexed[selected_instance_id].bank); |
|
|
|
lcd.show(1, 3, 10, bank_name); |
|
|
|
lcd.show(1, 3, 10, bank_name); |
|
|
|
lcd.show(1, 2, 2, " ["); |
|
|
|
lcd.show(1, 2, 2, " ["); |
|
|
|
lcd.show(1, 14, 1, "]"); |
|
|
|
lcd.show(1, 14, 1, "]"); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 2: |
|
|
|
case 2: |
|
|
|
if (!get_bank_name(configuration.performance.bank[selected_instance_id], bank_name, sizeof(bank_name))) |
|
|
|
if (!get_bank_name(configuration.dexed[selected_instance_id].bank, bank_name, sizeof(bank_name))) |
|
|
|
strncpy(bank_name, "*ERROR*", sizeof(bank_name)); |
|
|
|
strncpy(bank_name, "*ERROR*", sizeof(bank_name)); |
|
|
|
if (!get_voice_by_bank_name(configuration.performance.bank[selected_instance_id], bank_name, configuration.performance.voice[selected_instance_id], voice_name, sizeof(voice_name))) |
|
|
|
if (!get_voice_by_bank_name(configuration.dexed[selected_instance_id].bank, bank_name, configuration.dexed[selected_instance_id].voice, voice_name, sizeof(voice_name))) |
|
|
|
strncpy(voice_name, "*ERROR*", sizeof(voice_name)); |
|
|
|
strncpy(voice_name, "*ERROR*", sizeof(voice_name)); |
|
|
|
|
|
|
|
|
|
|
|
lcd.show(0, 0, 16, "Save to Bank"); |
|
|
|
lcd.show(0, 0, 16, "Save to Bank"); |
|
|
|
lcd.show(0, 13, 2, configuration.performance.bank[selected_instance_id]); |
|
|
|
lcd.show(0, 13, 2, configuration.dexed[selected_instance_id].bank); |
|
|
|
lcd.show(1, 0, 2, configuration.performance.voice[selected_instance_id] + 1); |
|
|
|
lcd.show(1, 0, 2, configuration.dexed[selected_instance_id].voice + 1); |
|
|
|
lcd.show(1, 3, 10, voice_name); |
|
|
|
lcd.show(1, 3, 10, voice_name); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 3: |
|
|
|
case 3: |
|
|
@ -7161,14 +7161,14 @@ void UI_func_save_voice(uint8_t param) |
|
|
|
if (yesno == true) |
|
|
|
if (yesno == true) |
|
|
|
{ |
|
|
|
{ |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
bool ret = save_sd_voice(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], selected_instance_id); |
|
|
|
bool ret = save_sd_voice(configuration.dexed[selected_instance_id].bank, configuration.dexed[selected_instance_id].voice, selected_instance_id); |
|
|
|
|
|
|
|
|
|
|
|
if (ret == true) |
|
|
|
if (ret == true) |
|
|
|
Serial.println(F("Saving voice OK.")); |
|
|
|
Serial.println(F("Saving voice OK.")); |
|
|
|
else |
|
|
|
else |
|
|
|
Serial.println(F("Error while saving voice.")); |
|
|
|
Serial.println(F("Error while saving voice.")); |
|
|
|
#else |
|
|
|
#else |
|
|
|
save_sd_voice(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], selected_instance_id); |
|
|
|
save_sd_voice(configuration.dexed[selected_instance_id].bank, configuration.dexed[selected_instance_id].voice, selected_instance_id); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
lcd.show(1, 0, 16, "Done."); |
|
|
|
lcd.show(1, 0, 16, "Done."); |
|
|
@ -7209,7 +7209,7 @@ void UI_func_sysex_receive_bank(uint8_t param) |
|
|
|
|
|
|
|
|
|
|
|
yesno = false; |
|
|
|
yesno = false; |
|
|
|
mode = 0; |
|
|
|
mode = 0; |
|
|
|
bank_number = configuration.performance.bank[selected_instance_id]; |
|
|
|
bank_number = configuration.dexed[selected_instance_id].bank; |
|
|
|
memset(receive_bank_filename, 0, sizeof(receive_bank_filename)); |
|
|
|
memset(receive_bank_filename, 0, sizeof(receive_bank_filename)); |
|
|
|
|
|
|
|
|
|
|
|
lcd.setCursor(0, 0); |
|
|
|
lcd.setCursor(0, 0); |
|
|
@ -7218,7 +7218,7 @@ void UI_func_sysex_receive_bank(uint8_t param) |
|
|
|
lcd.print(F("[")); |
|
|
|
lcd.print(F("[")); |
|
|
|
lcd.setCursor(14, 1); |
|
|
|
lcd.setCursor(14, 1); |
|
|
|
lcd.print(F("]")); |
|
|
|
lcd.print(F("]")); |
|
|
|
if (!get_bank_name(configuration.performance.bank[selected_instance_id], receive_bank_filename, sizeof(receive_bank_filename))) |
|
|
|
if (!get_bank_name(configuration.dexed[selected_instance_id].bank, receive_bank_filename, sizeof(receive_bank_filename))) |
|
|
|
strcpy(receive_bank_filename, "*ERROR*"); |
|
|
|
strcpy(receive_bank_filename, "*ERROR*"); |
|
|
|
lcd.show(1, 0, 2, bank_number); |
|
|
|
lcd.show(1, 0, 2, bank_number); |
|
|
|
lcd.show(1, 3, 10, receive_bank_filename); |
|
|
|
lcd.show(1, 3, 10, receive_bank_filename); |
|
|
@ -7440,14 +7440,14 @@ void UI_func_sysex_send_bank(uint8_t param) |
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
{ |
|
|
|
{ |
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
bank_number = configuration.performance.bank[selected_instance_id]; |
|
|
|
bank_number = configuration.dexed[selected_instance_id].bank; |
|
|
|
lcd.setCursor(0, 0); |
|
|
|
lcd.setCursor(0, 0); |
|
|
|
lcd.print(F("MIDI Send Bank")); |
|
|
|
lcd.print(F("MIDI Send Bank")); |
|
|
|
if (!get_bank_name(configuration.performance.bank[selected_instance_id], bank_name, sizeof(bank_name))) |
|
|
|
if (!get_bank_name(configuration.dexed[selected_instance_id].bank, bank_name, sizeof(bank_name))) |
|
|
|
strncpy(bank_name, "*ERROR*", sizeof(bank_name)); |
|
|
|
strncpy(bank_name, "*ERROR*", sizeof(bank_name)); |
|
|
|
lcd.show(1, 2, 1, "["); |
|
|
|
lcd.show(1, 2, 1, "["); |
|
|
|
lcd.show(1, 14, 1, "]"); |
|
|
|
lcd.show(1, 14, 1, "]"); |
|
|
|
lcd.show(1, 0, 2, configuration.performance.bank[selected_instance_id]); |
|
|
|
lcd.show(1, 0, 2, configuration.dexed[selected_instance_id].bank); |
|
|
|
lcd.show(1, 3, 10, bank_name); |
|
|
|
lcd.show(1, 3, 10, bank_name); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -7547,8 +7547,8 @@ void UI_func_sysex_send_voice(uint8_t param) |
|
|
|
{ |
|
|
|
{ |
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
mode = 0; |
|
|
|
mode = 0; |
|
|
|
bank_number = configuration.performance.bank[selected_instance_id]; |
|
|
|
bank_number = configuration.dexed[selected_instance_id].bank; |
|
|
|
voice_number = configuration.performance.voice[selected_instance_id]; |
|
|
|
voice_number = configuration.dexed[selected_instance_id].voice; |
|
|
|
|
|
|
|
|
|
|
|
char bank_name[BANK_NAME_LEN]; |
|
|
|
char bank_name[BANK_NAME_LEN]; |
|
|
|
|
|
|
|
|
|
|
@ -8686,23 +8686,23 @@ void locate_previous_non_favorite() |
|
|
|
lcd.print("<SEARCHING"); |
|
|
|
lcd.print("<SEARCHING"); |
|
|
|
do |
|
|
|
do |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (configuration.performance.voice[selected_instance_id] == 0) |
|
|
|
if (configuration.dexed[selected_instance_id].voice == 0) |
|
|
|
{ |
|
|
|
{ |
|
|
|
configuration.performance.voice[selected_instance_id] = 32; //+1
|
|
|
|
configuration.dexed[selected_instance_id].voice = 32; //+1
|
|
|
|
if (configuration.performance.bank[selected_instance_id] < 1 ) |
|
|
|
if (configuration.dexed[selected_instance_id].bank < 1 ) |
|
|
|
configuration.performance.bank[selected_instance_id] = MAX_BANKS - 1; |
|
|
|
configuration.dexed[selected_instance_id].bank = MAX_BANKS - 1; |
|
|
|
|
|
|
|
|
|
|
|
do |
|
|
|
do |
|
|
|
{ //seek for previous bank
|
|
|
|
{ //seek for previous bank
|
|
|
|
configuration.performance.bank[selected_instance_id]--; |
|
|
|
configuration.dexed[selected_instance_id].bank--; |
|
|
|
if (configuration.performance.bank[selected_instance_id] < 1 ) |
|
|
|
if (configuration.dexed[selected_instance_id].bank < 1 ) |
|
|
|
configuration.performance.bank[selected_instance_id] = MAX_BANKS - 1; |
|
|
|
configuration.dexed[selected_instance_id].bank = MAX_BANKS - 1; |
|
|
|
favsearcher++; |
|
|
|
favsearcher++; |
|
|
|
} while (quick_check_favorites_in_bank(configuration.performance.bank[selected_instance_id], selected_instance_id) == true && favsearcher < 132); |
|
|
|
} while (quick_check_favorites_in_bank(configuration.dexed[selected_instance_id].bank, selected_instance_id) == true && favsearcher < 132); |
|
|
|
} |
|
|
|
} |
|
|
|
configuration.performance.voice[selected_instance_id]--; |
|
|
|
configuration.dexed[selected_instance_id].voice--; |
|
|
|
favsearcher++; |
|
|
|
favsearcher++; |
|
|
|
} while (check_favorite(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], |
|
|
|
} while (check_favorite(configuration.dexed[selected_instance_id].bank, configuration.dexed[selected_instance_id].voice, |
|
|
|
selected_instance_id) == true && favsearcher < 170); |
|
|
|
selected_instance_id) == true && favsearcher < 170); |
|
|
|
favsearcher = 0; |
|
|
|
favsearcher = 0; |
|
|
|
} |
|
|
|
} |
|
|
@ -8711,64 +8711,64 @@ void locate_previous_favorite() |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
// worst case, nothing found below voice 0 / bank 0 - start loop at last bank
|
|
|
|
// worst case, nothing found below voice 0 / bank 0 - start loop at last bank
|
|
|
|
if ( configuration.performance.voice[selected_instance_id] < 2 && |
|
|
|
if ( configuration.dexed[selected_instance_id].voice < 2 && |
|
|
|
configuration.performance.bank[selected_instance_id] == 0 && favsearcher < 170) |
|
|
|
configuration.dexed[selected_instance_id].bank == 0 && favsearcher < 170) |
|
|
|
{ |
|
|
|
{ |
|
|
|
configuration.performance.bank[selected_instance_id] = MAX_BANKS - 1; |
|
|
|
configuration.dexed[selected_instance_id].bank = MAX_BANKS - 1; |
|
|
|
configuration.performance.voice[selected_instance_id] = 32; |
|
|
|
configuration.dexed[selected_instance_id].voice = 32; |
|
|
|
} else |
|
|
|
} else |
|
|
|
|
|
|
|
|
|
|
|
if (configuration.performance.voice[selected_instance_id] == 0 && configuration.performance.bank[selected_instance_id] < MAX_BANKS - 1 ) |
|
|
|
if (configuration.dexed[selected_instance_id].voice == 0 && configuration.dexed[selected_instance_id].bank < MAX_BANKS - 1 ) |
|
|
|
{ //if at begin of any other bank
|
|
|
|
{ //if at begin of any other bank
|
|
|
|
configuration.performance.bank[selected_instance_id]--; |
|
|
|
configuration.dexed[selected_instance_id].bank--; |
|
|
|
configuration.performance.voice[selected_instance_id] = 32; |
|
|
|
configuration.dexed[selected_instance_id].voice = 32; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (configuration.performance.voice[selected_instance_id] >= 0 && configuration.performance.bank[selected_instance_id] >= 0) { |
|
|
|
if (configuration.dexed[selected_instance_id].voice >= 0 && configuration.dexed[selected_instance_id].bank >= 0) { |
|
|
|
|
|
|
|
|
|
|
|
lcd.setCursor(3, 0); |
|
|
|
lcd.setCursor(3, 0); |
|
|
|
lcd.print("<SEARCHING"); |
|
|
|
lcd.print("<SEARCHING"); |
|
|
|
|
|
|
|
|
|
|
|
do { //first find previous fav in current bank
|
|
|
|
do { //first find previous fav in current bank
|
|
|
|
|
|
|
|
|
|
|
|
if (configuration.performance.voice[selected_instance_id] == 0) { |
|
|
|
if (configuration.dexed[selected_instance_id].voice == 0) { |
|
|
|
|
|
|
|
|
|
|
|
if (configuration.performance.bank[selected_instance_id] == 0) { |
|
|
|
if (configuration.dexed[selected_instance_id].bank == 0) { |
|
|
|
configuration.performance.bank[selected_instance_id] = MAX_BANKS - 1; |
|
|
|
configuration.dexed[selected_instance_id].bank = MAX_BANKS - 1; |
|
|
|
configuration.performance.voice[selected_instance_id] = 32; |
|
|
|
configuration.dexed[selected_instance_id].voice = 32; |
|
|
|
} else |
|
|
|
} else |
|
|
|
configuration.performance.bank[selected_instance_id]--; |
|
|
|
configuration.dexed[selected_instance_id].bank--; |
|
|
|
configuration.performance.voice[selected_instance_id] = 32; |
|
|
|
configuration.dexed[selected_instance_id].voice = 32; |
|
|
|
|
|
|
|
|
|
|
|
} else |
|
|
|
} else |
|
|
|
|
|
|
|
|
|
|
|
configuration.performance.voice[selected_instance_id]--; |
|
|
|
configuration.dexed[selected_instance_id].voice--; |
|
|
|
favsearcher++; |
|
|
|
favsearcher++; |
|
|
|
|
|
|
|
|
|
|
|
} while ( check_favorite(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], |
|
|
|
} while ( check_favorite(configuration.dexed[selected_instance_id].bank, configuration.dexed[selected_instance_id].voice, |
|
|
|
selected_instance_id) == false && configuration.performance.voice[selected_instance_id] >= 1 && favsearcher < 36); |
|
|
|
selected_instance_id) == false && configuration.dexed[selected_instance_id].voice >= 1 && favsearcher < 36); |
|
|
|
|
|
|
|
|
|
|
|
// if found, we are done. else quick check in previous banks
|
|
|
|
// if found, we are done. else quick check in previous banks
|
|
|
|
|
|
|
|
|
|
|
|
if ( check_favorite(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], |
|
|
|
if ( check_favorite(configuration.dexed[selected_instance_id].bank, configuration.dexed[selected_instance_id].voice, |
|
|
|
selected_instance_id) == false && configuration.performance.voice[selected_instance_id] >= 0 && |
|
|
|
selected_instance_id) == false && configuration.dexed[selected_instance_id].voice >= 0 && |
|
|
|
configuration.performance.bank[selected_instance_id] >= 0 && favsearcher < 170) |
|
|
|
configuration.dexed[selected_instance_id].bank >= 0 && favsearcher < 170) |
|
|
|
{ |
|
|
|
{ |
|
|
|
configuration.performance.voice[selected_instance_id] = 32; |
|
|
|
configuration.dexed[selected_instance_id].voice = 32; |
|
|
|
|
|
|
|
|
|
|
|
do { //seek for previous bank
|
|
|
|
do { //seek for previous bank
|
|
|
|
configuration.performance.bank[selected_instance_id]--; |
|
|
|
configuration.dexed[selected_instance_id].bank--; |
|
|
|
favsearcher++; |
|
|
|
favsearcher++; |
|
|
|
} while (quick_check_favorites_in_bank(configuration.performance.bank[selected_instance_id], selected_instance_id) == false && |
|
|
|
} while (quick_check_favorites_in_bank(configuration.dexed[selected_instance_id].bank, selected_instance_id) == false && |
|
|
|
favsearcher < 132 && configuration.performance.bank[selected_instance_id] >= 0); |
|
|
|
favsearcher < 132 && configuration.dexed[selected_instance_id].bank >= 0); |
|
|
|
|
|
|
|
|
|
|
|
do { //last try to search if a bank with fav was found
|
|
|
|
do { //last try to search if a bank with fav was found
|
|
|
|
|
|
|
|
|
|
|
|
configuration.performance.voice[selected_instance_id]--; |
|
|
|
configuration.dexed[selected_instance_id].voice--; |
|
|
|
favsearcher++; |
|
|
|
favsearcher++; |
|
|
|
} while ( check_favorite(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], |
|
|
|
} while ( check_favorite(configuration.dexed[selected_instance_id].bank, configuration.dexed[selected_instance_id].voice, |
|
|
|
selected_instance_id) == false && configuration.performance.voice[selected_instance_id] >= 1 && favsearcher < 170); |
|
|
|
selected_instance_id) == false && configuration.dexed[selected_instance_id].voice >= 1 && favsearcher < 170); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
favsearcher = 0; |
|
|
|
favsearcher = 0; |
|
|
@ -8779,59 +8779,59 @@ void locate_next_favorite() |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
bool RollOver = false; |
|
|
|
bool RollOver = false; |
|
|
|
if (configuration.performance.voice[selected_instance_id] > 30 && configuration.performance.bank[selected_instance_id] >= MAX_BANKS - 1 ) |
|
|
|
if (configuration.dexed[selected_instance_id].voice > 30 && configuration.dexed[selected_instance_id].bank >= MAX_BANKS - 1 ) |
|
|
|
{ //if at end of all banks
|
|
|
|
{ //if at end of all banks
|
|
|
|
configuration.performance.bank[selected_instance_id] = 0; |
|
|
|
configuration.dexed[selected_instance_id].bank = 0; |
|
|
|
configuration.performance.voice[selected_instance_id] = 0; |
|
|
|
configuration.dexed[selected_instance_id].voice = 0; |
|
|
|
RollOver = true; |
|
|
|
RollOver = true; |
|
|
|
|
|
|
|
|
|
|
|
} else if (configuration.performance.voice[selected_instance_id] > 30 && configuration.performance.bank[selected_instance_id] < MAX_BANKS - 1 ) |
|
|
|
} else if (configuration.dexed[selected_instance_id].voice > 30 && configuration.dexed[selected_instance_id].bank < MAX_BANKS - 1 ) |
|
|
|
{ //if at end of any other bank
|
|
|
|
{ //if at end of any other bank
|
|
|
|
configuration.performance.bank[selected_instance_id]++; |
|
|
|
configuration.dexed[selected_instance_id].bank++; |
|
|
|
configuration.performance.voice[selected_instance_id] = 0; |
|
|
|
configuration.dexed[selected_instance_id].voice = 0; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (configuration.performance.voice[selected_instance_id] <= 30 && configuration.performance.bank[selected_instance_id] <= MAX_BANKS ) { |
|
|
|
if (configuration.dexed[selected_instance_id].voice <= 30 && configuration.dexed[selected_instance_id].bank <= MAX_BANKS ) { |
|
|
|
|
|
|
|
|
|
|
|
lcd.setCursor(3, 0); |
|
|
|
lcd.setCursor(3, 0); |
|
|
|
lcd.print(">SEARCHING"); |
|
|
|
lcd.print(">SEARCHING"); |
|
|
|
|
|
|
|
|
|
|
|
do { //first find next fav in current bank
|
|
|
|
do { //first find next fav in current bank
|
|
|
|
|
|
|
|
|
|
|
|
if (RollOver == false) configuration.performance.voice[selected_instance_id]++; else RollOver = true; |
|
|
|
if (RollOver == false) configuration.dexed[selected_instance_id].voice++; else RollOver = true; |
|
|
|
favsearcher++; |
|
|
|
favsearcher++; |
|
|
|
|
|
|
|
|
|
|
|
} while ( check_favorite(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], |
|
|
|
} while ( check_favorite(configuration.dexed[selected_instance_id].bank, configuration.dexed[selected_instance_id].voice, |
|
|
|
selected_instance_id) == false && configuration.performance.voice[selected_instance_id] <= 32 && favsearcher < 36); |
|
|
|
selected_instance_id) == false && configuration.dexed[selected_instance_id].voice <= 32 && favsearcher < 36); |
|
|
|
|
|
|
|
|
|
|
|
// if found, we are done. else quick check in next banks
|
|
|
|
// if found, we are done. else quick check in next banks
|
|
|
|
|
|
|
|
|
|
|
|
if ( check_favorite(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], |
|
|
|
if ( check_favorite(configuration.dexed[selected_instance_id].bank, configuration.dexed[selected_instance_id].voice, |
|
|
|
selected_instance_id) == false && |
|
|
|
selected_instance_id) == false && |
|
|
|
configuration.performance.bank[selected_instance_id] < MAX_BANKS && favsearcher < 170) |
|
|
|
configuration.dexed[selected_instance_id].bank < MAX_BANKS && favsearcher < 170) |
|
|
|
{ |
|
|
|
{ |
|
|
|
configuration.performance.voice[selected_instance_id] = 0; |
|
|
|
configuration.dexed[selected_instance_id].voice = 0; |
|
|
|
|
|
|
|
|
|
|
|
do { //seek in next bank
|
|
|
|
do { //seek in next bank
|
|
|
|
|
|
|
|
|
|
|
|
configuration.performance.bank[selected_instance_id]++; |
|
|
|
configuration.dexed[selected_instance_id].bank++; |
|
|
|
if ( configuration.performance.bank[selected_instance_id] > MAX_BANKS - 1 && favsearcher < 190) |
|
|
|
if ( configuration.dexed[selected_instance_id].bank > MAX_BANKS - 1 && favsearcher < 190) |
|
|
|
{ |
|
|
|
{ |
|
|
|
configuration.performance.bank[selected_instance_id] = 0; |
|
|
|
configuration.dexed[selected_instance_id].bank = 0; |
|
|
|
configuration.performance.voice[selected_instance_id] = 0; |
|
|
|
configuration.dexed[selected_instance_id].voice = 0; |
|
|
|
} |
|
|
|
} |
|
|
|
favsearcher++; |
|
|
|
favsearcher++; |
|
|
|
} while (quick_check_favorites_in_bank(configuration.performance.bank[selected_instance_id], selected_instance_id) == false && |
|
|
|
} while (quick_check_favorites_in_bank(configuration.dexed[selected_instance_id].bank, selected_instance_id) == false && |
|
|
|
favsearcher < 132 ); |
|
|
|
favsearcher < 132 ); |
|
|
|
|
|
|
|
|
|
|
|
if ( check_favorite(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], |
|
|
|
if ( check_favorite(configuration.dexed[selected_instance_id].bank, configuration.dexed[selected_instance_id].voice, |
|
|
|
selected_instance_id) == false && configuration.performance.voice[selected_instance_id] <= 32 && favsearcher < 190) |
|
|
|
selected_instance_id) == false && configuration.dexed[selected_instance_id].voice <= 32 && favsearcher < 190) |
|
|
|
{ |
|
|
|
{ |
|
|
|
do { //last bank to search if a fav can be found
|
|
|
|
do { //last bank to search if a fav can be found
|
|
|
|
|
|
|
|
|
|
|
|
configuration.performance.voice[selected_instance_id]++; |
|
|
|
configuration.dexed[selected_instance_id].voice++; |
|
|
|
favsearcher++; |
|
|
|
favsearcher++; |
|
|
|
} while ( check_favorite(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], |
|
|
|
} while ( check_favorite(configuration.dexed[selected_instance_id].bank, configuration.dexed[selected_instance_id].voice, |
|
|
|
selected_instance_id) == false && favsearcher < 170); |
|
|
|
selected_instance_id) == false && favsearcher < 170); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -8846,21 +8846,21 @@ void locate_next_non_favorite() |
|
|
|
lcd.setCursor(3, 0); |
|
|
|
lcd.setCursor(3, 0); |
|
|
|
lcd.print(">SEARCHING"); |
|
|
|
lcd.print(">SEARCHING"); |
|
|
|
do { |
|
|
|
do { |
|
|
|
configuration.performance.voice[selected_instance_id]++; |
|
|
|
configuration.dexed[selected_instance_id].voice++; |
|
|
|
if (configuration.performance.voice[selected_instance_id] > 31) { |
|
|
|
if (configuration.dexed[selected_instance_id].voice > 31) { |
|
|
|
configuration.performance.voice[selected_instance_id] = 0; |
|
|
|
configuration.dexed[selected_instance_id].voice = 0; |
|
|
|
//configuration.performance.bank[selected_instance_id]++;
|
|
|
|
//configuration.dexed[selected_instance_id].bank++;
|
|
|
|
if (configuration.performance.bank[selected_instance_id] > MAX_BANKS - 1) |
|
|
|
if (configuration.dexed[selected_instance_id].bank > MAX_BANKS - 1) |
|
|
|
configuration.performance.bank[selected_instance_id] = 0; |
|
|
|
configuration.dexed[selected_instance_id].bank = 0; |
|
|
|
do { //seek for next bank
|
|
|
|
do { //seek for next bank
|
|
|
|
configuration.performance.bank[selected_instance_id]++; |
|
|
|
configuration.dexed[selected_instance_id].bank++; |
|
|
|
if (configuration.performance.bank[selected_instance_id] > MAX_BANKS - 1) |
|
|
|
if (configuration.dexed[selected_instance_id].bank > MAX_BANKS - 1) |
|
|
|
configuration.performance.bank[selected_instance_id] = 0; |
|
|
|
configuration.dexed[selected_instance_id].bank = 0; |
|
|
|
favsearcher++; |
|
|
|
favsearcher++; |
|
|
|
} while (quick_check_favorites_in_bank(configuration.performance.bank[selected_instance_id], selected_instance_id) == true && favsearcher < 132); |
|
|
|
} while (quick_check_favorites_in_bank(configuration.dexed[selected_instance_id].bank, selected_instance_id) == true && favsearcher < 132); |
|
|
|
} |
|
|
|
} |
|
|
|
favsearcher++; |
|
|
|
favsearcher++; |
|
|
|
} while ( check_favorite(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], |
|
|
|
} while ( check_favorite(configuration.dexed[selected_instance_id].bank, configuration.dexed[selected_instance_id].voice, |
|
|
|
selected_instance_id) == true && favsearcher < 170); |
|
|
|
selected_instance_id) == true && favsearcher < 170); |
|
|
|
favsearcher = 0; |
|
|
|
favsearcher = 0; |
|
|
|
} |
|
|
|
} |
|
|
@ -8870,10 +8870,10 @@ void locate_random_non_favorite() |
|
|
|
//find random non-fav
|
|
|
|
//find random non-fav
|
|
|
|
do |
|
|
|
do |
|
|
|
{ |
|
|
|
{ |
|
|
|
configuration.performance.voice[selected_instance_id] = random(32); |
|
|
|
configuration.dexed[selected_instance_id].voice = random(32); |
|
|
|
configuration.performance.bank[selected_instance_id] = random(MAX_BANKS - 1); |
|
|
|
configuration.dexed[selected_instance_id].bank = random(MAX_BANKS - 1); |
|
|
|
favsearcher++; |
|
|
|
favsearcher++; |
|
|
|
} while ( check_favorite(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], |
|
|
|
} while ( check_favorite(configuration.dexed[selected_instance_id].bank, configuration.dexed[selected_instance_id].voice, |
|
|
|
selected_instance_id) == true && favsearcher < 100); |
|
|
|
selected_instance_id) == true && favsearcher < 100); |
|
|
|
favsearcher = 0; |
|
|
|
favsearcher = 0; |
|
|
|
} |
|
|
|
} |
|
|
|