[sdiy] Looking for cheap lowpass filter algorithm

Seb Francis seb at burnit.co.uk
Wed Aug 16 16:09:17 CEST 2006


Magnus Danielson wrote:
> You want to lowpass filter your signal in 48 kHz with a lowpass-filter having
> the cut-off just below 12 kHz and a fairly steep slope such that above 12 kHz
> you have an effective stop-band. A FIR filter will do this for you and you can
> get linear phase very easilly. Then taking every other sample isn't as grave an
> error as it is now.
>
>   
> If you don't do this, you will have overtones being twisted around 12 kHz down
> into the audioble spectrum since taking every other sample is the equalent to
> sampling at 24 kHz giving it the new Nyquist frequency at 12 kHz.
>
>   

Yes, this is exactly what I am hearing.  Any signal which doesn't have 
content about ~12 kHz sounds just fine regardless of whether I'm running 
at 48kHz or 24kHz.

So is there a cheap way (low CPU cycles) to implement a FIR filter with 
a 12kHz cutoff?  It seems like there must be quick&dirty hack that will 
do this for a frequency that is an exact power-of-2 multiple of the 
sampling rate.

What about just averaging 2 consecutive samples rather than discarding 
one of them?

Seb





More information about the Synth-diy mailing list