diff --git a/src/sfizz/dsp/filters/filters_modulable.dsp b/src/sfizz/dsp/filters/filters_modulable.dsp index fa46f7e0..2d4b9907 100644 --- a/src/sfizz/dsp/filters/filters_modulable.dsp +++ b/src/sfizz/dsp/filters/filters_modulable.dsp @@ -11,6 +11,7 @@ rbj = library("rbj_filters.dsp"); // b0,b1,b2,a1,a2 : normalized coefficients //------------------------------------------------------------------------- biquad(b0,b1,b2,a1,a2) = fi.iir((b0,b1,b2),(a1,a2)); +biquadTf2(b0,b1,b2,a1,a2) = fi.tf22t(b0,b1,b2,a1,a2); //------------------------------------------------------------------------- // Biquad filter using smoothed coefficients @@ -18,6 +19,7 @@ biquad(b0,b1,b2,a1,a2) = fi.iir((b0,b1,b2),(a1,a2)); // b0,b1,b2,a1,a2 : normalized coefficients //------------------------------------------------------------------------- smoothBiquad(s,b0,b1,b2,a1,a2) = biquad(b0:s,b1:s,b2:s,a1:s,a2:s); +smoothBiquadTf2(s,b0,b1,b2,a1,a2) = biquadTf2(b0:s,b1:s,b2:s,a1:s,a2:s); //------------------------------------------------------------------------- // RBJ filter of a specific type using smoothed coefficients @@ -27,14 +29,14 @@ smoothBiquad(s,b0,b1,b2,a1,a2) = biquad(b0:s,b1:s,b2:s,a1:s,a2:s); // q : height of the resonant peak in linear units //------------------------------------------------------------------------- rbjLpfSmooth(s,f,g,q,x) = (rbj.filtercoeff(f,g,q).LPF,x) : smoothBiquad(s); -rbjHpfSmooth(s,f,g,q,x) = (rbj.filtercoeff(f,g,q).HPF,x) : smoothBiquad(s); -rbjBpfSmooth(s,f,g,q,x) = (rbj.filtercoeff(f,g,q).BPF,x) : smoothBiquad(s); -rbjNotchSmooth(s,f,g,q,x) = (rbj.filtercoeff(f,g,q).notch,x) : smoothBiquad(s); -rbjApfSmooth(s,f,g,q,x) = (rbj.filtercoeff(f,g,q).APF,x) : smoothBiquad(s); -rbjPeakingEqSmooth(s,f,g,q,x) = (rbj.filtercoeff(f,g,q).peakingEQ,x) : smoothBiquad(s); -rbjPeakingNotchSmooth(s,f,g,q,x) = (rbj.filtercoeff(f,g,q).peakNotch,x) : smoothBiquad(s); -rbjLowShelfSmooth(s,f,g,q,x) = (rbj.filtercoeff(f,g,q).lowShelf,x) : smoothBiquad(s); -rbjHighShelfSmooth(s,f,g,q,x) = (rbj.filtercoeff(f,g,q).highShelf,x) : smoothBiquad(s); +rbjHpfSmooth(s,f,g,q,x) = (rbj.filtercoeff(f,g,q).HPF,x) : smoothBiquadTf2(s); +rbjBpfSmooth(s,f,g,q,x) = (rbj.filtercoeff(f,g,q).BPF,x) : smoothBiquadTf2(s); +rbjNotchSmooth(s,f,g,q,x) = (rbj.filtercoeff(f,g,q).notch,x) : smoothBiquadTf2(s); +rbjApfSmooth(s,f,g,q,x) = (rbj.filtercoeff(f,g,q).APF,x) : smoothBiquadTf2(s); +rbjPeakingEqSmooth(s,f,g,q,x) = (rbj.filtercoeff(f,g,q).peakingEQ,x) : smoothBiquadTf2(s); +rbjPeakingNotchSmooth(s,f,g,q,x) = (rbj.filtercoeff(f,g,q).peakNotch,x) : smoothBiquadTf2(s); +rbjLowShelfSmooth(s,f,g,q,x) = (rbj.filtercoeff(f,g,q).lowShelf,x) : smoothBiquadTf2(s); +rbjHighShelfSmooth(s,f,g,q,x) = (rbj.filtercoeff(f,g,q).highShelf,x) : smoothBiquadTf2(s); //------------------------------------------------------------------------- // 1-pole low-pass filter