Showing volume menu fixed.

dev
Holger Wirtz 6 years ago
parent ad604d900e
commit 16411e79cb
  1. 4
      UI.hpp
  2. 2
      config.h
  3. 12
      effect_modulated_delay.cpp

@ -37,7 +37,7 @@
const uint8_t MAX_SCREENS = 2; ///< @note Default: 14 const uint8_t MAX_SCREENS = 2; ///< @note Default: 14
/// Configures the number of available menus per menus system. /// 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)}; Bounce but[NUM_ENCODER] = {Bounce(BUT_L_PIN, BUT_DEBOUNCE_MS), Bounce(BUT_R_PIN, BUT_DEBOUNCE_MS)};
elapsedMillis back_to_main; elapsedMillis back_to_main;
#define NUM_MENUS 42 #define NUM_MENUS 43
#define MAIN 0 #define MAIN 0
/*************************************/ /*************************************/

@ -61,7 +61,7 @@
#define REDUCE_LOUDNESS 0 #define REDUCE_LOUDNESS 0
#define USE_XFADE_DATA 1 #define USE_XFADE_DATA 1
// CHORUS parameters // 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 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_WAVEFORM WAVEFORM_SINE // WAVEFORM_SINE WAVEFORM_SAWTOOTH WAVEFORM_SAWTOOTH_REVERSE WAVEFORM_SQUARE WAVEFORM_TRIANGLE
#define CHORUS_DELAY_LENGTH (16*AUDIO_BLOCK_SAMPLES) #define CHORUS_DELAY_LENGTH (16*AUDIO_BLOCK_SAMPLES)

@ -105,7 +105,7 @@ void AudioEffectModulatedDelay::update(void)
_delayline[_circ_idx] = *bp; _delayline[_circ_idx] = *bp;
// calculate modulation index // 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 #ifdef INTERPOLATE
// get x/y values around mod_idx // 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)); modulation_interpolate.valueI(mod_idx - int(mod_idx + 0.5));
#if INTERPOLATE == CUBIC #if INTERPOLATE == LINEAR
*bp = int(modulation_interpolate.CubicInterpolate() + 0.5);
#elif INTERPOLATE == LINEAR
*bp = int(modulation_interpolate.LinearInterpolate() + 0.5); *bp = int(modulation_interpolate.LinearInterpolate() + 0.5);
#elif INTERPOLATE == QUDRATIC
*bp = int(modulation_interpolate.QuadraticInterpolate() + 0.5);
#elif INTERPOLATE == COSINE #elif INTERPOLATE == COSINE
*bp = int(modulation_interpolate.CosineInterpolate() + 0.5); *bp = int(modulation_interpolate.CosineInterpolate() + 0.5);
#elif INTERPOLATE == CUBIC
*bp = int(modulation_interpolate.CubicInterpolate() + 0.5);
#elif INTERPOLATE == LAGRANGE #elif INTERPOLATE == LAGRANGE
*bp = int(modulation_interpolate.LagrangeInterpolate() + 0.5); *bp = int(modulation_interpolate.LagrangeInterpolate() + 0.5);
#elif INTERPOLATE == QUDRATIC
*bp = int(modulation_interpolate.QuadraticInterpolate() + 0.5);
#else #else
// No interpolation - should sound really bad... // No interpolation - should sound really bad...
int16_t c_mod_idx = int(mod_idx + 0.5) + _circ_idx; int16_t c_mod_idx = int(mod_idx + 0.5) + _circ_idx;

Loading…
Cancel
Save