@ -102,7 +102,7 @@ void AudioEffectModulatedDelay::update(void)
// Generate a an array with the size of INTERPOLATION_WINDOW_SIZE of x/y values around mod_idx for interpolation
// Generate a an array with the size of INTERPOLATION_WINDOW_SIZE of x/y values around mod_idx for interpolation
uint8_t c = 0 ;
uint8_t c = 0 ;
int16_t c_mod_idx = _circ_idx - int ( mod_idx + 0.5 ) ; // This is the pointer to the value in the circular buffer at the current modulation index
int16_t c_mod_idx = _circ_idx - int ( mod_idx + 0.5 ) ; // This is the pointer to the value in the circular buffer at the current modulation index
for ( j = INTERPOLATION_WINDOW_SIZE / - 2 ; j < = INTERPOLATION_WINDOW_SIZE / 2 ; j + + )
for ( j = ~ ( INTERPOLATION_WINDOW_SIZE > > 1 ) | 0x01 ; j < = INTERPOLATION_WINDOW_SIZE > > 1 ; j + + ) // only another way to say: from -INTERPOLATION_WINDOW_SIZE/2 to INTERPOLATION_WINDOW_SIZE/2
{
{
int16_t jc_mod_idx = ( c_mod_idx + j ) % _delay_length ; // The modulation index pointer plus the value of the current window pointer
int16_t jc_mod_idx = ( c_mod_idx + j ) % _delay_length ; // The modulation index pointer plus the value of the current window pointer
if ( jc_mod_idx < 0 )
if ( jc_mod_idx < 0 )
@ -120,15 +120,15 @@ void AudioEffectModulatedDelay::update(void)
* bp = _delayline [ _delay_length + c_mod_idx ] ;
* bp = _delayline [ _delay_length + c_mod_idx ] ;
else
else
* bp = _delayline [ c_mod_idx ] ;
* bp = _delayline [ c_mod_idx ] ;
/* Serial.print("mod_idx=");
/* Serial.print("mod_idx=");
Serial . print ( mod_idx , 3 ) ;
Serial . print ( mod_idx , 3 ) ;
Serial . print ( " c_mod_idx= " ) ;
Serial . print ( " c_mod_idx= " ) ;
Serial . print ( c_mod_idx , DEC ) ;
Serial . print ( c_mod_idx , DEC ) ;
Serial . print ( " MODULATION= " ) ;
Serial . print ( " MODULATION= " ) ;
Serial . print ( * mp , DEC ) ;
Serial . print ( * mp , DEC ) ;
Serial . print ( " DATA= " ) ;
Serial . print ( " DATA= " ) ;
Serial . print ( * bp , DEC ) ;
Serial . print ( * bp , DEC ) ;
Serial . println ( ) ; */
Serial . println ( ) ; */
# endif
# endif
bp + + ; // next audio data
bp + + ; // next audio data