I’m trying to create a macro to apply to a folder of files that will open each file, label sounds using the preset parameters, and save the project (so that I can go and “Export multiple” manually afterwards).
I can’t get the “Save” step to work - I get error warnings because of duplicate filenames, and I don’t know how to get Audacity to give default filenames. Any help would be appreciated.
Yes, so Audacity doesn’t really want to create an Audacity project for each input file. You can could create a macro itemizing each input file and project file:
I need to do this for ca. 238 files. Is there a way to run the macro on the contents of a folder without having to specify the name of each .mp3 file and corresponding .aup file?
But you could use the above to create a script file model, from which you could create a script (macro) file. I haven’t done this in a while, but your ScriptModel.bat might be 4 lines looking roughly like this:
Save that model as ScriptModel.bat in your C:\Users\yourname\Desktop\DataDirectory (where your .mp3 files are located), and use WindowsKey-R, cmd, then cd Desktop and cd DataDirectory to move to your c:\Users\yourname\Desktop\DataDirectory. Type “for %a in (*.mp3) do ScriptModel %a” to create a log.txt file which contains all of your automation. Check it out to make sure everything is spelled correctly, then rename it to MyAutomation.txt and save it to C:\Users\yourname\AppData\Roaming\Audacity\macros. Then start Audacity and run it. (Backup your files first!)
A few words of caution: Before running the full script, test it out and time it with just a few files first just to make sure it is doing everything correctly. And have Task Manager ready already running just in case you decide you need to abort the script while it is running - Audacity macros can be difficult to stop once they get started.
Thanks! The script runs, and it creates the .aup files, but Audacity gives the error message “Connection to project file is null”, and when I open one of the .aup files that is produced, the project is empty. Any idea why this might be the case?