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
The test file can be downloaded here.
My starting point for this was a post by Russell Beattie, where he describes his attempts at using SoX.
You can test both approaches (using an equalizer vs. using a band-reject filter), and I think the latter does a better job. I also used slighty more accurate frequencies as suggested here and added an additional lower resonant frequency at 116.56 because I could still here a faint toot.
Russell chose to use Octave to define the width around the central frequency that is removed (.1o), whereas I prefer using the Q-factor as did the original German Blog post on this subject (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
8 comments:
Indeed, this works quite good!
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!
[...] 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, [...]
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.
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
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?
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.
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"
Post a Comment