1
$\begingroup$

I am trying to work through an issue with an FFT for audio : I have no spectral leakage while playing back audio, but the moment I change or zero out a value in any of the FFT bins, artifacts are introduced.

I have a basic understanding of what causes spectral leakage while working with an FFT : the rectangular window in the time domain constitutes a sinc function which is infinite in length. If a desired tone were to exist at a boundary of two bins, this would create leakage not only in the adjacent bins of the FFT, but further down the line due to the side-lobes of the sinc function.

What I do not understand is the following : if the FFT went through proper pre-windowing and post-windowing such that there is close to no spectral leakage in the signal, how could nulling or changing the value of some of the FFT bins cause spectral leakage? How do I circumvent this issue?

$\endgroup$

1 Answer 1

1
$\begingroup$

The issue is probably that you're just zeroing out the FFT coefficients and then taking the inverse FFT.

This is equivalent to multiplying the frequency domain by a response that is 1 everywhere except the zeroed coefficient (where it is zero).

Back in the time-domain, this multiplication has the effect of convolving the original signal with another signal of the same length. However, because your FFT is just the signal length, there will be time-domain circular aliasing (the end of the response will corrupt the beginning).

Check out this explanation of a similar question.

The fix will be to design an appropriate filter for what you want to do. A notch filter might be what you want.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.