|
|
@ -116,18 +116,13 @@ void AudioEffectModulatedDelay::update(void) |
|
|
|
|
|
|
|
|
|
|
|
#ifdef INTERPOLATE |
|
|
|
#ifdef INTERPOLATE |
|
|
|
// get x/y values around mod_idx
|
|
|
|
// get x/y values around mod_idx
|
|
|
|
uint16_t i_mod_idx = int(mod_idx + 0.5); |
|
|
|
|
|
|
|
uint8_t c = 0; |
|
|
|
uint8_t c = 0; |
|
|
|
for (j = INTERPOLATION_WINDOW_SIZE / -2; j <= INTERPOLATION_WINDOW_SIZE / 2; j++) |
|
|
|
for (j = INTERPOLATION_WINDOW_SIZE / -2; j <= INTERPOLATION_WINDOW_SIZE / 2; j++) |
|
|
|
{ |
|
|
|
{ |
|
|
|
int16_t ji_mod_idx = i_mod_idx + j; |
|
|
|
y[c] = float(_delayline[(int(mod_idx + 0.5) + _circ_idx + j) % _delay_length]); |
|
|
|
if (ji_mod_idx > _delay_length) |
|
|
|
if (y[c] < 0) |
|
|
|
y[c] = float(_delayline[ji_mod_idx - _delay_length - 1]); |
|
|
|
y[c] = _delay_length + y[c]; |
|
|
|
else if (ji_mod_idx < 0) |
|
|
|
c++; // because 42 is the answer! ;-)
|
|
|
|
y[c] = float(_delayline[_delay_length + j + 1]); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
y[c] = float(_delayline[ji_mod_idx]); |
|
|
|
|
|
|
|
c++; // ;-)
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
modulation_interpolate.valueI(mod_idx); |
|
|
|
modulation_interpolate.valueI(mod_idx); |
|
|
|