[sdiy] Looking for cheap lowpass filter algorithm

Eric Brombaugh ebrombaugh at earthlink.net
Fri Aug 18 05:19:53 CEST 2006


Seb Francis wrote:
> 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.

I've just built a new computer and part of the process was to do a 
Cygwin install. I can confirm that if you do a full install of Cygwin 
you'll get an up-to-date and fully usable copy of octave/octave-forge.

With that out of the way, the following code will design a 33-tap FIR 
filter for you, dump the tap values and plot the response in dB:

--------snip----------
b = remez(32, [0 .20 .30 1], [1 1 0 0])
plot(20*log10(abs(freqz(b))));
--------snip----------

use 'help remez' to learn what the parameters mean.

Note that 33 taps is fairly restricted and gives only about 32dB of stop 
band rejection. Not surprisingly, more taps give better results.

Eric






More information about the Synth-diy mailing list