SynthMaker

Karlsen Filter

Archive · 2007 20 old posts

From the original SynthMaker forum (2004–2014), with its members’ names and dates.

Eska ·

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

skol

TomC ·

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

skol

"The requested resource (/doc/bd44d12d-313d-4c05-aae0-fce8f751f5bc/Karlsen-filter) is not available."

Tom

Eska ·

Mhh..No problem here (with firefox2).

sunsynth ·

Thanks 4 sharing Eska...

btw: DL works with IE but not with my Opera...

SUNsynth

TomC ·

sunsynth wrote: Thanks 4 sharing Eska...

btw: DL works with IE but not with my Opera...

SUNsynth

Works here now, too.

Tom

infuzion ·

Nifty! What is the advantage of using this filter compared to others? Boosting the Res high seems to make the filter fold over itself.

BTW, SM will round off "2*(PI)3.14159265358979*10000" to 62831.9 Helps with the Res folding slightly, so there you have it.

edit: looking at your Code, I see this: 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; Is the second section a way to cascade filters, or did you accidentally copy & pasted twice?

rl ·

Guess it's ment to be 2x oversampling.

Eska ·

Thx RL. I think it`s oversampling. Sounds nice for the load anyway.

infuzion ·

rl wrote: Guess it's ment to be 2x oversampling.

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.

Eska ·

For shure it is me.🙂 Thank you for explanation.

exonerate ·

infuzion wrote: rl wrote: Guess it's ment to be 2x oversampling.

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.

yeah it's cascaded, i though it was oversampling at first but it's not.

If you comment out the second part, you can clearly hear it has less steep a cutoff.

The track knob on this doesn't seem to 'track' at all in fact i need to have that at zero for the cutoff knob to even work. 😕

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.

cheers 😉

Exo

infuzion ·

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 is a cool idea! TIA

exonerate ·

ok here is my state variable compatible version 🙂

http://www.box.net/shared/xh9oa42976

It only needed a slight modification for it to work inside the SV filter,

And now the track knob works 😀

When i get a chance i might take a look over at the dsp archive and see if theres any more filters that need SM'ing 😉

---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.

cheers 😉

Exo

infuzion ·

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.

That's handy, thanks! Had to install the .9 beta though to open it.

Doing an A/B of the other LP filter, the Karlsen seems much quieter. I think maybe it is the res multiplication; in the SV version, the res code is: rez = 1.0 - resonance; WhenI change the Karlsen code to res=.3*q; it is much louder.

exonerate ·

That's handy, thanks! Had to install the .9 beta though to open it.

doh!! i keep forgetting I'm using the beta version. 😊

cheers 😉

Exo [/url]

stefan ·

FWIW, it's not cascading, it's a form of oversampling, often called "double sampling". The filter kernel runs twice per sample, not actually up-sampling the input correctly, but that isn't always necessary.

If it'd be a matter of cascading, the same memory variables couldn't be used.

The reason for the double sampling is usually that the filter is only stable up to for instance Nyquist/2, and by increasing the internal sample rate you can then make the filter stable up the the external Nyquist frequency.

infuzion ·

Thanks for the correction Stefan 🙂

exonerate ·

stefan wrote: FWIW, it's not cascading, it's a form of oversampling, often called "double sampling". The filter kernel runs twice per sample, not actually up-sampling the input correctly, but that isn't always necessary.

If it'd be a matter of cascading, the same memory variables couldn't be used.

The reason for the double sampling is usually that the filter is only stable up to for instance Nyquist/2, and by increasing the internal sample rate you can then make the filter stable up the the external Nyquist frequency.

Ah, I'm guessing this method must also increase the volume?, It must have been a volume difference i noticed instead of a less steep cutoff.

The code looked very odd to me, I've never seen oversampling implemented like that before.

cheers 😉

Exo

Acrobat ·

I'm using this a lot but it needed lots of tweaking, the res value giving me the most problems..

Thx Exo for the mod, still needed more tweakings even in your version..

High resonance values are way cool, I would not tame so much as infuzion said (0.3*res make it sound too dull).. it's the res input value to be limited, not the internal factor, IMO, anyway..:

I put the cutoff limits of 0.0006<>0.66 outside the code to avoid a min max every sample, it takes 55 cycles less..

--- WIP ---

😇

matti ·

I use a modified Karlsen alot on my synths too. I added some extra magic in it, but it's still close to the original Karlsen one. Really nice low cpu-usage filter 🙂

Wrote something here? To have a post removed or your name hidden, write to [email protected].

Before your first post

A few rules keep this a friendly place. You agree to them once.

Shown next to what you post, here and in the app. It doesn’t have to be your real name: 3–24 lower-case letters, digits or _ (capitals become lower case, spaces become _).

    Then your post goes up straight away.

    Delete this reply?

    Open it in SynthMaker?

    It goes on the track you’re editing there, in place of that track’s sound, and into My sounds. Your other tracks stay as they are.

    Want to keep that track’s sound? Start a new song in SynthMaker first (Song › New song), then open this.

    Report this reply?

    Only the developer reads reports. The person isn’t told who reported them.

    What’s wrong with it?

    Block this person?

    You won’t see their posts and replies here any more. They aren’t told, and you can unblock them at any time.

    People you’ve blocked

    Their posts and replies are hidden from you. Unblock someone to see them again.

    The community rules

    A few rules keep this a friendly place. Everyone agrees to them once, before their first post.