Applying noise reduction in a macro to multiple files

So I know you can batch apply a macro to multiple files but the issue I have is part of my macro is a noise reduction, which means I need to select a piece of the audio with just background noise to get the noise profile and then run the macro and do this individually on what is usually at least 30 one hour long files (which means import, noise profile, then apply macro) individually 30 times. Is there a way to do batch macro application when there is noise reduction involved?

Scroll down to Using Noise Reduction in a Macro.

https://manual.audacityteam.org/man/noise_reduction.html

There is a magic trick to this auto profile thing. I read the instructions several times and I can’t quite get it.

I know Noise Reduction will not forget a Profile as long as Audacity is running. That can be handy.

As we go.

Koz

I see, so it seems making a recording of just room ambient noise, naming it 000, and then putting in the folder with the rest of the files should work. Thanks.

Edit: Unfortunately I’m running into a separate issue. The files I’m importing audio from have two separate audio tracks. I always import track 2 into audacity but I have to “select the track” on import every time so it will always stop and ask in between every file’s macro and I can’t figure out a way to automate that.

Edit 2: Hm it also gave an error message at the end of the macro that the sample file needs to “match” the file being processed. I could create a 2 track blank audio but then I’ll still have that same problem.

If I recall correctly, when I last used Noise Reduction in a Macro on Windows, I named the file “!000.wav”. That was a long time ago, and different OS’s treat the “!” character differently for sorting. Whatever name you use, just check that your OS lists it before any of the actual audio files when sorted by name.

Also, ensure that you restart Audacity before running the macro (to be sure that Noise Reduction does not have a noise profile when the macro starts).


Alternatively (and I generally find this simpler), manually get the noise profile before running the macro. This also allows you to set the other parameters.

Hello openclosed2. I achieved this earlier this year with a small DOS BATch file; I will dig up the details if you are interested.
Cheers, Chris

If you can find it that will probably be helpful, thank you. Though I may still run into the issue of it prompting me about which audio track to import.

Openclosed2, my apologies for the delay; despite being retired, my life is still not my own(grin).

Attached is a small ZIP file; please let me know that you can/cannot read it.

I grabbed the two files from a grandfathered archive, so I offer no guarantee that they will work right off the bat, but they should give you an idea of how I approached the solution of processing multiple, and variously-named, audacity files (WAV, FLAC, MP3 etc)

(1) Back in February I restricted myself within Audacity, to Audacity macros, and preferred not to look at the other options available to me (Nyquist et al.).
(2) Audacity macros do not support parameters, so my solution forced the audacity macro(s) to use specific filenames.
(3) I solved that constraint outside Audacity by implementing DOS BATch files which moved a series of files to and from the fixed file names for Audacity.exe.
(4) Truth is there were at least two batch files, I recall, one batch file to process an individual file and send it to and from Audacity, and one batch file to loop through a series of files in a DOS FOR loop, issuing each file in turn to the first batch file.

If you think that this approach might be useful to your situation, please let me know and I will resurrect the files, re-test them, document them, and turn them loose.

I know that the process worked well for me at that time. I was looking for time-savings in the form of minimizing errors of processing, so it did not matter to me that it took (say) one minute to process each one of 17 or 83 files; I could go away and do something useful and return to find that every one of the *.FLAC files had been processed while I weeded the vegetable patch.

I suspect that the two files in the ZIP file may be useful only for getting some idea of the process; I would encourage you NOT to spend time trying to get them to work; I can probably do that quite quickly once I know that you are interested in this approach.

Cheers, Chris
20220906_1014.zip (1.51 KB)