Hum Cancellation by Notch Filtering
Illustrates the use of the computationally-efficient IIR (recursive) 2-pole notch filter for narrow-band noise rejection. In this
example, a signal generator is used to artificially add excessive low-frequency "power hum" to the audio signal. A
tuned notch filter (centred roughly on the hum frequency) is used to filter out the hum from
the combined signal. Experiment with the filter settings to explore the filter behaviour. (Compare with the unprocessed
noisy signal by momentarily connecting the output of the mixer directly to the output device).
It is instructive to observe that when the noise and the signal share the same frequency band, it is more difficult to filter out
the noise without adversely affecting the signal. This is an important lesson in the art of filtering.
See also the "AdaptiveHumCancellation" example DrawingBoard for a more elaborate, self-tuning, hum removal system.