### Karlsen Fast Ladder

Type : 4 pole ladder emulation
References : Posted by arifovekarlsen[AT]hotmail[DOT]com
Notes :
ATTN Admin: You should remove the old version named "Karlsen" on your website, and rather include this one instead.
Code :
// An updated version of "Karlsen 24dB Filter"
// This time, the fastest incarnation possible.
// The very best greetings, Arif Ove Karlsen.
// arifovekarlsen->hotmail.com

b_rscl = b_buf4; if (b_rscl > 1) {b_rscl = 1;}
b_in = (-b_rscl * b_rez) + b_in;
b_buf1 = ((-b_buf1 + b_in1) * b_cut) + b_buf1;
b_buf2 = ((-b_buf2 + b_buf1) * b_cut) + b_buf2;
b_buf3 = ((-b_buf3 + b_buf2) * b_cut) + b_buf3;
b_buf4 = ((-b_buf4 + b_buf3) * b_cut) + b_buf4;
b_lpout = b_buf4;

from : nobody[AT]nowhere[DOT]com
comment : Where are the coefficients? How do I set the cutoff frequency?

from : scoofy[AT]inf[DOT]elte[DOT]hu
comment : The parameters are: b_cut - cutoff freq b_rez - resonance b_in1 - input Cutoff is normalized frequency in rads (2*pi*cutoff/samplerate). Stability limit for b_cut is around 0.7-0.8. There's a typo, the input is sometimes b_in, sometimes b_in1. Anyways why do you use a b_ prefix for all your variables? Wouldn't it be more easy to read like this: resoclip = buf4; if (resoclip > 1) 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; lpout = buf4; Also note that asymmetrical clipping gives you DC offset (at least that's what I get), so symmetrical clipping is better (and gives a much smoother sound). -- peter schoffhauzer

from : arif[AT]str8dsp[DOT]com
comment : Tee b_prefix is simply a procedure I began using when I started programming C. Influenced by the BEOS operating system. However it seemed to also make my code more readable, atleast to me. So I started using various prefixes for various things, making the variables easily reckognizable. Peter, everyone, I am now reachable on www.str8dsp.com - Do also check out the plugin offers there!

from : aok[AT]str8dsp[DOT]com
comment : Here's even another filter, I will probably never get around to making any product with this one so here it is, pseudo-vintage diode ladder. Diode Ladder, (unbuffered) // limit resonance, rzl, tweak smearing with fltw, 0.3230 seems to be a good vintage sound. in = in - rzl; in = in + ((-in +kbuf1) * cutoff); kbuf1 = in + ((-in + kbuf1) * fltw); in = in + ((-in +kbuf2) * cutoff); kbuf2 = in + ((-in + kbuf2) * fltw); etc..

from : dev[AT]fxpointaudio[DOT]com
comment : "Cutoff is normalized frequency in rads (2*pi*cutoff/samplerate): This seems to be valid for very low ( < 200 Hz ) frequencies - higher sample rates seem to be "Closer" thanks

from : checkpageforemail[AT]checkpageforemail[DOT]com
comment : I also did a 9th order gaussian filter (minimal phase), using only 5 orders, for my limiter, which is released under the GPL LICENCE. http://www.paradoxuncreated.com

from : Generalized perfect digital "ladder" filter, with the desired aspects of analog[DOT]
comment : Hi, I have now generalized the ladder filter, into fast code, and with the desired aspects of analog, but retaining digital perfectness. Please see my blog: http://paradoxuncreated.com/Blog/wordpress/?p=1360 Peace Be With You.