Processing long tracks with DeClicker.ny

Hi Steve, thanks for all your input so far.

I’m not sure what you are asking works reliably. The code that you pasted certainly works fine, it fades out chunks of the file, works perfectly, chunk by chunk. The De-Clicker also works fine as long as I don’t give it too big a chunk of audio to work with, in which case it falls over.

If you could point me in the way to go to to get De-Clicker to work in the macro instead of the fade, that would be awesome.

FYI I note that in the ‘regular’ part of the Audacity menu, there is also a click removal option, and I remember that I went searching for the extra plugin a few years back, but I don’t remember why, perhaps because the clicker wasn’t in Audacity at that time, perhaps because it didn’t perform as well.

The one I use does work very well, but maybe a year ago an Audacity update or something else made it fail on longer tracks, and I had to remove it from the macro that I use to clean up audio.

OK, this is what I’ve got:

1. A plug-in called “Loop Processing”.
Loop_Processing.ny (2.43 KB)
This plug-in needs to be installed. It will appear in the “Tools” menu. (Note that recent versions of Audacity require Audacity to be restarted after plug-ins have been added).

This plug-in has two “modes” (effectively it is two plug-ins in one).

  • Analyze: This mode measures the length of the focused track and calculates the length of each section.
  • Select: This mode selects a region of the track.

The only other control sets the number of sections.
Note that this control is only used when analyzing.

2. A macro script

The plug-in must be run in “Analyze” mode first.
Then, before the required effect can be applied, the plug-in is run in “Select” mode.

The whole macro would look something like this - note that in this example the effect is being applied to 4 sections (quarters of the track length).

LoopProcessing:mode="Analyze" num="4"
LoopProcessing:mode="Select" num="4"
LoopProcessing:mode="Select" num="4"
LoopProcessing:mode="Select" num="4"
LoopProcessing:mode="Select" num="4"

and here’s an example macro that applies the “Adjustable Fade” effect to quarters of the focused track.
loop process.txt (534 Bytes)

Hi Steve, I just wanted to come back to you (after I took an age to dig out my password to be able to comment) to say thanks so much for this, it works perfectly, it’s exactly what I needed!

Hi Steve, many thanks again for the work above.

Unfortunately, since an Audacity update the Loop Processing plugin makes it (Audacity) crash. I can’t find where you got the plugin (google is no help), can you tell me where it comes from, and if you know of an updated/alternative version?

Thanks Again


I’m unfamiliar with the Audacity macros. If it helps, I use MacroScheduler + DeClicker to handle my tasks now. The only caveat being that MacroScheduler is Windows-only.

The script is:

//80 ms delay so Audacity crashes less often
SetFocus>[name of Audacity project]
//Holding shift while scrolling with the right arrow key to highlight the track area; 1-second intervals
press shift
release shift
//My Declicker shortcut is Alt-A; this will open Declicker up via the shortcut, confirm the Declicker selection, wait however many seconds for it to run, pause 2 seconds, and repeat the entire process
press alt
release alt
Press Enter
Wait>[number of seconds]
Press right

That being said, you may already know this, but you really only need one pass with Declicker in most cases. I use the same setup as here but reduced the number of passes to 1, drastically saving time and improving the overall sound quality with more or less the exact same degree of click removal.

Thanks for your input. I think you mistook my need from above.

I want to only do one pass with the de-clicker, but if I try to process the whole file in one go, (c1 hour) it will crash. The Loop processing plugin above was intended to select the first 10% of the file, run the declicker on it, and repeat once for each tenth of the file.

This meant 10 much shorter declicker runs, which didn’t cause crashes.

Unfortunately now with a new Audacity update, theis Loop processor crashes Audacity instantly.

I’ve just noticed that the Loop Processing is now working again normally, I think that a minor Audacity update may have fixed the issue.