TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Why is it a bad idea to filter by zeroing out FFT bins? (2020)

91 pointsby bcaa7f3a8bbcabout 4 years ago

10 comments

Stenzelabout 4 years ago
This is indeed an excellent way of filtering if your audio is cyclic and fits into a single FFT, like a periodic waveform, a drum loop or an Optigan track. Just make sure not to apply any window.
评论 #27103328 未加载
评论 #27103727 未加载
jschveibinzabout 4 years ago
While it’s not necessarily a “bad idea” depending upon your application, you may be able to do “better” in the side lobes using masking functions (windows) other than rectangles, which is what zeroing is. See hanning, hamming, etc.
评论 #27101854 未加载
评论 #27100274 未加载
im3w1labout 4 years ago
How does a brickwall filter affect the following things?<p>A tone played for a fixed time, a glissando, vibrato, a pure tone that lies between two frequency bins?
debbiedownerabout 4 years ago
If you&#x27;re doing this then you assume your signal is stationary in the window length. Many times, it&#x27;s not...
p1mrxabout 4 years ago
<a href="https:&#x2F;&#x2F;github.com&#x2F;pmarks-net&#x2F;chromadoze" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;pmarks-net&#x2F;chromadoze</a> multiplies white noise by a stairstep shape (rectangles of various heights), then runs an IDCT to generate colored noise.<p>I wonder if this actually has subtle artifacts, or if it doesn&#x27;t matter because the input is noise?
评论 #27104194 未加载
whatshisfaceabout 4 years ago
I disagree that it&#x27;s always a bad idea. If you didn&#x27;t have real data in those bins to begin with, then the absence of ringing was never real either. You&#x27;re just choosing between interpolation strategies to fill in the data you deleted. You have to realize that whatever you do, you&#x27;re making up data. One could say that you&#x27;re taking out your dry erase marker and writing in your priors. For image processing, you probably don&#x27;t have ringing in the scene you took a picture of, so you don&#x27;t want to zero bins. In other signal processing contexts where you might actually have no signal to measure in certain bins, and sometimes you want to zero them.
评论 #27103335 未加载
评论 #27102614 未加载
cycomanicabout 4 years ago
A much less well known fact about the FFT (or the DFT) is that it is also exhibits a brickwall (rectangular) response. This can manifest itself when using zero padding in the frequency domain for upsampling, but is also the reason for artifacts when FFTing a nonperiodic window.<p>It&#x27;s used in OFDM, where the subchannels are generated by an FFT and have a sinc shape (the Impulse response of the FFT) in the frequency domain.
评论 #27103942 未加载
a-dubabout 4 years ago
as mentioned, worth pointing out that most practical digital filters don&#x27;t have that many taps so unless you have other reasons to go to the frequency domain, time domain filtering can be faster...<p>but yeah, the implicit boxcar is a sinc.<p>sometimes it&#x27;s used for image data as 2d convolutions can be expensive though...
评论 #27103352 未加载
kaysonabout 4 years ago
This would be a really good interview question!
评论 #27102352 未加载
dreamcompilerabout 4 years ago
Why use an FFT at all? Yes it&#x27;s easy but you&#x27;ll almost always get a better result with a lot less computation by building an actual digital filter.
评论 #27103451 未加载
评论 #27103308 未加载
评论 #27104362 未加载
评论 #27104105 未加载