MATLAB: Zeroing out particular frequency in audio signal

frequency domain sound processingzeroing out frequency component

Hello, would appreciate a clarification on the following:
I have certain audio recording, several seconds in duration, fs = 44.1kHz
This is actually environmental noise of particular environment, the goal is to figure out main noise frequency component (or 2-3 components), filter them out and reconstruct the signal back for playback without these main noise components.
Just to get the feel of that, I'm trying to achieve that by figuring the highest magnitude peak after FFT (or 2 highest magnitude components), zeroing them out in frequency domain (just setting the appropriate FFT vector components and their conjugate pairs to zero) and then duing IFFT of the result. Then playing back the resulting vector using "sound(signal_vector, Fs)".
I'm checking the spectrum of the original signal and after zeroing out the 2 highest magnitude components – indeed the processed spectrum has those components zeroed out. However, playing the IFFT resulting signal it sounds the same as the original one. Can hear no any effect of the zeroing.
Hence the questions:
  1. Is the approach of zeroing out in frequency domain and than inverse FFT – wrong one for the goal I'm trying to achieve ? If so, will appreciate explanation
  2. If this approach should work, what to check to figure out the reason the reproduced audio sounds juts like the original one ?
Thank you in advance
Alex

Best Answer

Thank you Dimitris In fact, I ran FFT on the entire vector of the input signal (around 300000 samples at sampling rate of 44.1kHz) I’ll try to zero out the area around the peak highest magnitude peaks What does mean the highest energy can be hidden ? If I see clear peaks in the spectrum that 3-4 times higher in magnitude than average spectrum magnitude - isn’t that clear sign of the frequency containing highest energy ?
Related Question