[PD] Anti-aliasing filter

Larry Troxler lt at westnet.com
Thu May 20 04:56:00 CEST 2004

On Wednesday 19 May 2004 08:32, julien.breval at tremplin-utc.net wrote:
> Hello
> > I've got an additive synth which generates some very
> > high frequency partials and hence aliasing distortion
> > occurs when the fundamental is high enough.
> >
> > I tried to fix this by using a low pass (lop~) filter
> > before the dac. This didn't fix the problem and I
> > suspect that lop~ only filters up to about 22kHz. Is
> > there a way of implementing a 'brick wall' filter
> > which will stop ALL frequencies past a cutoff? (i.e.
> > not just frequencies in the audible range)
> You can make a 'brick' filter using an FFT transform, but the sound will be
> more or less altered (depending on the window size and the overlap you use
> for the FFT). I programmed a dual similar filter for adding the low
> partials of a sound to the high partials of another sound (the limit is as
> vertical as possible). As there was nothing else running in the patch, I
> could set the window size to 4096 (for accurate frequency resolution) and
> the overlap to 16 (for accurate "time" resolution). The problem of this
> method is that it takes lots of CPU.

No, actually, the problem of this method is that it doesn't work in this case.
Once aliased frequencies are introduced, the game is over, because the 
frequencies have already been aliased.

> Another solution is to calculate the highest partial that won't produce
> aliasing, in function of the fundamental.

This is the only solution, short of techniques like resampling ahead of time 
at a much higher rate.

Larry Troxler

More information about the Pd-list mailing list