Legacy macro-output folder

Since Audacity 3.0.2, when batch processing with Macros, the macro-output folder is no longer placed in the same folder as the imported files.

For users that want the old behaviour, I wrote this plug-in to emulate the old behaviour.
This plug-in requires Audacity 3.0.0 or later..

Latest version: LegacyMacroOutputFolder.ny
(updated 23/11/2021)

To use the plug-in, add it anywhere before the Export command in your macro, like this:

It searches for the last file imported (which must be the file that the macro will process), and sets the macro output folder for that directory.
This will slightly increase the time to run the macro - more so if the “Recent files” list does not have many entries.
When installed in Audacity 3.0.0, it does nothing as 3.0.0 still has the old behaviour, so nothing needs to be done by the plug-in.

Does this still work with the 32 bit Windows version 3.0.3? It seems to be putting my macro output back in Documents > Audacity.

The current version of Audacity is 3.0.4.

I’ve just tested and the “Latest version” of LegacyMacroOutputFolder.ny works with Audacity 3.0.3 (32-bit and 64-bit).
(It works with all versions from 3.0.0 to 3.0.4 inclusive)


Does LegacyMacroOutputFolder.ny still work in v3.1.0? It appears to be ignoring the settings in the macro now.


I’ve just tested in Audacity 3.1.2 and it’s not working there. It seems that something has changed in Audacity to stop this plug-in working.

Short answer, no. The plug-in was written for Audacity version 3.0.x only.

I’ll take a look to see if it can be adapted for Audacity 3.1.x.

Steve, It is still working for me in 3.1.2 64-bit. I have not tried it with the 32-bit version.

I was expecting a few more 3.0.x versions before they bumped Audacity to 3.1.x, so the version checking is a bit off in the plug-in. I’m surprised that it is working for you with 3.1.2, but maybe you have a slightly different version of the plug-in.

I’ll be posting a new version shortly that should be safe for any version of Audacity (but will throw an error with 3.0.1 as that was not a public release and should not be used). I’d appreciate it if you could give the new version a good test when I’ve posted it.

Here’s the new version:
LegacyMacroOutputFolder.ny (3.35 KB)

Oh welcome back LegacyMacroOutputFolder.ny. We missed you!

Works perfectly

Many thanks Steve. Much appreciated!


Cannot proceed to export if path contains accented characters.
Path 1) /home/pierre/Documents/AudioLivres/Temp/TestExport/002_Quatrième_de_couverture.wav
Path 2) /home/pierre/Documents/AudioLivres/Temp/Testé_Export/002_Quatrième_de_couverture.wav
Path 1 succeed while Path 2 result in error because char “é” :
/home/pierre/Documents/AudioLivres/Temp/Test__Export/ does not have write permissions.

;nyquist plug-in ;version 4 ;… ;name “Legacy Macro Output Folder” ;author “Steve Daulton”;release 3.1.2
Audacity 3.1.3
cat /etc/debian_version 10.9
Linux vgn-ns21z 4.19.0-16-amd64 #1 SMP Debian 4.19.181-1 (2021-03-19) x86_64 GNU/Linux

LegacyMacroOutputFolder.ny is very useful for audio data book management.
Thanks in advance for your help. Regards, Pierre

More precisely, path/filenames must be ASCII. Nyquist does not support Unicode.

1 Like

What about using “Nyquist UTF-8 ToolBox” from
Would you have time to take a look at it ?
Regards, Pierre

Interesting find. I’ll take a look at it.

“Nyquist UTF-8 ToolBox” is very old (2010).
It seems that mostly “Nyquist UTF-8 ToolBox” is not required as most of the functionality is already built into the current version of Nyquist.
Unfortunately it does not help in this case.

The plug-in works by looking for the last item in the list of “[RecentFiles]” (from audacity.cfg).
It does this by calling:

(aud-do "GetPreference: Name=RecentFiles/file<number>

where is a number from 01 to 12, and the last non-empty value is used.

The problem is that from "(aud-do “GetPreference: …”, Audacity returns the preference value as an ASCII string. Audacity has already stripped out non-ASCII characters and replaced them with underscores, so there’s no way that Nyquist can determine the UNICODE string.

1 Like

This thread popped up in this Newbies “New Posts” list this lunchtime; If I am off-topic, please let me know and I’ll start a new thread.

I am producing a series of “chapters” of audio from hard copy text. I set up a new (Win10) folder for each chapter, as in MD 082, MD 083, MD 084 under the parent folder of the book. I record my WAV files page by page in the appropriate folder.
I was delighted to find yesterday (thanks Steve!) that the exported track from a macro drops into a folder “macro-output” within my chapter folder, that is:- “L:\BachAlbertSchweitzer\096\macro-output”

I had mistakenly thought in Edit, Preferences, Directories, that the path “Macro Output” would be a local folder for macros that I created while editing macros in Audacity.
I had already learned that the macros are stored in text form in my “C:\Users\Chris075\AppData\Roaming\Audacity\Macros”

At some time, might the “Edit, Preferences, Directories, Macro Output” be relabeled in such a way to indicate that the directory is an address for where “files exported from macros” will be found, rather than the possible mis-interpretation of “the place where your newly constructed macros” will be found?
I add that I like the current situation, because I PKZip the local folder as an archiving method, so my original WAV files, the Aup3 project file, and now my concatenated file(s) are all living under the same roof, and are ZIPped into the one file. :clapping:


One of our old team was very keen on verbose explanatory text in dialogs. I used to joke that he probably relabled the “Volume” control of his audio amp to: “Output level control. Rotate clockwise for louder, or ant-clockwise for quieter. Minimum 0 (silence), Maximum 320 degrees (very loud)”.

Instead of verbose explanatory text, we try to make short labels as easy to understand as possible, and put the explanatory text (if required) in the manual: Directories Preferences - Audacity Manual

I understood your explanation, thank you. But old behaviour, macro-output folder placed in the same folder as the imported files, would be much appreciated for audiobook production. Is there an alternative for languages where unicode is needed, like french ?
Could we expect a new option for that in “Edit, Preferences, Directories, Macro Output” dialog ? In other words why old behavior was discontinued ? Should I post to “Adding Feature to Audacity” forum ?

There’s no easy alternative.

I did post a feature request to Audacity’s GitHub: Improvements to macro-output folder · Issue #2168 · audacity/audacity · GitHub which would provide the options that you want.

You could write to the development team on discord and request that at least this part of the GitHub issue is implemented:

Rather than having a fixed folder as the default location for the macro-output folder, use the folder that the selected files came from by default.

Here’s the Audacity discord: Audacity
(You may need to try later or tomorrow as the discord server seems to be having technical problems at the moment)

The download link is not working anymore :frowning: