Closing the project from macro

Questions, discussion and recipes for scripting and batch processing in Audacity.
See also the "Scripting" section of the Audacity manual.
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
waxcylinder
Forum Staff
Posts: 14586
Joined: Tue Jul 31, 2007 11:03 am
Operating System: Windows 10

Re: Closing the project from macro

Post by waxcylinder » Sat Apr 10, 2021 11:30 am

steve wrote:
Sat Apr 10, 2021 11:28 am
(I'm not sure if we can update the manual at the moment or if we need to wait for Audacity 3.0.1 to be released).
We can (I can) more on that tomorrow.

Peter.
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * FAQ * * * * * Tutorials * * * * * Audacity Manual * * * * *

steve
Site Admin
Posts: 80766
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Closing the project from macro

Post by steve » Sat Apr 10, 2021 11:37 am

waxcylinder wrote:
Sat Apr 10, 2021 11:26 am
BUT with the old AUP project files from 2.4.2 and earlier for some strange reason (I've forgotten why) the developer who worked on Unitary Project enabled File>Import as well as File>Open to operate on AUP files
It's because .AUP are no longer a "native" project format, so they are imported rather than opened.

waxcylinder wrote:
Sat Apr 10, 2021 11:26 am
I can see that it might be useful for Macros to work on AUP3 projects as well as older AUP ones - so I'll consider adding an ENH enhancement request for this.
That may be a can of worms.

If we support "importing" AUP3 projects, then it could be very confusing when "opening" a project through file association (double clicking on an AUP3 file). Does the project "open", or is it "imported"? We cannot guarantee that users won't change the default double click behaviour, and the difference between "opening" and "importing" when Audacity is not currently running is subtle but important. If the project is "opened", then the database remains open and the AUP3 is the "current" project, whereas if the project is "imported" then the database would be closed after import and it would be a new unsaved project with imported content.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

waxcylinder
Forum Staff
Posts: 14586
Joined: Tue Jul 31, 2007 11:03 am
Operating System: Windows 10

Re: Closing the project from macro

Post by waxcylinder » Sat Apr 10, 2021 12:10 pm

steve wrote:
Sat Apr 10, 2021 11:37 am
If we support "importing" AUP3 projects, then it could be very confusing when "opening" a project through file association (double clicking on an AUP3 file). Does the project "open", or is it "imported"? We cannot guarantee that users won't change the default double click behaviour, and the difference between "opening" and "importing" when Audacity is not currently running is subtle but important. If the project is "opened", then the database remains open and the AUP3 is the "current" project, whereas if the project is "imported" then the database would be closed after import and it would be a new unsaved project with imported content.
I wasn't thinking of allowing 3.0.x to "Import" AUP3 files - that is indeed a can o' worms- in the early stages of UP development Leland allowed that - but it led to big unresolvable issues - that's why we took it away.

I was actually thinking of changing Macros so that they could "Open" (not "Import") a set of AUP3 projects and work on them - probably closing them on completion. This may need another button in Macros dialogs for "Projects" - but I'm thinking the existing "Files" button would do fine.

And ideally the user should be able to apply Macros to a mixed set of projects and audio files.

Peter.
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * FAQ * * * * * Tutorials * * * * * Audacity Manual * * * * *

waxcylinder
Forum Staff
Posts: 14586
Joined: Tue Jul 31, 2007 11:03 am
Operating System: Windows 10

Re: Closing the project from macro

Post by waxcylinder » Sat Apr 10, 2021 12:15 pm

steve wrote:
Sat Apr 10, 2021 11:28 am
It may be worth noting on this page: https://alphamanual.audacityteam.org/ma ... _Reference
in the Intro section, that a few commands are intentionally omitted from the Macro manager (such as "Close:") because they are unsuitable for use in macros.
Done here as you suggested:
https://alphamanual.audacityteam.org/ma ... _Reference

And also here as Msv264 suggested in their point no. 3:
https://alphamanual.audacityteam.org/ma ... os#command

Peter.
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * FAQ * * * * * Tutorials * * * * * Audacity Manual * * * * *

waxcylinder
Forum Staff
Posts: 14586
Joined: Tue Jul 31, 2007 11:03 am
Operating System: Windows 10

Re: Closing the project from macro

Post by waxcylinder » Sat Apr 10, 2021 12:59 pm

Msv264 wrote:
Fri Apr 09, 2021 9:39 pm
2. Also it would help if some text will be added to the description of the interface of the Macro Editor, where batch file processing is explained:
Audacity allows to apply a macro to multiple audio files. Applying a macro to multiple Audacity projects can't be done with a macro, if you wish to do it, you need to use Python scripting.
Done: https://alphamanual.audacityteam.org/ma ... acro#Files...

Thanks for the useful suggestions Msv264 8-)

Peter.
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * FAQ * * * * * Tutorials * * * * * Audacity Manual * * * * *

Msv264
Posts: 13
Joined: Mon Apr 05, 2021 8:08 pm
Operating System: Windows 8 or 8.1

Re: Closing the project from macro

Post by Msv264 » Sat Apr 10, 2021 7:53 pm

Thank YOU very much!
The Audacity is really GREAT system, and if my suggestions helped a little bit, I'm very glad.

Msv264
Posts: 13
Joined: Mon Apr 05, 2021 8:08 pm
Operating System: Windows 8 or 8.1

Re: Closing the project from macro

Post by Msv264 » Sat Apr 10, 2021 8:04 pm

Done: https://alphamanual.audacityteam.org/ma ... acro#Files...

It seems, the text needs a little correction:

A standard File Open dialog box will appear. Choose a directory then you can select one or any number of supported audio files in that directory, including Audacity AUP3 :?: :?: and older AUP project files.

waxcylinder
Forum Staff
Posts: 14586
Joined: Tue Jul 31, 2007 11:03 am
Operating System: Windows 10

Re: Closing the project from macro

Post by waxcylinder » Sun Apr 11, 2021 4:45 pm

Msv264 wrote:
Sat Apr 10, 2021 8:04 pm
It seems, the text needs a little correction:

A standard File Open dialog box will appear. Choose a directory then you can select one or any number of supported audio files in that directory, including Audacity AUP3 :?: :?: and older AUP project files.
I think the AUP file import may remain an "easter egg"

Peter.
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * FAQ * * * * * Tutorials * * * * * Audacity Manual * * * * *

Msv264
Posts: 13
Joined: Mon Apr 05, 2021 8:08 pm
Operating System: Windows 8 or 8.1

Re: Closing the project from macro

Post by Msv264 » Sun Apr 11, 2021 9:05 pm

Yes, but I was talking about aup3. It is a bit early to include it in this list ;)

waxcylinder
Forum Staff
Posts: 14586
Joined: Tue Jul 31, 2007 11:03 am
Operating System: Windows 10

Re: Closing the project from macro

Post by waxcylinder » Mon Apr 12, 2021 7:18 am

You can't Import the new AUP3 - and thus you can't work Macros on projects (except the current open, active, one).

And right now there are no plans to allow this.

Peter
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * FAQ * * * * * Tutorials * * * * * Audacity Manual * * * * *

Post Reply