Ove Karlsen lowpass from the music-dsp archive.
http://www.esnips.com/doc/bd44d12d-313d-4c05-aae0-fce8f751f5bc/Karlsen-filter
skol







Moderators: electrogear, exonerate
Eska wrote:Ove Karlsen lowpass from the music-dsp archive.
http://www.esnips.com/doc/bd44d12d-313d-4c05-aae0-fce8f751f5bc/Karlsen-filter
skol
streamin in;
streamin cutoff;
streamin q;
streamin cor;
streamin f;
streamin track;
streamout out;
float resoclip,buf1,buf2,buf3,buf4,cut,res;
//cor=2*(PI)3.14159265358979*10000/sr;
cut=max ((f*track+cutoff)*cor,0);
cut=min (cut,0.7);
res=3*q;
resoclip = buf4;
resoclip = min(resoclip,1);
resoclip = max(resoclip,-1);
in = in - (resoclip * res);
buf1 = ((in - buf1) * cut) + buf1;
buf2 = ((buf1 - buf2) * cut) + buf2;
buf3 = ((buf2 - buf3) * cut) + buf3;
buf4 = ((buf3 - buf4) * cut) + buf4;
resoclip = buf4;
resoclip = min(resoclip,1);
resoclip = max(resoclip,-1);
in = in - (resoclip * res);
buf1 = ((in - buf1) * cut) + buf1;
buf2 = ((buf1 - buf2) * cut) + buf2;
buf3 = ((buf2 - buf3) * cut) + buf3;
buf4 = ((buf3 - buf4) * cut) + buf4;
out = buf4;
Hmmm. I thought oversampling took two calculations & averaged the 2? This code re-uses the old variables (buf1-4), keeping their old values, so it looks like cascading to me. Maybe I don't understand oversampling.rl wrote:Guess it's ment to be 2x oversampling.

infuzion wrote:Hmmm. I thought oversampling took two calculations & averaged the 2? This code re-uses the old variables (buf1-4), keeping their old values, so it looks like cascading to me. Maybe I don't understand oversampling.rl wrote:Guess it's ment to be 2x oversampling.
That is a cool idea!exonerate wrote:I'm going to have a play with it now, most likely I'll change it so the filter is set out like the state variable (using pitch to freq ect..) so that it can just be dropped inside the SV filter.

That's handy, thanks! Had to install the .9 beta though to open it.exonerate wrote:ok here is my state variable compatible version![]()
http://www.box.net/shared/xh9oa42976
...
---edit--- forgot to mention i turned the resonance down slightly, 'q' was multipied by 3, i just changed that to 2.5, i think it sounds a bit better.
rez = 1.0 - resonance;res=.3*q;
That's handy, thanks! Had to install the .9 beta though to open it.
Users browsing this forum: Google [Bot] and 1 guest