[music-dsp] FFT filtering...
Dave Gamble
signalzerodb at yahoo.co.uk
Tue Aug 26 10:04:01 EDT 2003
Hey,
[NB: I've replied to loads of stuff in the email -
your text, and previous emails too]
> More specifically, I'm filtering a periodic
> signal...so I don't care about
> wrap around...
>
Wow, that's fortunate.
I'll keep my fingers crossed that your signal is a
power of two in length :)
> OK...artificacts..but what kind and why?
>
Naah, this is just being silly in the case of periodic
signals.
Do your FFT, and zero elements, and you'll get "pretty
close" to your ideal filtering.
Now, of course, your filter (which in the frequency
domain is 1 below the passband and 0 above) might not
be optimal... Something like a Kaiser window might
actually give you more accurate results.
This is because for the 1/0 window, no provision has
been made for what shape the response is 'between' the
FFT bins. A Kaiser window takes such things in mind.
:)
> > I think you'll get artifacts due to the windowing.
> if you wanna to do
> > filtering, best use a wavelet transform.
> >
> > (ps. i'm new to this, so guys, correct me if i'm
> wrong!)
> >
> > Rob
> >
Umm.... yeah... Wavelets (right now) are pretty
specific, and you don't wanna touch them at all if
you're new to this. Someone can prove me wrong by
using them as a remarkably lucid introduction to DSP,
and I look forward to that.
> > > I remember hearing/reading that zeroing FFT
> components to do
> > > filtering was
> > > bad/wrong - but i can't remember why and can't
> find a reference.
It's slightly less than optimal. That's all.
> > To do a
> > > lowpass filter in the time domain, you convolve
> with a windowed
> > > sinc function.
> > > Taking the FFT of the windowed sinc should give
> a lowpass
> > > frequency response
> > > with a finite transition bandwidth. But what if
> you just multiply
> > > by the ideal lp response in the frequency
> domain? i.e. a unit step
> > > transitioning at the desired cutoff.
Nope, if you do it in the time domain, or if you FFT,
multiply and IFFT, the two results are IDENTICAL (up
to machine precision, of course!)
What you're remembering is that you wouldn't
deliberately convolve against a sampled windowed sinc,
you'd try and do something to make your sinc more
accurate, like rearranging some samples to make the
tails shorter.
> >> It seems like this could
> > > cause aliasing
> > > in the time domain, however that could manifest
> I don't know,
> > > since the windowed
> > > sinc required to get this response might be
> longer than the
> > > corresponding time
> > > domain sequence length.
> > >
Nope. Stop worrying.
> > > Is there really a problem to this approach or am
> I confusing this issue
> > > with warnings about the erroneous belief of dsp
> newbies that FFT is *THE*
> > > way to do filtering?
> > >
Warnings against using FFT for filtering include the
fact that Lake DSP have patented signal processing
(all of it!), and anything remotely intelligent falls
inside their patent. (or so they'd like you to
believe)
The other point is that you may get better results by
using some cunning windowing/filtering on your sinc.
In fact, the Stilson Smith paper on resampling talks
about windowing sincs. It's a very clear paper. Take a
look.
Take care,
Dave.
__________________________________________________
Yahoo! Plus - For a better Internet experience
http://uk.promotions.yahoo.com/yplus/yoffer.html
More information about the music-dsp
mailing list