howto → Howto: Vuvuzela filter using Linux (Ubuntu)
By now there are more than a few bog posts like this on how to filter out the resonant frequencies produced by the vuvuzela.
I wasn’t too happy with any of them and thought I’d share what I came up with after some tinkering.
For the impatient:
To install required tools:
sudo apt-get install sox
To test:
play vuvuzela.wav vol 0.9 bandreject 116.56 3.4q bandreject 233.12 3.4q bandreject 466.24 3.4q bandreject 932.48 3.4q bandreject 1864 3.4q
To use:
rec -d|play -d vol 0.9 bandreject 116.56 3.4q bandreject 233.12 3.4q bandreject 466.24 3.4q bandreject 932.48 3.4q bandreject 1864 3.4q
Assuming your default sound input source is the your line-in or tv-tuner.
Updated: I updated the fundamental and harmonics as per this site.
Updated again: The above update should have been better, theoretically, but it isn’t.
Vuvuzela Frequencies
Fundamental: 232.4 Hz
Harmonic 1: 464.8
Harmonic 2: 697.2
Harmonic 3: 929.6
Harmonic 4: 1162
Harmonic 5: 1394.4
Harmonic 6: 1626.8
Harmonic 7: 1859.3



June 15th, 2010 at 3:38 pm
Indeed, this works quite good!
June 15th, 2010 at 3:51 pm
I wonder if SoX is available on the iPhone or Android? It would be cool if one could implement this on a mobile for taking with into the stadium, instead of earplugs!
June 16th, 2010 at 4:14 pm
[...] The most convincing filter prototype for notch filtering is used by sox, as pointed out by Yusuf. It is a simple biquadratic filter based on Robert Bristow-Johnson’s great Audio Cookbook, [...]
June 18th, 2010 at 9:16 pm
Nice findings. Anayway, I have been playing with your values little bit and 3.4q is too damped for me. It sounds like from bathroom. I think that depends on amount of filtering done by your tv broadcaster. For me, values with 10.0q give much better results. Well, they do it for me.
June 18th, 2010 at 10:52 pm
The version that you saw (prior to my latest update) screwed things up. It should theoretically have been better, but it introduced the strange bathroom sound. Please try the reverted settings: play vuvuzela.wav vol 0.9 bandreject 116.56 3.4q bandreject 233.12 3.4q bandreject 466.24 3.4q bandreject 932.48 3.4q bandreject 1864 3.4q
June 19th, 2010 at 12:28 am
I’ve been playing with the values stated here even adding all those harmonics listed and the vuvuzela is still audible. There’s not a noticable difference with the vuvuzela.wav file and these values.
Did any of you get the sound to disappear?
June 19th, 2010 at 12:44 am
That updated setting is not bad at all. The main problem is, that it uses quite a strong filter (3.4q) for quite high number of frequencies. If I understood q-factor setting, lower number means higher damping of given frequency (?). So, if you use those frequencies with higher q-factor, it can make a good job. Anyway, this is just not generally usable for everyone. As every tv does or does not its own filtering, no general settings can be used.
June 24th, 2010 at 8:24 pm
how can I use alsahw,0,0 as input and alsahw,1,0 as output?
with ecasound I did:
ecasound -el:tap_equalizer_bw,-50,-50,-50,-50,0,0,0,0,233,466,932,1864,0,0,0,0,0.1,0.1,0.1,0.1,0,0,0,0 -i alsahw,0,0 -o alsahw,1,0 -c -E “start”