From 16411e79cb37d866de735dd06f7f1eb725de585a Mon Sep 17 00:00:00 2001 From: Holger Wirtz Date: Thu, 6 Jun 2019 09:40:39 +0200 Subject: [PATCH] Showing volume menu fixed. --- UI.hpp | 4 ++-- config.h | 2 +- effect_modulated_delay.cpp | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/UI.hpp b/UI.hpp index 31dfbd2..466ed6f 100644 --- a/UI.hpp +++ b/UI.hpp @@ -37,7 +37,7 @@ const uint8_t MAX_SCREENS = 2; ///< @note Default: 14 /// Configures the number of available menus per menus system. - const uint8_t MAX_MENUS = 42; ///< @note Default: 8 + const uint8_t MAX_MENUS = 43; ///< @note Default: 8 */ @@ -55,7 +55,7 @@ int32_t encoder_value[NUM_ENCODER]; Bounce but[NUM_ENCODER] = {Bounce(BUT_L_PIN, BUT_DEBOUNCE_MS), Bounce(BUT_R_PIN, BUT_DEBOUNCE_MS)}; elapsedMillis back_to_main; -#define NUM_MENUS 42 +#define NUM_MENUS 43 #define MAIN 0 /*************************************/ diff --git a/config.h b/config.h index cfb040e..a0714b1 100644 --- a/config.h +++ b/config.h @@ -61,7 +61,7 @@ #define REDUCE_LOUDNESS 0 #define USE_XFADE_DATA 1 // CHORUS parameters -#define INTERPOLATION_WINDOW_SIZE 7 // For chorus, only odd numbers,please! +#define INTERPOLATION_WINDOW_SIZE 7 // use only odd numbers!!! #define INTERPOLATE QUADRATIC // LINEAR QUADRATIC COSINE CUBIC LAGRANGE #define CHORUS_WAVEFORM WAVEFORM_SINE // WAVEFORM_SINE WAVEFORM_SAWTOOTH WAVEFORM_SAWTOOTH_REVERSE WAVEFORM_SQUARE WAVEFORM_TRIANGLE #define CHORUS_DELAY_LENGTH (16*AUDIO_BLOCK_SAMPLES) diff --git a/effect_modulated_delay.cpp b/effect_modulated_delay.cpp index 32769b4..262d2fd 100644 --- a/effect_modulated_delay.cpp +++ b/effect_modulated_delay.cpp @@ -105,7 +105,7 @@ void AudioEffectModulatedDelay::update(void) _delayline[_circ_idx] = *bp; // calculate modulation index - mod_idx = float(*mp) / SHRT_MAX * _delay_length_half; // calculate index with modulation as a float(!!!) + mod_idx = float(*mp) / SHRT_MAX * _delay_length_half; // calculate an index with modulation as a float(!!!) #ifdef INTERPOLATE // get x/y values around mod_idx @@ -124,16 +124,16 @@ void AudioEffectModulatedDelay::update(void) modulation_interpolate.valueI(mod_idx - int(mod_idx + 0.5)); -#if INTERPOLATE == CUBIC - *bp = int(modulation_interpolate.CubicInterpolate() + 0.5); -#elif INTERPOLATE == LINEAR +#if INTERPOLATE == LINEAR *bp = int(modulation_interpolate.LinearInterpolate() + 0.5); +#elif INTERPOLATE == QUDRATIC + *bp = int(modulation_interpolate.QuadraticInterpolate() + 0.5); #elif INTERPOLATE == COSINE *bp = int(modulation_interpolate.CosineInterpolate() + 0.5); +#elif INTERPOLATE == CUBIC + *bp = int(modulation_interpolate.CubicInterpolate() + 0.5); #elif INTERPOLATE == LAGRANGE *bp = int(modulation_interpolate.LagrangeInterpolate() + 0.5); -#elif INTERPOLATE == QUDRATIC - *bp = int(modulation_interpolate.QuadraticInterpolate() + 0.5); #else // No interpolation - should sound really bad... int16_t c_mod_idx = int(mod_idx + 0.5) + _circ_idx;