I have a bunch of audio files all sampled at 44100 Hz sample frequency. I am trying to remove all the frequencies which are outside the human hearing range (I use the following as reference: Frequency Range of Human Hearing, as well as robert.b's answer for determining the frequency value of a given bin: How to get Frequency from FFT result), and my basic approach is:
- Perform an FFT on the files
- Convert all frequency bin indices to actual frequencies
- Remove those which are outside the range (i.e. below 20 and above 20,000 Hz)
Would that be a valid approach, and would it be possible to "put back" my signals to a state (using the inverse FFT) where I can play them and check if they still sound "normal"?
Answer
What frequencies would you like to remove? 44.1kHz is specifically designed to capture audio files with good fidelity but also with not a lot of extra data. On the upper end, human hearing goes up to about 20 kHz. The Nyquist frequency is 22.05 kHz. The extra 2 kHz are needed to allow for anti aliasing filters that have finite steepness and not an extraneous amount of time domain ringing or group delay. At the low end, it can be beneficial to filter anything below 25 Hz or so specifically if it's badly recorded. Again, care need to be taken to control time domain distortions since the poles of a 25Hz high-pass at 44.1kHz are very, very close to the unit circle.
Zeroing in the FFT domain is generally a bad idea: If it's done wrong, it leads to time-domain aliasing which sounds terrible. If it's done correctly (by properly choosing window size, shape, step size, and overlap) it is still just equivalent to time domain filtering with a fairly bad FIR filter.
No comments:
Post a Comment