The post that you linked is from 2014, is there a link deeper into the thread to a later version?
I’m processing a track that is 49 minutes
44.1k
one of two tracks in a wav file that I have imported into Audacity (originally recorded using Voicemeeter)
It has previously had filters Noise Reduction, Change pitch, de-esser run on it
De-clicker default settings running
It starts off with a remaining time of about 5 minutes
The remaining time ticks down more slowly than the elapsed time ticks up
When it says about elapsed 3.05 and remaining 3.45, the dialog with the fill bar disappears, there is no error message, and the track has not been edited and the De-Clicker is not visible in the Undo option, the previous action is.
OK, I can reproduce the problem with a 1 hour stereo track.
Debugging the issue shows the cause of the problem:
The maximum number of sample blocks has been
reached, so audio computation must be terminated.
Probably, your program should not be retaining
so many samples in memory.
I think it’s highly unlikely that the plug-in developer will fix the issue, and the code is absolutely horrible so I have no intention of fixing it for him. As a workaround, you could try this macro: DeClick_5_audio_clips.txt (1.62 KB)
To use the macro, first split the track into 5 clips (add 4 “split lines” at roughly equal intervals: https://manual.audacityteam.org/man/edit_menu_clip_boundaries.html)
Then run the macro.
Then wait … and wait … and wait … and wait … and wait …
(I’m assuming that it will work, but I’m still waiting for it to complete)
My original idea was to process it in n regions by programatically selecting the first 1/n of the track, then the second and so on, and processing each separately. Is there any way to select like that in a macro?
There’s no easy way of doing that. It is “possible”, but you would need to write two Nyquist scripts (see https://manual.audacityteam.org/man/nyquist.html), one to analyse the track and work out the times of the selections, and another to make the selections, then incorporate those two scripts into the macro.
It could be. Audacity prioritises the audio processing over updating the waveform. The waveform should be fully updated once the macro has completed.
My test is now on the final clip so I’ll be able to say if it has worked here in a couple of minutes.
I imported and tested the macro you uploaded, it is definately doing the operation 5 times on the first clip, and not on any of the others. I tested it by changing the code to this:
You will need to update Audacity. I’ve just tested with Audacity 3.2.0 and I can reproduce the problem.
I’ve also tested with Audacity 3.2.2 and it works correctly.
Here’s a fast version of the macro script for testing. It applies a “fade out” to each of the 5 audio clips: quick-test.txt (281 Bytes)
Thanks for all your dedication. I’m on version 3.2.3 and the quick test is happening to the same first clip 5 times, giving an error each time that says, “Fade Out: Could not load settings below. Default settings will be used”.
This is weird. I thought that it was just a problem in an old version, but on further testing I’m getting inconsistent results regardless of the version. Sometimes it works and sometimes it doesn’t, but I don’t see any pattern as to why it works sometimes but not others.
After testing with multiple versions, the only version I have that it’s working reliably and consistently with is Audacity 2.4.2 (the version that I use for production work).
I’ll need to do more testing tomorrow, but it’s looking like a “race condition” bug in multiple versions of Audacity.
I’m not sure what more I can suggest. Audacity is failing to process the macro correctly, which is a regression against much older versions. It bothers me greatly that Audacity has become unreliable when processing macros.
If you or anyone else can suggest a way to select a dynamic way to select a portion of the track (say the total length/n) rather than a fixed value, I would be happy to work with that.
If your “filter” was a built-in effect or any type of plug-in other than a Nyquist plug-in, then this would be simple to do in Nyquist with something like this:
(You can try running this code in the Nyquist Prompt - see: https://manual.audacityteam.org/man/nyquist_prompt.html)
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.
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).
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!