Type : FIR using allpass chain
References : Posted by mail[AT]mutagene[DOT]net
Not at all optimized and pretty hungry in terms of arrays and overhead (function requires two arrays containing lattice filter's internal state and ouputs to another two arrays with their next states). In this implementation I think you'll have to juggle taps1/newtaps in your processing loop, alternating between one set of arrays and the other for which to send to wfirlattice).
A frequency-warped lattice filter is just a lattice filter where every delay has been replaced with an allpass filter. By adjusting the allpass filters, the frequency response of the filter can be adjusted (e.g., design an FIR that approximates some filter. Play with with warping coefficient to "sweep" the FIR up and down without changing any other coefficients). Much more on warped filters can be found on Aki Harma's website ( http://www.acoustics.hut.fi/~aqi/ )
float wfirlattice(float input, float *taps1, float *taps2, float *reflcof, float lambda, float *newtaps1, float *newtaps2, int P)
// input is filter input
// taps1,taps2 are previous filter states (init to 0)
// reflcof are reflection coefficients. abs(reflcof) < 1 for stable filter
// lamba is warping (0 = no warping, 0.75 is close to bark scale at 44.1 kHz)
// newtaps1, newtaps2 are new filter states
// P is the order of the filter
forward = input;
topline = forward;
for (int i=0;i<P;i++)
newtaps2[i] = topline;
newtaps1[i] = float(lambda)*(-topline + taps1[i]) + taps2[i];
topline = newtaps1[i]+forward*(reflcof[i]);
forward += newtaps1[i]*(reflcof[i]);
from : fuzzpilz[AT]gmx[DOT]net
comment : Couldn't you easily do away with newtaps entirely? As in:
I haven't had time to try this in a plugin yet, but if Maple is to be trusted at all, that works.
(2WarpDelay is nice, by the way)
from : mail[AT]mutagene[DOT]net
comment : haha, thanks, that's awesome! how embarassing ;)
(glad you like 2warpdelay! the warped IIR lattice is up on harma's site too, though you might save yourself time if you read the errata: http://www.acoustics.hut.fi/~aqi/papers/oops.html :( )
from : davett[AT]yahoot[DOT]com
comment : This looks really interesting.
How do I get the coeffs for it, and how do I invert it to get back to the original signal?