From 993aef2a4c05b7f94e1b8f5cfc7512fd12b3673e Mon Sep 17 00:00:00 2001 From: positionhigh Date: Tue, 20 Jul 2021 19:43:24 +0200 Subject: [PATCH 1/2] =?UTF-8?q?Dateien=20hochladen=20nach=20=E2=80=9E?= =?UTF-8?q?=E2=80=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix for several special cases where fav-search did nothing --- UI.hpp | 103 ++++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 80 insertions(+), 23 deletions(-) diff --git a/UI.hpp b/UI.hpp index 85b8cb6..7a32daf 100644 --- a/UI.hpp +++ b/UI.hpp @@ -30,7 +30,6 @@ #include "disp_plus.h" #include "effect_modulated_delay.h" #include "effect_stereo_mono.h" -#include "mixer8.h" #ifdef USE_PLATEREVERB #include "effect_platervbstereo.h" #else @@ -85,8 +84,8 @@ extern AudioEffectMonoStereo* mono2stereo[NUM_DEXED]; extern AudioMixer4 microdexed_peak_mixer; extern AudioAnalyzePeak microdexed_peak; #if defined(USE_FX) -extern AudioMixer8 reverb_mixer_r; -extern AudioMixer8 reverb_mixer_l; +extern AudioMixer4 reverb_mixer_r; +extern AudioMixer4 reverb_mixer_l; #ifdef USE_PLATEREVERB extern AudioEffectPlateReverb reverb; #else @@ -6113,7 +6112,6 @@ void locate_previous_non_favorite() 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; @@ -6141,20 +6139,38 @@ void locate_previous_favorite() { configuration.performance.bank[selected_instance_id] = MAX_BANKS - 1; configuration.performance.voice[selected_instance_id] = 32; - } + } else + + if (configuration.performance.voice[selected_instance_id] == 0 && configuration.performance.bank[selected_instance_id] < MAX_BANKS - 1 ) + { //if at begin of any other bank + configuration.performance.bank[selected_instance_id]--; + configuration.performance.voice[selected_instance_id] = 32; - if (configuration.performance.voice[selected_instance_id] >= 1 && configuration.performance.bank[selected_instance_id] >= 0) { + } + + if (configuration.performance.voice[selected_instance_id] >= 0 && configuration.performance.bank[selected_instance_id] >= 0) { lcd.setCursor(3, 0); lcd.print("= 1 && favsearcher < 18); + selected_instance_id) == false && configuration.performance.voice[selected_instance_id] >= 1 && favsearcher < 36); // if found, we are done. else quick check in previous banks @@ -6182,31 +6198,72 @@ void locate_previous_favorite() } 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) { + bool RollOver = false; + if (configuration.performance.voice[selected_instance_id] > 30 && configuration.performance.bank[selected_instance_id] >= MAX_BANKS - 1 ) + { //if at end of all banks + configuration.performance.bank[selected_instance_id] = 0; + configuration.performance.voice[selected_instance_id] = 0; + RollOver = true; + + } else if (configuration.performance.voice[selected_instance_id] > 30 && configuration.performance.bank[selected_instance_id] < MAX_BANKS - 1 ) + { //if at end of any other bank + configuration.performance.bank[selected_instance_id]++; + configuration.performance.voice[selected_instance_id] = 0; + } + + if (configuration.performance.voice[selected_instance_id] <= 30 && configuration.performance.bank[selected_instance_id] <= MAX_BANKS ) { + + lcd.setCursor(3, 0); + lcd.print(">SEARCHING"); + + do { //first find next fav in current bank + + if (RollOver == false) configuration.performance.voice[selected_instance_id]++; else RollOver = true; + favsearcher++; + + } while ( check_favorite(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], + selected_instance_id) == false && configuration.performance.voice[selected_instance_id] <= 32 && favsearcher < 36); + + // 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], + selected_instance_id) == false && + configuration.performance.bank[selected_instance_id] < MAX_BANKS && favsearcher < 170) + { 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 + do { //seek in next bank + configuration.performance.bank[selected_instance_id]++; - if (configuration.performance.bank[selected_instance_id] > MAX_BANKS - 1) + if ( configuration.performance.bank[selected_instance_id] > MAX_BANKS - 1 && favsearcher < 190) + { configuration.performance.bank[selected_instance_id] = 0; + configuration.performance.voice[selected_instance_id] = 0; + } + favsearcher++; - } while (quick_check_favorites_in_bank(configuration.performance.bank[selected_instance_id], selected_instance_id) == false && favsearcher < 132); + } while (quick_check_favorites_in_bank(configuration.performance.bank[selected_instance_id], selected_instance_id) == false && + favsearcher < 132 ); + + if ( check_favorite(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], + selected_instance_id) == false && configuration.performance.voice[selected_instance_id] <= 32 && favsearcher < 190) + { + do { //last bank to search if a fav can be found + + 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++; - } 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() From 42a25afd15b007def20b12b782808e4fcf5c5e1a Mon Sep 17 00:00:00 2001 From: positionhigh Date: Tue, 20 Jul 2021 19:49:55 +0200 Subject: [PATCH 2/2] =?UTF-8?q?Dateien=20hochladen=20nach=20=E2=80=9E?= =?UTF-8?q?=E2=80=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- UI.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/UI.hpp b/UI.hpp index 7a32daf..fb0a300 100644 --- a/UI.hpp +++ b/UI.hpp @@ -30,6 +30,7 @@ #include "disp_plus.h" #include "effect_modulated_delay.h" #include "effect_stereo_mono.h" +#include "mixer8.h" #ifdef USE_PLATEREVERB #include "effect_platervbstereo.h" #else @@ -84,8 +85,8 @@ extern AudioEffectMonoStereo* mono2stereo[NUM_DEXED]; extern AudioMixer4 microdexed_peak_mixer; extern AudioAnalyzePeak microdexed_peak; #if defined(USE_FX) -extern AudioMixer4 reverb_mixer_r; -extern AudioMixer4 reverb_mixer_l; +extern AudioMixer8 reverb_mixer_r; +extern AudioMixer8 reverb_mixer_l; #ifdef USE_PLATEREVERB extern AudioEffectPlateReverb reverb; #else