|
|
|
@ -87,6 +87,8 @@ extern AudioAmplifier* dexed_level[NUM_DEXED]; |
|
|
|
|
extern AudioEffectMonoStereo* mono2stereo[NUM_DEXED]; |
|
|
|
|
extern AudioSynthWaveformDc* pan[NUM_DEXED]; |
|
|
|
|
extern char sd_string[LCD_cols + 1]; |
|
|
|
|
extern char g_voice_name[NUM_DEXED][VOICE_NAME_LEN]; |
|
|
|
|
extern char g_bank_name[NUM_DEXED][BANK_NAME_LEN]; |
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
|
GLOBAL |
|
|
|
@ -3288,6 +3290,7 @@ void UI_func_voice_select(uint8_t param) |
|
|
|
|
switch (menu_voice_select) |
|
|
|
|
{ |
|
|
|
|
case MENU_VOICE_BANK: |
|
|
|
|
memset(g_bank_name[instance_id], 0, BANK_NAME_LEN); |
|
|
|
|
bank_tmp = constrain(configuration.performance.bank[instance_id] - ENCODER[ENC_R].speed(), 0, MAX_BANKS - 1); |
|
|
|
|
configuration.performance.bank[instance_id] = bank_tmp; |
|
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
@ -3299,6 +3302,7 @@ void UI_func_voice_select(uint8_t param) |
|
|
|
|
#endif |
|
|
|
|
break; |
|
|
|
|
case MENU_VOICE_SOUND: |
|
|
|
|
memset(g_voice_name[instance_id], 0, VOICE_NAME_LEN); |
|
|
|
|
voice_tmp = configuration.performance.voice[instance_id] - ENCODER[ENC_R].speed(); |
|
|
|
|
if (voice_tmp < 0 && configuration.performance.bank[instance_id] - 1 >= 0) |
|
|
|
|
{ |
|
|
|
@ -3328,6 +3332,7 @@ void UI_func_voice_select(uint8_t param) |
|
|
|
|
switch (menu_voice_select) |
|
|
|
|
{ |
|
|
|
|
case MENU_VOICE_BANK: |
|
|
|
|
memset(g_bank_name[instance_id], 0, BANK_NAME_LEN); |
|
|
|
|
bank_tmp = constrain(configuration.performance.bank[instance_id] + ENCODER[ENC_R].speed(), 0, MAX_BANKS - 1); |
|
|
|
|
configuration.performance.bank[instance_id] = bank_tmp; |
|
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
@ -3339,6 +3344,7 @@ void UI_func_voice_select(uint8_t param) |
|
|
|
|
#endif |
|
|
|
|
break; |
|
|
|
|
case MENU_VOICE_SOUND: |
|
|
|
|
memset(g_voice_name[instance_id], 0, VOICE_NAME_LEN); |
|
|
|
|
voice_tmp = configuration.performance.voice[instance_id] + ENCODER[ENC_R].speed(); |
|
|
|
|
if (voice_tmp >= MAX_VOICES && configuration.performance.bank[instance_id] + 1 < MAX_BANKS) |
|
|
|
|
{ |
|
|
|
@ -3371,10 +3377,25 @@ void UI_func_voice_select(uint8_t param) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (strlen(g_bank_name[instance_id]) > 0) |
|
|
|
|
{ |
|
|
|
|
strncpy(bank_name, g_bank_name[instance_id], sizeof(bank_name)); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
if (!get_bank_name(configuration.performance.bank[instance_id], bank_name, sizeof(bank_name))) |
|
|
|
|
strncpy(bank_name, "*ERROR*", sizeof(bank_name)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (strlen(g_voice_name[instance_id]) > 0) |
|
|
|
|
{ |
|
|
|
|
strncpy(voice_name, g_voice_name[instance_id], sizeof(voice_name)); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
if (!get_voice_by_bank_name(configuration.performance.bank[instance_id], bank_name, configuration.performance.voice[instance_id], voice_name, sizeof(voice_name))) |
|
|
|
|
strncpy(voice_name, "*ERROR*", sizeof(voice_name)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
lcd.show(0, 0, 2, configuration.performance.bank[instance_id]); |
|
|
|
|
lcd.show(1, 0, 2, configuration.performance.voice[instance_id] + 1); |
|
|
|
|