| THe problems with filter2 et al. are twofold:
1. For useful-sized FIR filters (100+ coefficients) there is no easy way to
get the coefficients in. Convolve works better. If someone has a method
that doesn't violate line-length and/or parameter number restrictions,
please let me know.
2. For IIR filters they work wonderfully for second order, marginally for
third order and not at all for fourth or higher where the poles are close
to the unit circle, which is the case for musically useful filters. They
are quite stable for poles far removed from the unit circle, but who needs
those?
The code could be rewritten to treat roundoff better, or create a series of
cascaded second-order filters (which works fine, by the way) but the rework
is significant. I don't have the time and jpff has insufficient background
and too many other projects. Any volunteers?
At 5:58 PM +0000 1/24/99, jpff@maths.bath.ac.uk wrote:
>Message written at 24 Jan 1999 13:12:50 +0000
>
>>>>>> "Josep" == Josep M Comajuncosas writes:
>
> Josep> Btw does anyone know if filter2, kfilter2 and zfilter2 (why
> Josep> "2"?) work as expected? I heard they were not very
> Josep> reliable..., and in fact I remember I implemented an allpass
> Josep> with kfilter2 and it didnt work (but worked ok. with "biquad").
>
>We spent some time in late summer looking at the filter2 opcodes (the
>2 so as to differentiate from the filter opcode in XTCsound) and we
>concluded that they were not very useful as they were numerically
>unstable in all useful cases (that was the executive summary). I
>rewrote the code (while at ICMC, Ann Arbor) to use double precision in
>an attempt to restrict the errors. As far as I could tell either my
>rewrite was wrong or it was still ustable. I do not know much
>(anthing?) about digital filters so I am rather in the dark. Erik
>Spjut was advising....
>
>I suspect that if no one can explain why these opcodes are useful, or
>can fix them, it wold be best to remove them from the system.
>
> Josep> It would be nice another filter opcode with all the filter
> Josep> coeff. being k-rate variable.
>
>I tink the work Hans has been doing of late is much more useful, but I
>would appreciate a calm reassessment of the filters available.
>
>==John ffitch
-------------------------------------------------------------------------------
Erik Spjut (spyoot, rhymes with cute) - Associate Professor of Engineering
and Associate Director for Engineering Computing, Center for Design Education
Harvey Mudd College, Claremont, CA 91711-5990 USA
Erik_Spjut@hmc.edu Ph & Voice mail (909) 607-3890 Fax (909) 621-8967
|