Notch filter problem

I can’t get the Nyquist Notch Filter plug-in to show up in Aud 1.2.6, under OS X 10.3.9

Until recently I was digitizing LPs happily, with the Notch Filter plug-in doing a good job of removing the 100Hz component which is the main bane of my analog system here in the UK.

Then I upgraded to Aud 1.3.something and had loads of problems, so I’ve now deleted that and re-installed Aud 1.2.6. But now I can’t get the Notch Filter to turn up in the Aud effects menu. It’s in the Plug-ins Folder in my Audacity Folder under Applications, and I’ve restarted Audacity repeatedly and even restarted the laptop itself.

Any suggestions gratefully received.

Is it possible that you have more than one Audacity folder now that you’ve had two different versions installed? I have both versions installed in two different folders, so when I want to add plug-ins I need to add it to both folders. Perhaps you’ve added the .ny file to the wrong Audacity folder?

I don’t know much about the Mac file structure though, so this might not actually be a problem.

For future reference, there is no need to uninstall Audacity 1.2.6 when you install 1.3.4.

Thanks for the suggestion. Turns out that all I had to do was put the plug-in NOT in the Plug-ins Folder but in the Nyquist Folder. Which is slightly odd because

  1. The instructions say put it in the Plug-ins Folder
  2. When originally downloaded, the Plug-ins Folder is full of files of type .ny, while the Nyquist Folder is full of files of type .lsp, so why wouldn’t NOTCH.NY go in the former rather than the latter?
  3. I could swear that in the good old days of a few weeks ago, before I started developing Audacity problems, I had NOTCH.NY in the Plug-in Folder, working fine, and not in the Nyquist Folder.


What steps have you taken to make it so you don’t need the notch filter in the first place?

Most HiFi systems hum when a phonograph is connected because phono amplifiers have significant boost at 100 (and 120). They’re a natural for causing problems. That’s why all successful phono amplifiers have an extra grounding wire for connection to the phonograph and all analog phonographs have an extra thin black grounding wire. Failure to connect this wire always causes hum problems and it’s a different hum than would result if you simply had a bad shield on an audio cable. You need both.

Have you gone through the exercise of flipping the power cables over if you can? I have an older FM tuner that will plug in to power both ways and hums one of them but not the other.

The fact that the 100 notch is useful to you means that there is a significant 50 Hz problem there, too, but the speakers just don’t show it to you. It won’t all go away, either because there is also 150 and 200 there as well. It pays handsomely to get rid of the hum in the first instance.


Trouble shooting.

Launch Audacity fresh and click once inside the red record meters. They will wake up and start operating without putting Audacity into full record mode. If you select your turntable but don’t play a record, the meters should bounce in the -50 range. Even that isn’t all that good, but that will produce an OK recording. I’m guessing your noise level is going to be far worse than that. Start wiggling cables and changing things around until suddenly the noise level and bouncing audio meters drop.

It’s possible the connection between the computer system and the sound system may be at fault, or even more basic, the sound system may hum without the phonograph connected. Break the system down into parts and test each one and then combinations.

Clean the computer connection which is usually a 3.5mm stereo plug. Rub with an alcohol moistened paper towel and then dry with another paper towel. Reconnect and turn slightly to make sure of firm connection. Turn each RCA slightly in its socket to make sure the collar on each RCA is firm.

People listened to records for years in houses with bad or no grounds on their power and if they could make it work, so can you.


Oh, and don’t fail to test things because “It can’t possibly be that.” I got rid of pretty serious hum once by disconnecting the FM roof antenna. One serious buzz problem was solved when I pulled out the broken power supply on my computer networking distribution switch.


One more. I have lived in two houses where the mains wiring has been messed up. I think the British version of a cheap tester is something like this…


<<<—below this line--------------
;nyquist plug-in
;version 1
;type process
;name “NotchFilter[+]”
;action “Yeah! I’m working!!!”
;info “lesser Q digs a deeper notch. greater Q shallower one.”
;control nfq "fq " real “Hz” 100 0 23000
;control nq "Q " real “hrd / sft” 50 1 100
(if (arrayp s) (vector (notch2 (aref s 0) nfq nq) (notch2 (aref s 1) nfq nq)) (notch2 s nfq nq))
—above this line---------------->>>

I need to try this when I get time from mowing the lawn and washing the car. Maybe after dark. Are you sure about that “Q” thing. In electronics, the “Q” or quality of a tuned circuit goes up the more sharp and selective it is, not the more sloppy.

From the code, this will affect both 50 and 100, right?

As another possibility of a filter instead of using the notch is Noise Removal. Properly applied, that filter will take 50 and all the evil harmonics out of the music and leave most of the show alone.


Q is the width of the notch. The greater the Q value, the narrower the notch.

No, just one selected frequency. The default frequency in that script is 100Hz and a Q of 50.

Seems that volta is not too happy about you copying his script koz.
Here’s a version that is freely available:

;nyquist plug-in
;version 1
;type process
;name "Mains Hum Removal"
;action "Applying Filter"
;info "Released under terms of GNU Public LicensenHigher Q gives narrower notch"

;control location "UK 50Hz" int "US 60Hz" 0 0 1
;control q "Notch Q" real "Q" 4.0 0.2 24.0
;;the above two lines create our controls to input the values
;;for our variables location and q (width)

(setf freq (cond
; set to 50 Hz for UK
((= location 0) 50)
; set to 60Hz for US
((= location 1) 60)))

;;Nyquist represents stereo tracks as an array
;;so we test for an array
(if (arrayp s) 

;;apply to stereo track
(vector (notch2 (aref s 0) freq q) 
(notch2 (aref s 1) freq q))

;;otherwise apply to mono track
(notch2 s freq q))

If you prefer, you can download it from
The plug-in is called MainsHumRemoval.ny
When installed it will be listed in the Effects menu as “Mains Hum Removal”

It is extremely simple to use - just select “UK 50Hz” or “US 60Hz”
The default Q is set to 4 which should work pretty well without taking out too much of the recording, but can be varied between 0.2 and 24.
Q set to 0.2 is a very wide “notch” that will take out a lot of bass along with the hum.
Q set to 24 is a very narrow notch, but may miss the hum if the frequency is not spot on 50/60 Hz
Q set to 4 will apply a significant reduction to a range ± about 4Hz either side of the centre frequency.

Yes indeed - that would be my preferred method (after reducing the noise at source as much as possible first), however, if there is a lot of noise, I find that if I can remove some of it with filtering, then the noise removal effect can do a better job with what is left.

One thing to note with simple filters like these is that it will slightly boost the remaining signal, so if the audio goes right up to 0 dB, it is a good idea to drop the level a little before filtering so as to avoid clipping.