store default audio export settings in ".aup"-file

Audio software developers forum.

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

store default audio export settings in ".aup"-file

Permanent link to this post Posted by qwertquadrat » Wed Mar 08, 2017 12:53 am

Hello everyone,

Can ".aup"-files contain default audio export settings? So when I open the file and click on "Export Audio...", these settings (file type, path etc.) are suggested as default values? If not, is the information about those default values stored elsewhere and can one edit them safely?

qwertquadrat

PS: The question results my attempt to program a Blender Addon which allows me to open a sound file from Blender in Audacity via an "Open in Audacity"-Button. After pressing that button, an .aup file is created and opened which contains a link (via <import>) to the sound file and text markers that also exist in the Blender project (via <labeltrack>). After editing in Audacity is done, one shall click on "Export Audio..." and save the audio to the path in which the .aup file is (therefore the question; I try to automate that process as much as I can). My Blender Addon then reads the saved audio and replaces the old audio with the new one. This project is the simplified version of a project I wrote about earlier ( viewtopic.php?f=21&t=94360 ).
qwertquadrat
 
Posts: 14
Joined: Wed Dec 28, 2016 8:21 pm
Operating System: Windows 10

Re: store default audio export settings in ".aup"-file

Permanent link to this post Posted by Gale Andrews » Wed Mar 08, 2017 3:06 pm

qwertquadrat wrote:Can ".aup"-files contain default audio export settings?

No. An AUP file is by definition a per project file.

qwertquadrat wrote:So when I open the file and click on "Export Audio...", these settings (file type, path etc.) are suggested as default values? If not, is the information about those default values stored elsewhere and can one edit them safely?

Yes in audacity.cfg.
Code: Select all
[Export]
Format=
Path=

are stored, and encoding qualities for particular formats (when used) are also stored. However you can only edit that file when Audacity is closed. Audacity won't pay attention to edits you make to the file while Audacity is running, and will overwrite those edits when it exits.


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
Gale Andrews
Quality Assurance
 
Posts: 26006
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: store default audio export settings in ".aup"-file

Permanent link to this post Posted by qwertquadrat » Wed Mar 08, 2017 5:49 pm

Thank you for the quick answer!

Gale Andrews wrote:No. An AUP file is by definition a per project file.

Never doubted that. I hoped there would exist project-specific configurations one could define in the ".aup"-file.

Gale Andrews wrote:Yes in audacity.cfg.

That sounds like a possible workaround for my plans, I then have to edit the file via my Blender Add-on and reset it after closing Audacity. Not too straightforward, but it probably works at least.

qwertquadrat
qwertquadrat
 
Posts: 14
Joined: Wed Dec 28, 2016 8:21 pm
Operating System: Windows 10

Re: store default audio export settings in ".aup"-file

Permanent link to this post Posted by qwertquadrat » Tue Mar 14, 2017 9:17 pm

Another question that is not different enough to start a new thread:

Can one open an Audacity project via command line with a custom settings path? Like
Code: Select all
audacity myProject.aup /c ..\settings\
? Or are only the "hard coded" paths ("Portable Settings"/OS-specific AppData) possible? If so, do you plan adding such a feature in (near) future? (I know that that would make having multiple instances of Audacity very easy and I don't know if that is wanted or not)

And all that just for a simple "Edit in Audacity"-Button. Btw. the part of the script that generates the Audacity project is done and works as it should, including text markers. I only struggle at the reimport of the edited audio file in Blender because my script can't know where the user saves the file and the user can't intuitively find the directory where the script expects the audio file to be saved in. Therefore this question so that user intuitively exports the audio to a path the script knows of.

qwertquadrat
qwertquadrat
 
Posts: 14
Joined: Wed Dec 28, 2016 8:21 pm
Operating System: Windows 10

Re: store default audio export settings in ".aup"-file

Permanent link to this post Posted by Gale Andrews » Wed Mar 15, 2017 2:45 pm

qwertquadrat wrote:Can one open an Audacity project via command line with a custom settings path? Like
Code: Select all
audacity myProject.aup /c ..\settings\
?

No.

qwertquadrat wrote:Or are only the "hard coded" paths ("Portable Settings"/OS-specific AppData) possible?

Yes.

qwertquadrat wrote: If so, do you plan adding such a feature in (near) future? (I know that that would make having multiple instances of Audacity very easy and I don't know if that is wanted or not)

No plans. Multiple instances of Audacity are not officially supported, and don't work at all on Windows.

qwertquadrat wrote:And all that just for a simple "Edit in Audacity"-Button. Btw. the part of the script that generates the Audacity project is done and works as it should, including text markers. I only struggle at the reimport of the edited audio file in Blender because my script can't know where the user saves the file and the user can't intuitively find the directory where the script expects the audio file to be saved in. Therefore this question so that user intuitively exports the audio to a path the script knows of.

Would it help if when you imported an audio file or opened a project, the Audacity export path changed to the path the file or project came from? It is possible we'll add that feature.


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
Gale Andrews
Quality Assurance
 
Posts: 26006
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: store default audio export settings in ".aup"-file

Permanent link to this post Posted by qwertquadrat » Thu Mar 16, 2017 1:27 am

Gale Andrews wrote:Would it help if when you imported an audio file or opened a project, the Audacity export path changed to the path the file or project came from? It is possible we'll add that feature.


Yes, that would be perfect. Then my script could generate the project file, open it in Audacity and it would be clear what the export path is. And that would make my personal workflow beside the script better because I store Audacity projects mostly near the location where I want to export the audio and I always had to navigate through the whole directory tree to find it. So that sounds as a really good solution if that feature is added. It would even be okay for me if one had to activate it manually in the settings, because one could suggest users to do so while using my script and it would only mean a single required user action.

Thank you very much!
qwertquadrat
qwertquadrat
 
Posts: 14
Joined: Wed Dec 28, 2016 8:21 pm
Operating System: Windows 10

Re: store default audio export settings in ".aup"-file

Permanent link to this post Posted by Gale Andrews » Thu Mar 16, 2017 3:59 pm

qwertquadrat wrote:
Gale Andrews wrote:Would it help if when you imported an audio file or opened a project, the Audacity export path changed to the path the file or project came from? It is possible we'll add that feature.


Yes, that would be perfect.

I added your "vote" for this to our list of feature requests.


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
Gale Andrews
Quality Assurance
 
Posts: 26006
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10


Return to General Audio Programming



Who is online

Users browsing this forum: No registered users and 3 guests