Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Usage of FFT filter for lowpass (Read 13439 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Usage of FFT filter for lowpass

I am in the process of recording radio broadcasts and in need to use lowpass filter on them. The idea is to use Sonic Foundry Noise Reduction tool for this task, because no equalizer is sharp enough. Can this have an adverse quality on the signal? In the past I have used NR, but now I'm in doubt about it.

Usage of FFT filter for lowpass

Reply #1
I find the FFT filter in CoolEdit does an excellent job. The cutoff is very sharp. I always use the highest FFT size for maximum quality but I haven’t actually experimented with lower sizes.

Usage of FFT filter for lowpass

Reply #2
I too, often use the FFT in Audition.

Usage of FFT filter for lowpass

Reply #3
A particularly sharp cutoff can introduce audible pre-echo/post-echo, particularly at low frequencies. I was able to ABX doing a +20 in one frequency band followed by -20 in the same band with foobar's eq, due solely to pre-echo.

From what I understand, the effect simply cannot be eliminated; it's a result of the Heisenberg Uncertainty Principle applied to wave mechanics. Increasing frequency resolution (by increasing filter sharpness) reduces time resolution.

Usage of FFT filter for lowpass

Reply #4
Maybe there is a problem in some cases, maybe not. While I don't recall doing any ABX tests, I have done A/B comparisons and found nothing to complain about. Why not try some actual material and find out. You aren't after a transparent ABX result anyway.

You can also, with a little more expenditure of time, resample to a lower sample rate, whichever one gets you to the right cutoff. The resampling in CoolEdit/Audition is first rate and will definitely work well. You may, of course, need to resample back to the original sample rate if you have to match some system requirements.

Usage of FFT filter for lowpass

Reply #5
The resampling process will include the same kind of filter, and introduce the same kind of ringing (pre-echo).

You shouldn't use brick-wall-like filters within the audible range, unless the problem you're removing is worse than the possible side effects - or there's no content at near frequency of the transition band of the filter (i.e. what you want to remove is well above it, what you want to keep is well below it, and there's nothing within it).

You can always smooth the transition band in Cool Edit's FFT filter just by adding more points in the transition region to smooth the response, and switching on "spline curves".

Cheers,
David.

Usage of FFT filter for lowpass

Reply #6
Instead of an FFT filter, I would use a dedicated IIR or FIR filter.  It's designed to do the job, doesn't have anti-causal effects (which cause pre-echo), and you can still get a quite steep and deep cut-off.  I would be very surprised if a good audio editor didn't have them.

Usage of FFT filter for lowpass

Reply #7
Thank you for the replies.

Quote
I always use the highest FFT size for maximum quality but I haven’t actually experimented with lower sizes.

My understanding was that lower sizes are preferable, in order to reduce smearing of the signal in time.

Quote
You can also, with a little more expenditure of time, resample to a lower sample rate, whichever one gets you to the right cutoff.

Is the anti-alias filter built into resampler better? It's possible to execute resample and press cancel as soon as the anti-alias processing is about to complete. But I have to watch the program carefully.

Quote
Instead of an FFT filter, I would use a dedicated IIR or FIR filter. I would be very surprised if a good audio editor didn't have them.

I don't think that I have a FIR filter in Sound Forge.

Usage of FFT filter for lowpass

Reply #8
Instead of an FFT filter, I would use a dedicated IIR or FIR filter.

My understanding is that an "FFT filter" is just an implementation of a FIR filter that exploits the convolution theorem. Of course, nobody stops you from using it wrongly. Keywords: "circular convolution" + lack of "zero padding" = "wrap around errors".

Anyhow I agree with you that it's not really desirable to have a very long impulse response which is what you get if you turn the "FFT size" up. By using a moderate size you don't even need manual smoothing "of the transition band".

Cheers,
SG

Usage of FFT filter for lowpass

Reply #9

Instead of an FFT filter, I would use a dedicated IIR or FIR filter.

My understanding is that an "FFT filter" is just an implementation of a FIR filter that exploits the convolution theorem. Of course, nobody stops you from using it wrongly. Keywords: "circular convolution" + lack of "zero padding" = "wrap around errors".

Anyhow I agree with you that it's not really desirable to have a very long impulse response which is what you get if you turn the "FFT size" up. By using a moderate size you don't even need manual smoothing "of the transition band".

Cheers,
SG


Yes!  As the saying goes, convolution in the time domain (FIR) is multiplication in the frequency domain (FFT filter).
The reason you get weird effects when using FFT is that it's difficul to re-map magnitude changes (sqrt(sin^2+cos^2)) back to the sin and cos responses.

Usage of FFT filter for lowpass

Reply #10
The reason you get weird effects when using FFT is that it's difficul to re-map magnitude changes (sqrt(sin^2+cos^2)) back to the sin and cos responses.

Then you must be doing something wrong. Convolution is simple via FFT. You don't need any window functions or square roots etc ... See here.

Cheers,
SG

Usage of FFT filter for lowpass

Reply #11

The reason you get weird effects when using FFT is that it's difficul to re-map magnitude changes (sqrt(sin^2+cos^2)) back to the sin and cos responses.

Then you must be doing something wrong. Convolution is simple via FFT. You don't need any window functions or square roots etc ... See here.

Cheers,
SG


I meant that for a visual tool like the Cool Edit FFT filter discussed in this thread, there's not a 1-to-1 correlation between an adjustment in magnitude and the corresponding adjustment in real and imaginary coefficients.  There are infinite possibilities depending on what you also want your phase to be.  I was speculating that the pre-echo distortion described earlier might be a result of this phase uncertainty.  My earlier comment might make a bit more sense if you replace cos with real and sin with imaginary

Usage of FFT filter for lowpass

Reply #12
I am in the process of recording radio broadcasts and in need to use lowpass filter on them. The idea is to use Sonic Foundry Noise Reduction tool for this task, because no equalizer is sharp enough. Can this have an adverse quality on the signal? In the past I have used NR, but now I'm in doubt about it.


What are you actually trying to remove / correct? Any chance of posting a sample of the material ?


Usage of FFT filter for lowpass

Reply #13
I meant that for a visual tool like the Cool Edit FFT filter discussed in this thread, there's not a 1-to-1 correlation between an adjustment in magnitude and the corresponding adjustment in real and imaginary coefficients.  There are infinite possibilities depending on what you also want your phase to be.  I was speculating that the pre-echo distortion described earlier might be a result of this phase uncertainty.  My earlier comment might make a bit more sense if you replace cos with real and sin with imaginary
I would imagine that any sensible implementation of a FIR filter for audio implemented with the FFT would use the minimum linear phase version of the filter. This version is the one which minimizes group delay, while keeping linear phase - and hence no phase distortion.

Usage of FFT filter for lowpass

Reply #14

I meant that for a visual tool like the Cool Edit FFT filter discussed in this thread, there's not a 1-to-1 correlation between an adjustment in magnitude and the corresponding adjustment in real and imaginary coefficients.  There are infinite possibilities depending on what you also want your phase to be.  I was speculating that the pre-echo distortion described earlier might be a result of this phase uncertainty.  My earlier comment might make a bit more sense if you replace cos with real and sin with imaginary
I would imagine that any sensible implementation of a FIR filter for audio implemented with the FFT would use the minimum linear phase version of the filter. This version is the one which minimizes group delay, while keeping linear phase - and hence no phase distortion.


Yeah, that makes sense (Sebastian PM'd me with a similar explanation).  I was getting hung on what the phase would be, but linear phase makes sense.  Also explains why there are pre-echo problems.

Usage of FFT filter for lowpass

Reply #15
What are you actually trying to remove / correct? Any chance of posting a sample of the material ?

It's not about one particular sample. The files have normal audio up to about 16 kHz and the rest of the spectrum, at least up to 60 kHz, is filled with garbage. I record at 48000 S/s, so see only 24 kHz. I want to get rid of this garbage to see the waveform while editing and to save space during the final data compression.

After processing with Sonic Foundry Noise Reduction the highest frequency "unit" is being left unaltered (23,800 - 24,000 Hz with 128-sample FFT). Is it safe to leave it there and later apply lowpass once more with LAME? I don't have CoolEditPro.

Usage of FFT filter for lowpass

Reply #16
A limit of 16kHz sounds about right for an FM broadcast.  That's roughly the limit of perception for a good proportion of the population (I'm 27 and can only just hear a 17kHz tone), and you'll have only noise above that because your radio's bandwidth filter is imperfect (however good it is).

However, 16kHz to 24kHz is much less than an octave, so I can also see why it would be difficult to use a conventional filter to remove the noise.

Can you not simply tell LAME to apply it's own low-pass filter at 16kHz?

Usage of FFT filter for lowpass

Reply #17
I want to perform edits upon the recorded data, but can't see a thing unless lowpass has been applied.

Quote
It's possible to execute resample and press cancel as soon as the anti-alias processing is about to complete.

Unfortunately this no longer works in SF6 because there is no "direct mode". In direct mode the program processed the opened WAV file and built additional files for undo when requested.

Usage of FFT filter for lowpass

Reply #18
After processing with Sonic Foundry Noise Reduction the highest frequency "unit" is being left unaltered (23,800 - 24,000 Hz with 128-sample FFT). Is it safe to leave it there and later apply lowpass once more with LAME? I don't have CoolEditPro.

There's a free trial of Adobe Audition 3 (formerly this was Cool Edit Pro)..
http://www.adobe.com/products/audition/

Usage of FFT filter for lowpass

Reply #19
A fairy brought me Cool Edit Pro.

Its FFT filter indeed works better than the one in Sound Forge. It would be lot easier to work with only one program. But if you say that FFT is suitable for this task, I will fire up CEP once per file.

Usage of FFT filter for lowpass

Reply #20
I say it is suitable based on my own results, which have been auditioned by a small satisfied audience. It seems most reasonable that you do something similar -- just find out how well it flies in your world.

Usage of FFT filter for lowpass

Reply #21
It's not about one particular sample. The files have normal audio up to about 16 kHz and the rest of the spectrum, at least up to 60 kHz, is filled with garbage. I record at 48000 S/s, so see only 24 kHz. I want to get rid of this garbage to see the waveform while editing and to save space during the final data compression.
If your tuner is letting through so much junk above 16kHz that it's stopping you see the signal in waveform view, then your tuner is broken. It should be filtering this stuff out itself. Most don't try too hard - it'll typically be 20-60dB down - easy enough to see in spectrum view, but more or less invisible in waveform view.

Can SF convolve arbitrary filters? You could build the impulse in CEP (just filter a single impulse), save it, and use this as the filter in SF.

Cheers,
David.

 

Usage of FFT filter for lowpass

Reply #22
If your tuner is letting through so much junk above 16kHz that it's stopping you see the signal in waveform view, then your tuner is broken.

That is a fair assessment. I am trying to live with it, as many people do with integrated sound. But of course the right course of action, especially if recording is planned, should be to replace it with a better tuner.

I kinda like though. It can tune from 64 MHz up to UHF, without stupid restrictions of one or another country.

Usage of FFT filter for lowpass

Reply #23
2Bdecided has a valid point, actually.  I'm remembering something about how FM signals are transmitted (and, conversely, how they should be received and decoded).

A "narrowband" FM signal, as used by amateurs on 12.5kHz channels, offers an audio bandwidth of about 3kHz - the same as a telephone - and is effectively a "phase modulated" signal rather than strictly a "frequency modulated" signal.  This is achieved by a pre-emphasis filter that has a constant slope over the entire passband, which has a high-pass filter at about 150Hz as well.

The pre-emphasis is used to compensate for the fact that "raw" FM reception contains more noise power at higher frequencies, due to fundamental uncertainties in the discriminator, and thus improves intelligibility, especially on the low transmitter power normally used by amateurs.  I've personally used milliwatts to reach miles, using good antennas at both ends, but the noise was reported to be noticeable.  The principle is the same as for Dolby NR on tapes; more power is put in the higher frequencies on transmit, and filtered back out on receive.

A "wideband" FM signal, as used by broadcasters on 150kHz channels, offers a nominal bandwidth of about 50kHz.  The pre-emphasis does not extend over the entire passband in this case, but performs the same function of noise reduction.  However, only the first 16kHz is used as a conventional (monophonic) audio signal; the rest should be filtered out and decoded separately.  The main components above 16kHz are a pilot tone, an AM-encoded stereo-difference signal, and the RDS system.

Because the stereo portion of the signal is transposed into the noisier ultrasonic frequencies, it is rendered unusable more quickly than the mono portion.  The RDS signal is even further up, and rather close to the frequency limit, so will tend to be lost before the stereo signal.

If the tuner is failing to block noise above 16kHz, it is rather likely that it has not only failed to filter out (never mind decode!) the stereo and RDS signals, but has also failed to apply the noise reduction filter, which would give you too much hiss and very "bright" sound.  I would thus be very skeptical about the audio quality coming off it.