[sdiy] Looking for cheap lowpass filter algorithm
Seb Francis
seb at burnit.co.uk
Thu Aug 17 04:05:13 CEST 2006
Thanks to everyone for the help so far, I seem to be getting there with
this FIR stuff .. learning more and more about this DSP stuff every day :)
Turns out a 33 tap filter can be implemented in 37 cycles on a dsPIC so
I'm pretty happy to use this order of filter.
But I'm still a bit confused about a couple of things ...
Antti said
"I should emphasize that those are 32 multiplies at _24 kHz_ samplerate,
not 48 kHz".
Does this mean that I should discard every other sample and apply the 33
tap filter to the 24kHz sample rate data?
Or does it mean that I should apply a 17 tap filter to the 48kHz sample
rate data then discard every other sample?
And the other thing I'm still getting my head around is how to calculate
the optimal coefficients for my application - which requires a very
steep response filter with the stopband at 0.25*Fs (or possibly at
0.5*Fs depending on the answer to the above question).
I've tried out a couple of online calculators people have kindly sent me
but I'm not sure any of these are exactly what I need ...
Raised Cosine Filter
http://www-users.cs.york.ac.uk/~fisher/mkfilter/racos.html
Parks-McClellan equiripple FIR filter
http://www.dsptutor.freeuk.com/remez/RemezFIRFilterDesign.html
Kaiser Window FIR filter
http://www.dsptutor.freeuk.com/KaiserFilterDesign/KaiserFilterDesign.html
None of them seem to generate a very steep cutout. It could just be
that I'm not setting the parameters right, or that I need to use a
higher order filter, but I suspect that there may be other filter design
algorithms that would suit my purpose better .. unfortunately I'm a bit
of a newbie when it comes to all this DSP maths!
A couple of people have mentioned Matlab, but this isn't exactly a free
download. Eric suggested octave and octave-forge function library, but
this looks like a lot of work to learn to use, and even then I'm not
sure I'd know the names of the right mathematical algorithms to use.
So any pointers would be greatly appreciated :)
Seb
More information about the Synth-diy
mailing list