[Stk] Chorus Unit Using STK library

Rich M rmarsch at bu.edu
Mon Apr 6 23:57:43 PDT 2009


Hi,

I previously wrote asking about bandlimited interpolation and how 
exactly I could implement it. I'd like to thank Perry Cook for helping 
me out in that regards. I have implemented and tested working 
bandlimited interpolation now.

My question here is not conceptual like the bandlimited interpolation, 
but much more strictly regarding the STK and Real-Time libraries. I have 
implemented both bandlimited and linear interpolation with a program 
that has two types of modulating effects.

I have a Multi-staged Chorus and a Flanger effect that I have created. I 
am currently testing the Flanger effect and notice that, during 
Real-Time output, the sound will be damaged by clicks and other random 
noise that occurs during playback. This only happens when the Real-Time 
output is running through the Flanger effect and not when the Real-Time 
output is simply playing back the input file I am using.

What is the cause of such clicks and distortions, and how can I begin to 
alleviate these artifacts from my processed sound?

The general formula I am using for my Flanger effect is to dynamically 
modulate the delay time I am using. Each output sample is created by 
this equation:

    out(x) = in(x) + decay * delay(x - varied_delay);

and each new delay write is:

    delay(x) = out(x) = in(x) + delay(x - varied_delay);

Some other helpful information. I restrict the modulation of the 
varied_delay to be no more than 99% and it is centered around 1. So for 
example, using sine wave modulation, the first value to modulate the 
varied_delay by is 1. The value of the modulation factor never reaches 2 
or 0 since the depth only reaches 99% in worst-case.

The decay value, which is what I'm calling the attenuation of the signal 
coming out of the delay filter, is restricted to no more than .99 (and 
I've only tested as high as .70). The gain into the out(x) from the 
summation of the input signal and delay signal is unity.

Also, the delay is obviously not included in output until enough samples 
have been read for the delay line to actually need to start.

Thanks,
Rich



More information about the Stk mailing list