Problems in Directories setting

Setting Directories seems not to work properly. Audacity 2.3.0 and Windows 10.

Is there any way to set the export location? Should the Directories setting also set the export location?

What I really would need is a separate directory setting for exporting using a macro. When I do manual export once and select the save location to a network directory, everything works perfectly and the save location is remembered for the current session. However, doing “Export as FLAC” in a macro, export location is always C:\Users\My_account\Documents\Audacity\cleaned. This location does not change when I change the Directories setting.

This because what a Macro does when working on a file or set of files that you give it to process to produce exports, is to create a folder called cleaned in the same file location that your files to be processed came from.

In your case the file input files would have been in C:\Users\My_account\Documents\Audacity - when I tested I processed a WAV file on my desktop and ended up the e “cleaned” folder on my desktop containing the FLAC file.

As far as I know there is no way to change the target location for Macro exports.


I will discuss these issues with the developer who worked recently on the Macros


WC

Ok, I can change the Directories setting to my network folder (something strange there, though). This would be fine for now.
When exporting with macro, I get a confirmation pop-up window. Any way to get rid of that?

I couldn’t do that when I was testing - how did you achieve that ?

I don’t see a confirmation pop-up - what’s it asking you to confitm? Can you post a picture?

Thanks for this report by the way, much appreciated - it’s led me to realize that our Manual is less than helpful in not talking about the “cleaned” folder and its location. And incorrect in what it says about the naming of the macro-exported files. And there may also be a bug (also discussing this with the developer).

WC

Attached the confirmation screenshot. Or maybe it is called information pop-up.

Concerning the Directories preference, when I change the folder, restart Audacity, record something and save project, Audacity still proposes the original Directories folder.
Confirmation.jpg

Yes, the “i” shows it be information not error - it’s telling you where it stored it.


Are you talking about normal exports from the app - or exports made from a Macro ?

Audacity has a settings file called audacity.cfg which “remembers” the last “Export Audio” settings you had for directory and file type - and proffers those on the next Export Audio even if you close and restart Audacity.


As you’ve found out exports in Macros ignores that setting and uses the “cleaned” folder in the source audio file location.

However when yo do this the Macro does overwrite the settings in the audacity,cfg so the next time you make an Export Audio from Audacity you will be proffered the “cleaned” folder that the Macro used and the filetupe that the Macro used. I think this is a bug and I am discussing this with the developer involved.

Peter

I am setting up a recording system for music rehearsal. I want to use only three buttons with a Bluetooth device, one to start recording, one to stop recording, and one to store the recording to a network folder in FLAC format. Network folder is the easiest way in my system to play the recordings.

All this is working, except that the information pop-up needs one extra button press. I did not find a way to add that in the macro. Another challenge is the directory setting. Would be nice to have the working directory in the local drive and only store only the FLACs in the network drive. Easy solution would be to have the target directory as a parameter in the “Export as FLAC” macro command. And have a silent mode (without the information pop-up screen) as a default or as a parameter.

In Audacity 2.3.0, there is a command “Export2” which allows you to specify the file path and file name.

Ah yes I see what you mean, it took me a bit of testing but I can now reproduce this - I will ask the developer about this.

The problem is: without the message, how will a user know where his file was exported to ?


A workaround for you based on your workflow…

\

  1. Launch Audacity
  2. Save the empty project under the target name you want in the target location for you FLAC output
  3. Record
  4. Stop
  5. run your FLAC export Macro
  6. the output FLAC file will sit in a “cleaned” folder alongside the empty project
  7. Close Audacity without saving the project
  8. Delete the temporary project

Just be aware if you
7) Record
8) Stop
9) run your FLAC export Macro
10) the output FLAC file overwrite the one you created at Step 6 - this is, I believe, a “feature” of Macros to avoid getting an interrupt message to confirm the overwrite

You could either create a new temporary project each time, or decide that you will always use the same project name and location and just open that empty project each time - just be careful to ensure each time that you move out your created FLAC to a safe location to avoid the overwrite on the next use.

I’m not sure how well this will work because you are working with a network folder - whist we are quite happy for Audacity to export to network folders - it may not work so well in real-time recording a project to the network folder - worth a try though on a noncritical test recording

Peter

Ah, so there is …

Does it let you specify the output file format - I can’t see a field for that - or does it infer the file format from the file extension that you specify in theFile Name field?

Update:
I see from the Manual:
Export2: Exports to a file. This version of export has the full set of export options. However, a current limitation is that the detailed option settings are always stored to and taken from saved preferences. The net effect is that for a given format, the most recently used options for that format will be used.


But we only appear to document that in the obscure locations of Scriptables:
https://alphamanual.audacityteam.org/man/Extra_Menu:_Scriptables_II
https://alphamanual.audacityteam.org/man/Scripting_Reference

A simple user of Macros would find that pretty hard to find (like me)


Steve: since Export2 is likely yo be a useful tool for Macro users - should we consider adding a bit about it in this page:
https://alphamanual.audacityteam.org/man/Macros

Peter.

I think we need a lot more documentation about Macros and Scripting. Currently we have bare bones reference material, and not much more, but it is still very early days for Scripting.

(One thing that I’d very much like to see is for the Macro “Select Command” screen to provide an easier way locate commands, such as “auto-complete” when typing in the name of a command, or “command filters” so that you can select from a smaller sub-set of commands. It can be a pain trying to find a specific command, especially if you are unsure of the exact name.)

This page https://alphamanual.audacityteam.org/man/Scripting_Reference should not be seen as an “obscure location” for people working with Macros. It is an important reference page for both Scripting and Macros.

Well I just cant’ get Export2 to work in a Macro - nor, if I turn on the Extra menu, get Extra>Sciptables11>Export… to work.

I get two consecutive error (Information) messages
Cannot export audio to exported.wav
Could not export to WAV format

and that is after I have already carefully exported a WAV file to my …>Audacity>Test folder with Export Audio to get the parameters set for the Export2


Is this a bug - or am I doing something wrong.


Update: I see what may be part of the problem - it looks like the Extra2 command my be trying to save direct to my C:\ drive, which Windows blocks for me - I discovered this by remaking an Export Audio command immediately after the failed Export2 - and noting that my previously set export location set with the prior Export Audio had been set to filepath C:\ and filename untitled

Peter.

When using Export2, you have to give the full file name (including path and filename extension).
Example:
“C:\Users<username>\Desktop\my file.flac” (this works)

Not: C:\Users<username>\Desktop\my file.flac (the file name is not quoted)

Not: “my file.flac” (no path given)

Not: “C:\Users<username>\Desktop\myfile” (no file extension)

In which case the default proffered when initially setting up is very misleading


And I don’t see anywhere where we document that about the pathing

So do where should we document this - on the Macros page, on an appropriate Export page, both?

And anyway this seems to run counter to what it says on: https://alphamanual.audacityteam.org/man/Scripting_Reference
in the Export2 box where it says:
Exports to a file. This version of export has the full set of export options. However, a current limitation is that the detailed option settings are always stored to and taken from saved preferences. The net effect is that for a given format, the most recently used options for that format will be used.

Or maybe I’m not understanding what that is trying to say :confused:

Peter.

Before we rush off to “fix” this, there are similar problems with many of the scripting commands. For example, have you tried changing Preferences via the scripting commands? (it works, once you’ve worked out the exact syntax to use).

As I hinted at earlier, the problem is that we now have dozens of new commands, and only very basic reference material documenting them. I think we need a lot more documentation for the Scripting commands. Also, I’m not sure that these new commands are set in stone or still subject to change.

OK - so NOW I can get it to work

I do get a confirmation message of where the file is sent to, which must be dismissed by clicking the OK button - which the original poster, Jutzi, won’t like, as it doesn’t suit his workflow described earlier in this thread.


And for clarity of Steve’s instructions here for others who may read this and want to use Export 2

The quote marks around the file pathing are supplied by Audacity once the Export2 command has been edited in setting up or edoting the Macro

When entering the pathing data in the edit parameters dialog for the command you don’t put the quote marks i.e.
C:\Users<username>\Desktop\my file.flac


Peter.

It just seems to me that the Export2 is such a basic and useful command for users of Macros - that we should document at least that one (and for 2.3.1)

The Macro Export section needs some tidying up anyway …


My understanding from James is that Scripting is still experimental (and a little bare-bones) and not for the inexperienced or gain-hearted at this stage. As far as I am aware he plans to provide more documentation later (plus probably, further development).

Peter.

If you create or edit the Macro file directly (in a text editor), then you need to include the quotes yourself. Similarly if you access the command via a scripting language (such as Nyquist, or Python via Mod-script-pipe), then you need to include the quotes.

If you are entering the path/file name via the Macro GUI, then Audacity adds the quotes for you.

but the confirmation message only occurs once, on completion of the script, even if you export multiple times with the Macro. That shouldn’t be a problem when batch processing (it’s good to know whether the batch completed successfully).

If you don’t get the confirmation message, how will you know that the file(s) have been successfully exported?

But look at Jutzi’s workflow

I am setting up a recording system for music rehearsal. I want to use only three buttons with a Bluetooth device, one to start recording, one to stop recording, and one to store the recording to a network folder in FLAC format. Network folder is the easiest way in my system to play the recordings.

All this is working, except that the information pop-up needs one extra button press. I did not find a way to add that in the macro.

It’s not a macro for processing a lot of files it’s a macro for a one-click export to FLAC in a slick 3-button workflow on an unsaved project

  1. Record
  2. Stop
  3. shortcut key to invoke FLAC export


    What Jutzi doesn’t want is the ectra OK button to press - and there is no way to dismiss/acknowledge that OK via a Macro …

Peter

But hopefully we may have solved Jutzi’s problem with directory setting

Another challenge is the directory setting. Would be nice to have the working directory in the local drive and only store only the FLACs in the network drive.

via the Export2 command …

Peter