Page 2 of 3

Re: Problems in Directories setting

Posted: Thu Jan 03, 2019 1:11 pm
by steve
waxcylinder wrote:
Thu Jan 03, 2019 11:24 am
Steve: since Export2 is likely yo be a useful tool for Macro users - should we consider adding a bit about it in this page:
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/ma ... _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.

Re: Problems in Directories setting

Posted: Thu Jan 03, 2019 1:26 pm
by waxcylinder
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.

Re: Problems in Directories setting

Posted: Thu Jan 03, 2019 2:27 pm
by steve
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)

Re: Problems in Directories setting

Posted: Thu Jan 03, 2019 3:22 pm
by waxcylinder
steve wrote:
Thu Jan 03, 2019 2:27 pm
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)
In which case the default proffered when initially setting up is very misleading
Export2.png
Export2.png (52.24 KiB) Viewed 112 times
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/ma ... _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 :?

Peter.

Re: Problems in Directories setting

Posted: Thu Jan 03, 2019 4:17 pm
by steve
waxcylinder wrote:
Thu Jan 03, 2019 3:22 pm
So do where should we document this - on the Macros page, on an appropriate Export page, both?
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.

Re: Problems in Directories setting

Posted: Thu Jan 03, 2019 4:22 pm
by waxcylinder
steve wrote:
Thu Jan 03, 2019 2:27 pm
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)
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
Export2-2.png
Export2-2.png (46.7 KiB) Viewed 110 times
Peter.

Re: Problems in Directories setting

Posted: Thu Jan 03, 2019 4:29 pm
by waxcylinder
steve wrote:
Thu Jan 03, 2019 4:17 pm
waxcylinder wrote:
Thu Jan 03, 2019 3:22 pm
So do where should we document this - on the Macros page, on an appropriate Export page, both?
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).
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 ...

steve wrote:
Thu Jan 03, 2019 4:17 pm
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.
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.

Re: Problems in Directories setting

Posted: Thu Jan 03, 2019 4:41 pm
by steve
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.
waxcylinder wrote:
Thu Jan 03, 2019 4:22 pm
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.
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?

Re: Problems in Directories setting

Posted: Thu Jan 03, 2019 5:17 pm
by waxcylinder
steve wrote:
Thu Jan 03, 2019 4:41 pm
waxcylinder wrote:
Thu Jan 03, 2019 4:22 pm
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.
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

Re: Problems in Directories setting

Posted: Thu Jan 03, 2019 5:21 pm
by waxcylinder
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