|
|
|
@ -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; |
|
|
|
|