|
|
|
@ -25,7 +25,6 @@ |
|
|
|
|
#ifdef ENABLE_LCD_UI |
|
|
|
|
#ifndef _UI_HPP_ |
|
|
|
|
#define _UI_HPP_ |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
#include "config.h" |
|
|
|
|
#include "disp_plus.h" |
|
|
|
@ -269,6 +268,11 @@ void save_favorite(uint8_t b, uint8_t v, uint8_t instance_id); |
|
|
|
|
void draw_favorite_icon(uint8_t b, uint8_t v, uint8_t instance_id); |
|
|
|
|
bool check_favorite(uint8_t b, uint8_t v, uint8_t instance_id); |
|
|
|
|
bool quick_check_favorites_in_bank(uint8_t b, uint8_t instance_id); |
|
|
|
|
void locate_previous_non_favorite(); |
|
|
|
|
void locate_previous_favorite(); |
|
|
|
|
void locate_next_favorite(); |
|
|
|
|
void locate_next_non_favorite(); |
|
|
|
|
void locate_random_non_favorite(); |
|
|
|
|
|
|
|
|
|
// normal menu
|
|
|
|
|
LCDMenuLib2_menu LCDML_0(255, 0, 0, NULL, NULL); // normal root menu element (do not change)
|
|
|
|
@ -954,6 +958,7 @@ void UI_func_reverb_roomsize(uint8_t param) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#if USE_PLATEREVERB != 1 |
|
|
|
|
void UI_func_reverb_damping(uint8_t param) |
|
|
|
|
{ |
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
@ -976,12 +981,8 @@ void UI_func_reverb_damping(uint8_t param) |
|
|
|
|
|
|
|
|
|
lcd_display_bar_int("Reverb Damp.", configuration.fx.reverb_damping, 1.0, REVERB_DAMPING_MIN, REVERB_DAMPING_MAX, 3, false, false, false); |
|
|
|
|
|
|
|
|
|
#ifdef USE_PLATEREVERB |
|
|
|
|
reverb.hidamp(mapfloat(configuration.fx.reverb_damping, REVERB_DAMPING_MIN, REVERB_DAMPING_MAX, 0.0, 1.0)); |
|
|
|
|
#else |
|
|
|
|
freeverb_l.damping(mapfloat(configuration.fx.reverb_damping, REVERB_DAMPING_MIN, REVERB_DAMPING_MAX, 0.0, 1.0)); |
|
|
|
|
freeverb_r.damping(mapfloat(configuration.fx.reverb_damping, REVERB_DAMPING_MIN, REVERB_DAMPING_MAX, 0.0, 1.0)); |
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
@ -991,27 +992,139 @@ void UI_func_reverb_damping(uint8_t param) |
|
|
|
|
EEPROM.update(EEPROM_START_ADDRESS + offsetof(configuration_s, fx.reverb_damping), configuration.fx.reverb_damping); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//// HIER
|
|
|
|
|
#else |
|
|
|
|
void UI_func_reverb_lowpass(uint8_t param) |
|
|
|
|
{ |
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
|
{ |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
|
|
|
|
|
lcd_special_chars(BLOCKBAR); |
|
|
|
|
lcd_display_bar_int("Reverb Lowpass", configuration.fx.reverb_lowpass, 1.0, REVERB_LOWPASS_MIN, REVERB_LOWPASS_MAX, 3, false, false, true); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_loop()) // ****** LOOP *********
|
|
|
|
|
{ |
|
|
|
|
if ((LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) || (LCDML.BT_checkUp() && encoderDir[ENC_R].Up())) |
|
|
|
|
{ |
|
|
|
|
if (LCDML.BT_checkDown()) |
|
|
|
|
configuration.fx.reverb_lowpass = constrain(configuration.fx.reverb_lowpass + ENCODER[ENC_R].speed(), REVERB_LOWPASS_MIN, REVERB_LOWPASS_MAX); |
|
|
|
|
else if (LCDML.BT_checkUp()) |
|
|
|
|
configuration.fx.reverb_lowpass = constrain(configuration.fx.reverb_lowpass - ENCODER[ENC_R].speed(), REVERB_LOWPASS_MIN, REVERB_LOWPASS_MAX); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
lcd_display_bar_int("Reverb Lowpass", configuration.fx.reverb_lowpass, 1.0, REVERB_LOWPASS_MIN, REVERB_LOWPASS_MAX, 3, false, false, false); |
|
|
|
|
|
|
|
|
|
reverb.lowpass(mapfloat(configuration.fx.reverb_lowpass, REVERB_LOWPASS_MIN, REVERB_LOWPASS_MAX, 0.0, 1.0)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
{ |
|
|
|
|
lcd_special_chars(SCROLLBAR); |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
EEPROM.update(EEPROM_START_ADDRESS + offsetof(configuration_s, fx.reverb_lowpass), configuration.fx.reverb_lowpass); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void UI_func_reverb_lodamp(uint8_t param) |
|
|
|
|
{ |
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
|
{ |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
|
|
|
|
|
lcd_special_chars(BLOCKBAR); |
|
|
|
|
lcd_display_bar_int("Reverb Lodamp.", configuration.fx.reverb_lodamp, 1.0, REVERB_LODAMP_MIN, REVERB_LODAMP_MAX, 3, false, false, true); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_loop()) // ****** LOOP *********
|
|
|
|
|
{ |
|
|
|
|
if ((LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) || (LCDML.BT_checkUp() && encoderDir[ENC_R].Up())) |
|
|
|
|
{ |
|
|
|
|
if (LCDML.BT_checkDown()) |
|
|
|
|
configuration.fx.reverb_lodamp = constrain(configuration.fx.reverb_lodamp + ENCODER[ENC_R].speed(), REVERB_LODAMP_MIN, REVERB_LODAMP_MAX); |
|
|
|
|
else if (LCDML.BT_checkUp()) |
|
|
|
|
configuration.fx.reverb_lodamp = constrain(configuration.fx.reverb_lodamp - ENCODER[ENC_R].speed(), REVERB_LODAMP_MIN, REVERB_LODAMP_MAX); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
lcd_display_bar_int("Reverb Lodamp.", configuration.fx.reverb_lodamp, 1.0, REVERB_LODAMP_MIN, REVERB_LODAMP_MAX, 3, false, false, false); |
|
|
|
|
|
|
|
|
|
reverb.lodamp(mapfloat(configuration.fx.reverb_lodamp, REVERB_LODAMP_MIN, REVERB_LODAMP_MAX, 0.0, 1.0)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
{ |
|
|
|
|
lcd_special_chars(SCROLLBAR); |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
EEPROM.update(EEPROM_START_ADDRESS + offsetof(configuration_s, fx.reverb_lodamp), configuration.fx.reverb_lodamp); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void UI_func_reverb_hidamp(uint8_t param) |
|
|
|
|
{ |
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
|
{ |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
|
|
|
|
|
lcd_special_chars(BLOCKBAR); |
|
|
|
|
lcd_display_bar_int("Reverb Hidamp.", configuration.fx.reverb_hidamp, 1.0, REVERB_HIDAMP_MIN, REVERB_HIDAMP_MAX, 3, false, false, true); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_loop()) // ****** LOOP *********
|
|
|
|
|
{ |
|
|
|
|
if ((LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) || (LCDML.BT_checkUp() && encoderDir[ENC_R].Up())) |
|
|
|
|
{ |
|
|
|
|
if (LCDML.BT_checkDown()) |
|
|
|
|
configuration.fx.reverb_hidamp = constrain(configuration.fx.reverb_hidamp + ENCODER[ENC_R].speed(), REVERB_HIDAMP_MIN, REVERB_HIDAMP_MAX); |
|
|
|
|
else if (LCDML.BT_checkUp()) |
|
|
|
|
configuration.fx.reverb_hidamp = constrain(configuration.fx.reverb_hidamp - ENCODER[ENC_R].speed(), REVERB_HIDAMP_MIN, REVERB_HIDAMP_MAX); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
lcd_display_bar_int("Reverb Hidamp.", configuration.fx.reverb_hidamp, 1.0, REVERB_HIDAMP_MIN, REVERB_HIDAMP_MAX, 3, false, false, false); |
|
|
|
|
|
|
|
|
|
reverb.hidamp(mapfloat(configuration.fx.reverb_hidamp, REVERB_HIDAMP_MIN, REVERB_HIDAMP_MAX, 0.0, 1.0)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
{ |
|
|
|
|
lcd_special_chars(SCROLLBAR); |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
EEPROM.update(EEPROM_START_ADDRESS + offsetof(configuration_s, fx.reverb_hidamp), configuration.fx.reverb_hidamp); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void UI_func_reverb_diffusion(uint8_t param) |
|
|
|
|
{ |
|
|
|
|
if (LCDML.FUNC_setup()) // ****** SETUP *********
|
|
|
|
|
{ |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
|
|
|
|
|
lcd_special_chars(BLOCKBAR); |
|
|
|
|
lcd_display_bar_int("Reverb Diff.", configuration.fx.reverb_diffusion, 1.0, REVERB_DIFFUSION_MIN, REVERB_DIFFUSION_MAX, 3, false, false, true); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_loop()) // ****** LOOP *********
|
|
|
|
|
{ |
|
|
|
|
if ((LCDML.BT_checkDown() && encoderDir[ENC_R].Down()) || (LCDML.BT_checkUp() && encoderDir[ENC_R].Up())) |
|
|
|
|
{ |
|
|
|
|
if (LCDML.BT_checkDown()) |
|
|
|
|
configuration.fx.reverb_diffusion = constrain(configuration.fx.reverb_diffusion + ENCODER[ENC_R].speed(), REVERB_DIFFUSION_MIN, REVERB_DIFFUSION_MAX); |
|
|
|
|
else if (LCDML.BT_checkUp()) |
|
|
|
|
configuration.fx.reverb_diffusion = constrain(configuration.fx.reverb_diffusion - ENCODER[ENC_R].speed(), REVERB_DIFFUSION_MIN, REVERB_DIFFUSION_MAX); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
lcd_display_bar_int("Reverb Diff.", configuration.fx.reverb_diffusion, 1.0, REVERB_DIFFUSION_MIN, REVERB_DIFFUSION_MAX, 3, false, false, false); |
|
|
|
|
|
|
|
|
|
reverb.diffusion(mapfloat(configuration.fx.reverb_diffusion, REVERB_DIFFUSION_MIN, REVERB_DIFFUSION_MAX, 0.0, 1.0)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
|
{ |
|
|
|
|
lcd_special_chars(SCROLLBAR); |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
EEPROM.update(EEPROM_START_ADDRESS + offsetof(configuration_s, fx.reverb_diffusion), configuration.fx.reverb_diffusion); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
#endif // PLATEREVERB != 1
|
|
|
|
|
|
|
|
|
|
void UI_func_reverb_level(uint8_t param) |
|
|
|
|
{ |
|
|
|
@ -1486,7 +1599,7 @@ void UI_func_filter_cutoff(uint8_t param) |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
|
|
|
|
|
lcd_special_chars(BLOCKBAR); |
|
|
|
|
lcd_display_bar_int("Filter Cut", configuration.fx.filter_cutoff[selected_instance_id], 1.0, FILTER_CUTOFF_MIN, FILTER_CUTOFF_MAX, 3, false, false, true); |
|
|
|
|
lcd_display_bar_int("Filter Cutoff", configuration.fx.filter_cutoff[selected_instance_id], 1.0, FILTER_CUTOFF_MIN, FILTER_CUTOFF_MAX, 3, false, false, true); |
|
|
|
|
|
|
|
|
|
lcd_active_instance_number(selected_instance_id); |
|
|
|
|
UI_update_instance_icons(); |
|
|
|
@ -1516,7 +1629,7 @@ void UI_func_filter_cutoff(uint8_t param) |
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
lcd_display_bar_int("Filter Cut", configuration.fx.filter_cutoff[selected_instance_id], 1.0, FILTER_CUTOFF_MIN, FILTER_CUTOFF_MAX, 3, false, false, false); |
|
|
|
|
lcd_display_bar_int("Filter Cutoff", configuration.fx.filter_cutoff[selected_instance_id], 1.0, FILTER_CUTOFF_MIN, FILTER_CUTOFF_MAX, 3, false, false, false); |
|
|
|
|
|
|
|
|
|
MicroDexed[selected_instance_id]->fx.Cutoff = mapfloat(configuration.fx.filter_cutoff[selected_instance_id], FILTER_CUTOFF_MIN, FILTER_CUTOFF_MAX, 1.0, 0.0); |
|
|
|
|
} |
|
|
|
@ -1539,7 +1652,7 @@ void UI_func_filter_resonance(uint8_t param) |
|
|
|
|
encoderDir[ENC_R].reset(); |
|
|
|
|
|
|
|
|
|
lcd_special_chars(BLOCKBAR); |
|
|
|
|
lcd_display_bar_int("Filter Res", configuration.fx.filter_resonance[selected_instance_id], 1.0, FILTER_RESONANCE_MIN, FILTER_RESONANCE_MAX, 3, false, false, true); |
|
|
|
|
lcd_display_bar_int("Filter Reso.", configuration.fx.filter_resonance[selected_instance_id], 1.0, FILTER_RESONANCE_MIN, FILTER_RESONANCE_MAX, 3, false, false, true); |
|
|
|
|
|
|
|
|
|
lcd_active_instance_number(selected_instance_id); |
|
|
|
|
UI_update_instance_icons(); |
|
|
|
@ -1569,7 +1682,7 @@ void UI_func_filter_resonance(uint8_t param) |
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
lcd_display_bar_int("Filter Res", configuration.fx.filter_resonance[selected_instance_id], 1.0, FILTER_RESONANCE_MIN, FILTER_RESONANCE_MAX, 3, false, false, false); |
|
|
|
|
lcd_display_bar_int("Filter Reso.", configuration.fx.filter_resonance[selected_instance_id], 1.0, FILTER_RESONANCE_MIN, FILTER_RESONANCE_MAX, 3, false, false, false); |
|
|
|
|
|
|
|
|
|
MicroDexed[selected_instance_id]->fx.Reso = mapfloat(configuration.fx.filter_resonance[selected_instance_id], FILTER_RESONANCE_MIN, FILTER_RESONANCE_MAX, 1.0, 0.0); |
|
|
|
|
} |
|
|
|
@ -1987,19 +2100,15 @@ void UI_func_favorites(uint8_t param) |
|
|
|
|
{ |
|
|
|
|
case 0: |
|
|
|
|
lcd.print(F("[ All presets ]")); |
|
|
|
|
|
|
|
|
|
break; |
|
|
|
|
case 1: |
|
|
|
|
lcd.print(F("[ FAVs. only ]")); |
|
|
|
|
|
|
|
|
|
break; |
|
|
|
|
case 2: |
|
|
|
|
lcd.print(F("[non-FAVs. only]")); |
|
|
|
|
|
|
|
|
|
break; |
|
|
|
|
case 3: |
|
|
|
|
lcd.print(F("[random non-FAV]")); |
|
|
|
|
|
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -2027,7 +2136,6 @@ void UI_func_favorites(uint8_t param) |
|
|
|
|
lcd.print(F("[random non-FAV]")); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
@ -2128,7 +2236,7 @@ void UI_func_polyphony(uint8_t param) |
|
|
|
|
if (LCDML.BT_checkDown()) |
|
|
|
|
{ |
|
|
|
|
#if NUM_DEXED>1 |
|
|
|
|
if (configuration.dexed[selected_instance_id].polyphony < POLYPHONY_MAX - configuration.dexed[selected_instance_id + 1 % NUM_DEXED].polyphony) |
|
|
|
|
if (configuration.dexed[selected_instance_id].polyphony < POLYPHONY_MAX - configuration.dexed[(selected_instance_id + 1) % NUM_DEXED].polyphony) |
|
|
|
|
configuration.dexed[selected_instance_id].polyphony = constrain(configuration.dexed[selected_instance_id].polyphony + 1, POLYPHONY_MIN, POLYPHONY_MAX - configuration.dexed[(selected_instance_id + 1) % NUM_DEXED].polyphony); |
|
|
|
|
#else |
|
|
|
|
configuration.dexed[selected_instance_id].polyphony = constrain(configuration.dexed[selected_instance_id].polyphony + 1, POLYPHONY_MIN, POLYPHONY_MAX); |
|
|
|
@ -2159,7 +2267,7 @@ void UI_func_polyphony(uint8_t param) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#if NUM_DEXED>1 |
|
|
|
|
lcd_display_bar_int("Polyphony", configuration.dexed[selected_instance_id].polyphony, 1.0, POLYPHONY_MIN, POLYPHONY_MAX - configuration.dexed[selected_instance_id + 1 % NUM_DEXED].polyphony, 2, false, false, false); |
|
|
|
|
lcd_display_bar_int("Polyphony", configuration.dexed[selected_instance_id].polyphony, 1.0, POLYPHONY_MIN, POLYPHONY_MAX - configuration.dexed[(selected_instance_id + 1) % NUM_DEXED].polyphony, 2, false, false, false); |
|
|
|
|
#else |
|
|
|
|
lcd_display_bar_int("Polyphony", configuration.dexed[selected_instance_id].polyphony, 1.0, POLYPHONY_MIN, POLYPHONY_MAX, 2, false, false, false); |
|
|
|
|
#endif |
|
|
|
@ -3610,161 +3718,6 @@ void UI_func_eeprom_reset(uint8_t param) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void locate_previous_non_favorite() |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
//find prev. non fav in current bank
|
|
|
|
|
|
|
|
|
|
lcd.setCursor(3, 0); |
|
|
|
|
lcd.print("<SEARCHING"); |
|
|
|
|
do { |
|
|
|
|
|
|
|
|
|
if (configuration.performance.voice[selected_instance_id] == 0) |
|
|
|
|
{ |
|
|
|
|
configuration.performance.voice[selected_instance_id] = 32; //+1
|
|
|
|
|
//configuration.performance.bank[selected_instance_id]--;
|
|
|
|
|
if (configuration.performance.bank[selected_instance_id] < 1 ) configuration.performance.bank[selected_instance_id] = MAX_BANKS - 1; |
|
|
|
|
|
|
|
|
|
do { //seek for previous bank
|
|
|
|
|
configuration.performance.bank[selected_instance_id]--; |
|
|
|
|
|
|
|
|
|
if (configuration.performance.bank[selected_instance_id] < 1 ) configuration.performance.bank[selected_instance_id] = MAX_BANKS - 1; |
|
|
|
|
|
|
|
|
|
favsearcher++; |
|
|
|
|
} while (quick_check_favorites_in_bank(configuration.performance.bank[selected_instance_id], selected_instance_id) == true && favsearcher < 132); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
configuration.performance.voice[selected_instance_id]--; |
|
|
|
|
|
|
|
|
|
favsearcher++; |
|
|
|
|
|
|
|
|
|
} while ( check_favorite(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], |
|
|
|
|
selected_instance_id) == true && favsearcher < 170); |
|
|
|
|
|
|
|
|
|
favsearcher = 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void locate_previous_favorite() |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
//find previous fav in current bank
|
|
|
|
|
lcd.setCursor(3, 0); |
|
|
|
|
lcd.print("<SEARCHING"); |
|
|
|
|
|
|
|
|
|
do { |
|
|
|
|
|
|
|
|
|
if (configuration.performance.voice[selected_instance_id] == 0) |
|
|
|
|
{ |
|
|
|
|
configuration.performance.voice[selected_instance_id] = 32; //+1
|
|
|
|
|
//configuration.performance.bank[selected_instance_id]--;
|
|
|
|
|
if (configuration.performance.bank[selected_instance_id] < 1 ) configuration.performance.bank[selected_instance_id] = MAX_BANKS - 1; |
|
|
|
|
|
|
|
|
|
do { //seek for previous bank
|
|
|
|
|
configuration.performance.bank[selected_instance_id]--; |
|
|
|
|
|
|
|
|
|
if (configuration.performance.bank[selected_instance_id] < 1 ) configuration.performance.bank[selected_instance_id] = MAX_BANKS - 1; |
|
|
|
|
|
|
|
|
|
favsearcher++; |
|
|
|
|
} while (quick_check_favorites_in_bank(configuration.performance.bank[selected_instance_id], selected_instance_id) == false && favsearcher < 132); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
configuration.performance.voice[selected_instance_id]--; |
|
|
|
|
|
|
|
|
|
favsearcher++; |
|
|
|
|
|
|
|
|
|
} while ( check_favorite(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], |
|
|
|
|
selected_instance_id) == false && favsearcher < 170); |
|
|
|
|
|
|
|
|
|
favsearcher = 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void locate_next_favorite() |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
//find next fav in current bank
|
|
|
|
|
lcd.setCursor(3, 0); |
|
|
|
|
lcd.print(">SEARCHING"); |
|
|
|
|
do { |
|
|
|
|
configuration.performance.voice[selected_instance_id]++; |
|
|
|
|
|
|
|
|
|
if (configuration.performance.voice[selected_instance_id] > 31) { |
|
|
|
|
configuration.performance.voice[selected_instance_id] = 0; |
|
|
|
|
configuration.performance.bank[selected_instance_id]++; |
|
|
|
|
if (configuration.performance.bank[selected_instance_id] > MAX_BANKS - 1) configuration.performance.bank[selected_instance_id] = 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
do { //seek for next bank
|
|
|
|
|
configuration.performance.bank[selected_instance_id]++; |
|
|
|
|
|
|
|
|
|
if (configuration.performance.bank[selected_instance_id] > MAX_BANKS - 1) configuration.performance.bank[selected_instance_id] = 0; |
|
|
|
|
|
|
|
|
|
favsearcher++; |
|
|
|
|
} while (quick_check_favorites_in_bank(configuration.performance.bank[selected_instance_id], selected_instance_id) == false && favsearcher < 132); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
favsearcher++; |
|
|
|
|
|
|
|
|
|
} while ( check_favorite(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], |
|
|
|
|
selected_instance_id) == false && favsearcher < 170); |
|
|
|
|
|
|
|
|
|
favsearcher = 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void locate_next_non_favorite() |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
//find next non-fav in current bank
|
|
|
|
|
lcd.setCursor(3, 0); |
|
|
|
|
lcd.print(">SEARCHING"); |
|
|
|
|
do { |
|
|
|
|
configuration.performance.voice[selected_instance_id]++; |
|
|
|
|
|
|
|
|
|
if (configuration.performance.voice[selected_instance_id] > 31) { |
|
|
|
|
configuration.performance.voice[selected_instance_id] = 0; |
|
|
|
|
//configuration.performance.bank[selected_instance_id]++;
|
|
|
|
|
if (configuration.performance.bank[selected_instance_id] > MAX_BANKS - 1) configuration.performance.bank[selected_instance_id] = 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
do { //seek for next bank
|
|
|
|
|
configuration.performance.bank[selected_instance_id]++; |
|
|
|
|
|
|
|
|
|
if (configuration.performance.bank[selected_instance_id] > MAX_BANKS - 1) configuration.performance.bank[selected_instance_id] = 0; |
|
|
|
|
|
|
|
|
|
favsearcher++; |
|
|
|
|
} while (quick_check_favorites_in_bank(configuration.performance.bank[selected_instance_id], selected_instance_id) == true && favsearcher < 132); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
favsearcher++; |
|
|
|
|
|
|
|
|
|
} while ( check_favorite(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], |
|
|
|
|
selected_instance_id) == true && favsearcher < 170); |
|
|
|
|
|
|
|
|
|
favsearcher = 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void locate_random_non_favorite() |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
//find random non-fav
|
|
|
|
|
|
|
|
|
|
do { |
|
|
|
|
|
|
|
|
|
configuration.performance.voice[selected_instance_id] = random(32); |
|
|
|
|
configuration.performance.bank[selected_instance_id] = random(MAX_BANKS - 1); |
|
|
|
|
|
|
|
|
|
favsearcher++; |
|
|
|
|
|
|
|
|
|
} while ( check_favorite(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], |
|
|
|
|
selected_instance_id) == true && favsearcher < 100); |
|
|
|
|
|
|
|
|
|
favsearcher = 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void UI_update_instance_icons() |
|
|
|
|
{ |
|
|
|
|
lcd.setCursor(14, 0); |
|
|
|
@ -3859,9 +3812,7 @@ void UI_func_voice_select(uint8_t param) |
|
|
|
|
else //only Favs
|
|
|
|
|
if (configuration.sys.favorites == 1) |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
locate_previous_favorite(); |
|
|
|
|
|
|
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
|
change_disp_sd(false); |
|
|
|
|
#endif |
|
|
|
@ -3869,7 +3820,8 @@ void UI_func_voice_select(uint8_t param) |
|
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
|
change_disp_sd(true); |
|
|
|
|
#endif |
|
|
|
|
} else //only non-Favs
|
|
|
|
|
} |
|
|
|
|
else //only non-Favs
|
|
|
|
|
if (configuration.sys.favorites == 2) |
|
|
|
|
{ |
|
|
|
|
locate_previous_non_favorite(); |
|
|
|
@ -4039,9 +3991,7 @@ void UI_func_voice_select(uint8_t param) |
|
|
|
|
lcd.show(1, 13, 1, "]"); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
draw_favorite_icon(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], selected_instance_id); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (LCDML.FUNC_close()) // ****** STABLE END *********
|
|
|
|
@ -5721,7 +5671,8 @@ void lcd_display_bar_float(const char* title, float value, float factor, int32_t |
|
|
|
|
|
|
|
|
|
// Title
|
|
|
|
|
if (init == true) |
|
|
|
|
lcd.show(0, 0, LCD_cols - 3, title); |
|
|
|
|
lcd.show(0, 0, LCD_cols - 2, title); |
|
|
|
|
//lcd.show(0, 0, LCD_cols - 3, title);
|
|
|
|
|
|
|
|
|
|
// Value
|
|
|
|
|
lcd.setCursor(LCD_cols - size, 1); |
|
|
|
@ -5978,8 +5929,131 @@ void string_trim(char *s) |
|
|
|
|
s[i + 1] = '\0'; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bool check_favorite(uint8_t b, uint8_t v, uint8_t instance_id) |
|
|
|
|
void locate_previous_non_favorite() |
|
|
|
|
{ |
|
|
|
|
//find prev. non fav in current bank
|
|
|
|
|
lcd.setCursor(3, 0); |
|
|
|
|
lcd.print("<SEARCHING"); |
|
|
|
|
do |
|
|
|
|
{ |
|
|
|
|
if (configuration.performance.voice[selected_instance_id] == 0) |
|
|
|
|
{ |
|
|
|
|
configuration.performance.voice[selected_instance_id] = 32; //+1
|
|
|
|
|
//configuration.performance.bank[selected_instance_id]--;
|
|
|
|
|
if (configuration.performance.bank[selected_instance_id] < 1 ) |
|
|
|
|
configuration.performance.bank[selected_instance_id] = MAX_BANKS - 1; |
|
|
|
|
|
|
|
|
|
do |
|
|
|
|
{ //seek for previous bank
|
|
|
|
|
configuration.performance.bank[selected_instance_id]--; |
|
|
|
|
if (configuration.performance.bank[selected_instance_id] < 1 ) |
|
|
|
|
configuration.performance.bank[selected_instance_id] = MAX_BANKS - 1; |
|
|
|
|
favsearcher++; |
|
|
|
|
} while (quick_check_favorites_in_bank(configuration.performance.bank[selected_instance_id], selected_instance_id) == true && favsearcher < 132); |
|
|
|
|
} |
|
|
|
|
configuration.performance.voice[selected_instance_id]--; |
|
|
|
|
favsearcher++; |
|
|
|
|
} while (check_favorite(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], |
|
|
|
|
selected_instance_id) == true && favsearcher < 170); |
|
|
|
|
favsearcher = 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void locate_previous_favorite() |
|
|
|
|
{ |
|
|
|
|
//find previous fav in current bank
|
|
|
|
|
lcd.setCursor(3, 0); |
|
|
|
|
lcd.print("<SEARCHING"); |
|
|
|
|
|
|
|
|
|
do { |
|
|
|
|
if (configuration.performance.voice[selected_instance_id] == 0) |
|
|
|
|
{ |
|
|
|
|
configuration.performance.voice[selected_instance_id] = 32; //+1
|
|
|
|
|
//configuration.performance.bank[selected_instance_id]--;
|
|
|
|
|
if (configuration.performance.bank[selected_instance_id] < 1 ) |
|
|
|
|
configuration.performance.bank[selected_instance_id] = MAX_BANKS - 1; |
|
|
|
|
|
|
|
|
|
do { //seek for previous bank
|
|
|
|
|
configuration.performance.bank[selected_instance_id]--; |
|
|
|
|
if (configuration.performance.bank[selected_instance_id] < 1 ) |
|
|
|
|
configuration.performance.bank[selected_instance_id] = MAX_BANKS - 1; |
|
|
|
|
favsearcher++; |
|
|
|
|
} while (quick_check_favorites_in_bank(configuration.performance.bank[selected_instance_id], selected_instance_id) == false && favsearcher < 132); |
|
|
|
|
} |
|
|
|
|
configuration.performance.voice[selected_instance_id]--; |
|
|
|
|
favsearcher++; |
|
|
|
|
} while ( check_favorite(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], |
|
|
|
|
selected_instance_id) == false && favsearcher < 170); |
|
|
|
|
favsearcher = 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void locate_next_favorite() |
|
|
|
|
{ |
|
|
|
|
//find next fav in current bank
|
|
|
|
|
lcd.setCursor(3, 0); |
|
|
|
|
lcd.print(">SEARCHING"); |
|
|
|
|
do { |
|
|
|
|
configuration.performance.voice[selected_instance_id]++; |
|
|
|
|
|
|
|
|
|
if (configuration.performance.voice[selected_instance_id] > 31) { |
|
|
|
|
configuration.performance.voice[selected_instance_id] = 0; |
|
|
|
|
configuration.performance.bank[selected_instance_id]++; |
|
|
|
|
if (configuration.performance.bank[selected_instance_id] > MAX_BANKS - 1) |
|
|
|
|
configuration.performance.bank[selected_instance_id] = 0; |
|
|
|
|
|
|
|
|
|
do { //seek for next bank
|
|
|
|
|
configuration.performance.bank[selected_instance_id]++; |
|
|
|
|
|
|
|
|
|
if (configuration.performance.bank[selected_instance_id] > MAX_BANKS - 1) |
|
|
|
|
configuration.performance.bank[selected_instance_id] = 0; |
|
|
|
|
favsearcher++; |
|
|
|
|
} while (quick_check_favorites_in_bank(configuration.performance.bank[selected_instance_id], selected_instance_id) == false && favsearcher < 132); |
|
|
|
|
} |
|
|
|
|
favsearcher++; |
|
|
|
|
} while ( check_favorite(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], |
|
|
|
|
selected_instance_id) == false && favsearcher < 170); |
|
|
|
|
favsearcher = 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void locate_next_non_favorite() |
|
|
|
|
{ |
|
|
|
|
//find next non-fav in current bank
|
|
|
|
|
lcd.setCursor(3, 0); |
|
|
|
|
lcd.print(">SEARCHING"); |
|
|
|
|
do { |
|
|
|
|
configuration.performance.voice[selected_instance_id]++; |
|
|
|
|
|
|
|
|
|
if (configuration.performance.voice[selected_instance_id] > 31) { |
|
|
|
|
configuration.performance.voice[selected_instance_id] = 0; |
|
|
|
|
//configuration.performance.bank[selected_instance_id]++;
|
|
|
|
|
if (configuration.performance.bank[selected_instance_id] > MAX_BANKS - 1) |
|
|
|
|
configuration.performance.bank[selected_instance_id] = 0; |
|
|
|
|
do { //seek for next bank
|
|
|
|
|
configuration.performance.bank[selected_instance_id]++; |
|
|
|
|
if (configuration.performance.bank[selected_instance_id] > MAX_BANKS - 1) |
|
|
|
|
configuration.performance.bank[selected_instance_id] = 0; |
|
|
|
|
favsearcher++; |
|
|
|
|
} while (quick_check_favorites_in_bank(configuration.performance.bank[selected_instance_id], selected_instance_id) == true && favsearcher < 132); |
|
|
|
|
} |
|
|
|
|
favsearcher++; |
|
|
|
|
} while ( check_favorite(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], |
|
|
|
|
selected_instance_id) == true && favsearcher < 170); |
|
|
|
|
favsearcher = 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void locate_random_non_favorite() |
|
|
|
|
{ |
|
|
|
|
//find random non-fav
|
|
|
|
|
do |
|
|
|
|
{ |
|
|
|
|
configuration.performance.voice[selected_instance_id] = random(32); |
|
|
|
|
configuration.performance.bank[selected_instance_id] = random(MAX_BANKS - 1); |
|
|
|
|
favsearcher++; |
|
|
|
|
} while ( check_favorite(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], |
|
|
|
|
selected_instance_id) == true && favsearcher < 100); |
|
|
|
|
favsearcher = 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bool check_favorite(uint8_t b, uint8_t v, uint8_t instance_id) |
|
|
|
|
{ |
|
|
|
|
b = constrain(b, 0, MAX_BANKS - 1); |
|
|
|
|
v = constrain(v, 0, MAX_VOICES - 1); |
|
|
|
@ -6003,9 +6077,7 @@ bool check_favorite(uint8_t b, uint8_t v, uint8_t instance_id) |
|
|
|
|
#endif |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
|
|
{ // it was not a favorite
|
|
|
|
|
|
|
|
|
|
#ifdef DEBUG |
|
|
|
@ -6013,9 +6085,9 @@ bool check_favorite(uint8_t b, uint8_t v, uint8_t instance_id) |
|
|
|
|
#endif |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} else return false; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void draw_favorite_icon(uint8_t b, uint8_t v, uint8_t instance_id) |
|
|
|
@ -6031,12 +6103,12 @@ void draw_favorite_icon(uint8_t b, uint8_t v, uint8_t instance_id) |
|
|
|
|
|
|
|
|
|
if (SD.exists(tmp)) |
|
|
|
|
{ //is Favorite
|
|
|
|
|
lcd.setCursor(12, 0); |
|
|
|
|
lcd.setCursor(13, 0); |
|
|
|
|
lcd.write(2); //fav symbol
|
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ // it was not a favorite
|
|
|
|
|
lcd.setCursor(12, 0); |
|
|
|
|
lcd.setCursor(13, 0); |
|
|
|
|
lcd.print(" "); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -6070,7 +6142,9 @@ bool quick_check_favorites_in_bank(uint8_t b, uint8_t instance_id) |
|
|
|
|
Serial.println(" - It is no Favorite in current Bank."); |
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
} else return false; |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void save_favorite(uint8_t b, uint8_t v, uint8_t instance_id) |
|
|
|
@ -6144,3 +6218,4 @@ void save_favorite(uint8_t b, uint8_t v, uint8_t instance_id) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#endif |
|
|
|
|
#endif |
|
|
|
|