Notch Filter

From Audacity Development Manual
Jump to: navigation, search
Notch Filter sharply attenuates frequency-specific noise like mains hum or electrical whistle with minimal damage to the remaining audio, by cutting a "notch" out of the frequency spectrum at that point.
Advice Note carefully that when you apply an effect to a time-stretched clip the changed speed of the clip will be automatically rendered.
  • If you apply an effect to a selection within a time-stretched clip then Audacity will split the original clip so that the selection can be rendered as part of applying the effect.
Alert If you apply this effect with an envelope present then there is a bug whereby the envelope is removed and the audio reverts to its full amplitude state prior to the effect being applied.
Accessed by: Effect > EQ and Filters > Notch Filter
Notch Filter 3-5-0.png

Frequency

Enter any frequency up to half the sample rate into the frequency text box (default is 60 Hz). Frequency greater than half the sample rate of the track are not valid because a track can only contain frequencies up to half its sample rate.

Q factor

This determines the width of the notch cut from your audio (default value is 1). Values above 1 create a narrower notch, and values below 1 create a wider notch. The Q Factor must be at least 0.1).


Examples

Example 1: Mains Hum Removal

Choose 60 Hz as "Frequency" for North America, or 50 Hz for the United Kingdom and most other countries. A table of mains frequencies by country is here.

Recorded hum often contains noisy harmonic frequencies above the fundamental frequency of the hum. A good approach is thus to apply Notch Filter to the fundamental hum frequency (for example, 50 Hz or 60 Hz), then use Analyze > Plot Spectrum to identify other broad noise spikes (for example, at 180 Hz and 300 Hz). You may want to increase the spectrum Size and use the "Log" Axis to see more clearly. Run Notch Filter again at each of the other noise frequencies, then use Effect > Noise Reduction at mild settings to remove any residual harmonics.

  • It is recommended to increase the Q factor when removing higher harmonics so as to lessen possible audio artifacts. Generally, a Q of between 2 and 10 works well for mains hum removal. Choosing appropriate Frequency and Q factor settings from the noise spikes in Plot Spectrum is an approximation, due to inevitable interpolation errors from whichever "windowing" function is chosen. However a good method for calculating Frequency and Q factor from Plot Spectrum can be found in this Audacity Forum topic.

The below image shows a spectrum plot of some music from which a notch of 60 Hz hum has been cut. Before applying the effect, the hum displayed a prominent spike at this frequency, extending to the top of the graph.

Spectrum 60Hz notched W10.png
Depending on the audio, you might find in this case that the spectrum had been notched too deeply, thus affecting the content, and that a higher Q factor would have been preferred. You might want to notch the visible spikes at about 100 and 350 Hz as well. As always with Audacity, you can Edit > Undo and experiment with different notch filter settings.

Example 2: High pitched whistle

Spectrum with whistle W10.png
In this case the frequency analysis at Analyze > Plot Spectrum is fairly smooth except for a tall peak on the right. Place the mouse's cross-hair pointer over that peak. Audacity shows the peak more accurately to be at 18,996 Hz which will be the frequency to enter in Notch Filter.

Links

|< Index of Effects, Generators and Analyzers

|< Effect Menu