 |
Moog VCF, variation 2
Type : 24db resonant lowpass References : CSound source code, Stilson/Smith CCRMA paper., Timo Tossavainen (?) version
Notes : in[x] and out[x] are member variables, init to 0.0 the controls:
fc = cutoff, nearly linear [0,1] -> [0, fs/2]
res = resonance [0, 4] -> [no resonance, self-oscillation]
Code : Tdouble MoogVCF::run(double input, double fc, double res)
{
double f = fc * 1.16;
double fb = res * (1.0 - 0.15 * f * f);
input -= out4 * fb;
input *= 0.35013 * (f*f)*(f*f);
out1 = input + 0.3 * in1 + (1 - f) * out1; // Pole 1
in1 = input;
out2 = out1 + 0.3 * in2 + (1 - f) * out2; // Pole 2
in2 = out1;
out3 = out2 + 0.3 * in3 + (1 - f) * out3; // Pole 3
in3 = out2;
out4 = out3 + 0.3 * in4 + (1 - f) * out4; // Pole 4
in4 = out3;
return out4;
} |
Comments
Added on : 29/03/03 by askywhale[ AT ]yahoo[ DOT ]fr Comment : This one works pretty well, thanks !
Added on : 08/11/03 by rdupres[AT]hotmail[ DOT ]com Comment : could somebody explain, what means this
input -= out4 * fb;
input *= 0.35013 * (f*f)*(f*f);
is "input-" and "input *" the name of an variable ??
or is this an Csound specific parameter ??
I want to translate this piece to Assemblercode
Robert Dupres
Added on : 11/11/03 by johanc[ AT ]popbandetleif[ DOT ]cjb[ DOT ]net Comment : input is name of a variable with type double.
input -= out4 * fb;
is just a shorter way for writing:
input = input - out4 * fb;
and the *= operator is works similar:
input *= 0.35013 * (f*f)*(f*f);
is equal to
input = input * 0.35013 * (f*f)*(f*f);
/ Johan
Added on : 12/07/04 by dfl[ AT ]ccrma[ DOT ]stanford[ DOT ]edu Comment : I've found this filter is unstable at low frequencies, namely when changing quickly from high to low frequencies...
Added on : 17/07/04 by williamk[ AT ]wusik[ DOT ]com Comment : I'm trying to double-sample this filter, like the Variable-State one. But so far no success, any tips?
Wk
Added on : 25/08/04 by mail[ AT ]mutagene[ DOT ]net Comment : What do you mean no success? What happens? Have you tried doing the usual oversampling tricks (sinc/hermite/mix-with-zeros-and-filter), call the moogVCF twice (with fc = fc*0.5) and then filter and decimate afterwards?
I'm been trying to find a good waveshaper to put in the feedback path but haven't found a good sounding stable one yet. I had one version of the filter that tracked the envelope of out4 and used it to control the degree to which values below some threshold (say 0.08) would get squashed towards zero. That sounded ok (actually quite good for very high inputs), but wasn't entirely stable and was glitching for low frequencies. Then I tried a *out4 = (1+d)* (*out4)/(1 + d* (*out4)) waveshaper, but that just aliased horribly and made the filter sound mushy and noisy.
Plain old polynomial (x = x-x*x*x) saturation sounds dull. There must be something better out there, though... and I'd much prefer not to have to oversample to get it, though I guess that might be unavoidable.
Added on : 30/01/06 by seezeIf[ AT ]gmail[ DOT ]com Comment : Excuse me but just a basic question from a young
developper
in line " input -= out4 * fb; "
i don't understand when and how "out4" is initialised
is it the "out4" return by the previous execution?
which initialisation for the first execution?
Added on : 31/01/06 by musicdsp[ AT ][remove this]dsparsons[ DOT ]co[ DOT ]uk Comment : all the outs should be initialised to zero, so first time around, nothing is subtracted. However, thereafter, the previous output is multiplied and subtracted from the input.
HTH
Added on : 10/11/09 by bardiclug[ AT ]gmail[ DOT ]com Comment : YAND (Yet Another Newbie Developer) here -
This filter sounds good, and with the addition of a 2nd harmonic waveshaper in the feedback loop, it sounds VERY good.
I was hoping I could make it into a HP filter through the normal return in-out4 - but that strategy doesn't work for this method. I'm afraid I'm at a loss as to what to try next - anyone have a suggestion?
--Coz
Added on : 08/01/10 by http://www[ DOT ]myspace[ DOT ]com/paradoxuncreated Comment : You have to subract each filter, from the input in the cascade.
Check also the Karlsen filters, which I made a few years ago, when going through this stage in DSP.
Added on : 02/03/12 by dev[ AT ]null[ DOT ]com Comment : The best sounding LP i've found here. Any suggestions how to extract HP/BP?
in - out4 doesn't work, as stated above, but "You have to subtract each filter, fron the input in the cascade", what does this mean?
in - out4 - out3 - out2 - out1 doesn't work either
|
Add your own comment
Comments are displayed in fixed width, no HTML code allowed! |
|
|
 |
|