1 declare name "lowboost";
3 declare author "Grame";
5 declare copyright "(c)GRAME 2006";
7 //------------------------------------------------------------------
8 // DAFX, Digital Audio Effects (Wiley ed.)
10 // section 2.3 : Equalizers
11 // page 53 : second order shelving filter design
12 //------------------------------------------------------------------
17 //------------------- low-frequency shelving boost (table 2.3) --------------------
19 V0(g) = pow(10,g/20.0);
20 K(fc) = tan(PI*fc/SR);
22 denom(fc) = 1 + sqrt(2)*K(fc) + square(K(fc));
24 lfboost(fc, g) = TF2( (1 + sqrt(2*V0(g))*K(fc) + V0(g)*square(K(fc))) / denom(fc),
25 2 * (V0(g)*square(K(fc)) - 1) / denom(fc),
26 (1 - sqrt(2*V0(g))*K(fc) + V0(g)*square(K(fc))) / denom(fc),
27 2 * (square(K(fc)) - 1) / denom(fc),
28 (1 - sqrt(2)*K(fc) + square(K(fc))) / denom(fc)
32 //------------------------------ User Interface -----------------------------------
34 freq = hslider("[1]freq [unit:Hz][style:knob]", 1000, 20, 20000, 0.1);
35 gain = hslider("[2]gain [unit:dB][style:knob]", 0, -20, 20, 0.1);
38 //----------------------------------- Process -------------------------------------
40 process = vgroup("low-freq shelving boost", lfboost(freq,gain));