opening more than 1 program

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

opening more than 1 program

Permanent link to this post Posted by claton7 » Fri Mar 25, 2016 12:57 pm

Can I open more than 1 audacity 2.1.2 at a time.when recording an album I would like to open up an another audacity and work on an other album.I could do it with the older version audacity.
claton7
 
Posts: 1
Joined: Fri Mar 25, 2016 12:34 pm
Operating System: Windows 10

Re: opening more than 1 program

Permanent link to this post Posted by steve » Fri Mar 25, 2016 1:47 pm

Yes, you can do: "File menu > New", or "File > Open" or "File > Recent Files".
However: DO BE CAREFUL. If you "Play" or "Stop" in the second project, it will abort the recording in the first project without notice. Personally I would NOT recommend working on another project while recording - it's just too easy to make a mistake and screw up the recording.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 45379
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: opening more than 1 program

Permanent link to this post Posted by Gale Andrews » Fri Mar 25, 2016 2:55 pm

We do now "unofficially" support running two instances of Audacity (as opposed to having two Audacity project windows open in one instance), but it does not work on Windows due to a bug.

You can simulate it by running Audacity in separate user accounts, but that may well fail on Windows 8 or Windows 10 because those versions of Windows tend to suspend the audio device in the account that isn't active.

Or (at your own risk) you can try running Audacity 1.0.0 as the recording device and edit in current Audacity.

You need a fast computer to run two instances of Audacity, but it "probably" isn't a problem for modern desktops or laptops.


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

Re: opening more than 1 program

Permanent link to this post Posted by steve » Sat Mar 26, 2016 5:44 pm

Gale Andrews wrote:We do now "unofficially" support running two instances of Audacity

Could you explain that Gale.
That does not appear to be the case on Linux.
Gale Andrews wrote:but it does not work on Windows due to a bug.

and it does not work on Windows.

So it sounds like it is currently an "unofficial feature" on Mac OS X only ?
How do I launch separate instances of Audacity on Mac OS X? isn't there a "lock file" to prevent that from happening?

Could you tell me who the developer of this feature is so that I can ask them for information about how it should work.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 45379
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: opening more than 1 program

Permanent link to this post Posted by Gale Andrews » Sun Mar 27, 2016 5:12 am

steve wrote:
Gale Andrews wrote:We do now "unofficially" support running two instances of Audacity

Could you explain that Gale.
That does not appear to be the case on Linux.

It does work on Linux as well as Mac.

Assuming the same user wants to run two instances of Audacity, the requirements for it to work are:

  • At least one instance of Audacity must have a "Portable Settings" folder alongside the executable
  • The TempDir pointed to in audacity.cfg must be different in each case.
So if you only have one Audacity executable on the machine, you would launch it, create a "Portable Settings" folder alongside the executable, in the "Portable Settings" folder you would create an audacity.cfg file pointing to a different TempDir than the one in Audacity's folder for application data, then execute Audacity again.

On Ubuntu 14.04 I have been running two instances of the same copy of 2.1.2 alongside each other, and 2.1.2 alongside 2.1.3-alpha.

If you do try to run two different versions of Audacity pointing to the same temp folder in audacity.cfg, there is no warning on Ubuntu 14.04, nothing happens and there is no terminal output. But there is no "already running" warning even trying to run the same version twice with the same temp folder. I think the "already running" warning appears on Mac, I will have to check.


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

Re: opening more than 1 program

Permanent link to this post Posted by steve » Sun Mar 27, 2016 12:09 pm

Gale Andrews wrote:It does work on Linux as well as Mac.

What you describe is surely just a "side effect" of running Audacity as a portable app rather than an intended "feature" of Audacity. If it really is an intended feature, then I don't understand why we have code comments such as:

Code: Select all
// There is another copy of Audacity running.  Force quit.


Code: Select all
   //<<<< Try to avoid dialogs before this point.
   // The reason is that InitTempDir starts the single instance checker.
   // If we're waiitng in a dialog before then we can very easily
   // start multiple instances, defeating the single instance checker

which strongly implies to me that we don't want the single instance checker to be defeated. Your 'steps to make it work on Linux and Mac' allow multiple instances because they provide a way to defeat the single instance checker.

We also have the message string:
Code: Select all
_("Running two copies of Audacity simultaneously may cause\ndata loss or cause your system to crash.\n\n")


Answering some of my own questions:
Back in January 2015 revision 13868, multiple instances of Audacity was specifically prohibited on all platforms. The main issue that the developer (LL) was concerned about was that Audacity would sometimes hang when two Audacity process were started at the same.
Later that same month, he found the reason for the hang and fixed it. At that time he was not aware of any compelling reason to prohibit running multiple instances, so he reverted r 13868 and requested thorough testing of running multiple instances:
So, what needs testing is starting multiple copies of Audacity, either
sequentially or simultaneously. In as many variations as you can think of
and you lot seem to be able to dream them up. :-)


So really it was left as an open question "why not?" rather than a positive decision "we need this feature".
I'm personally not yet convinced that allowing multiple instances is a good idea - some reasons why:

  • With multiple instances, changes to Preferences apply only to the preferences for the "Audacity profile" that the instance was launched from (the "Audacity profile" being the complete set of "preferences", pluginregistry, pluginsettings, chains, temp folder, EQCuves, ...).
    For example, if you have profiles a, b, c and d, and you launch 4 instances of Audacity, one from each "Audacity profile", and for each instance you "Close" the current project, then you have 4 new projects with 4 different sets of preferences, different plug-in settings, different EQCurve settings etc, and no clear way to tell which project is a member of which profile. Changing preferences, EQ curves, Chains, plug-in settings, installed plug-ins (etc) in one project will change one of the profiles, but there is no friendly way for the user to know which profile has changed.
  • Users expect that effect will open with the last used settings. That will only happen if the last time an effect was use, Audacity had been launched using the same profile.
  • Crash recovery becomes more complex as multiple instances requires multiple temp directories. Auto-recovery (which generally works very well) will appear to fail completely if the user launches Audacity from the wrong profile.
  • On OS X, closing all windows is intended to close all windows but leave one empty instance of Audacity running. This fails if there were multiple instances of Audacity running.
  • On Linux, the standard location for an application lock file is as a hidden file in the user's home directory. To support multiple instances of Audacity we must write the lock file to a non-standard location.
  • When exporting files, it is possible that two or more instances of Audacity could attempt to export files with the same name to the same location. This would cause all exports except for the one that completes last to be overwritten without warning. I don't see a good way round this as the file name must be set before the file writing begins, but the exported files do not exist until the export is complete. We would normally class such data loss as P2 or higher, but if we have multiple instances there may be no way round it.
  • When recording "stereo mix", there is a high risk of damaging a project by playing or previewing in another project. In my opinion the risk is unacceptably high, but (assuming that the system allows the behaviour), I see no way that Audacity can prevent this from happening if there are multiple instances (it "can" be prevented if there are multiple project in the same Audacity instance).
I expect there are many other reasons "why not" to allow multiple instances. How much evidence do we need in order to decide that it's not a good idea?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 45379
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: opening more than 1 program

Permanent link to this post Posted by Gale Andrews » Sun Mar 27, 2016 2:26 pm

steve wrote:
Gale Andrews wrote:It does work on Linux as well as Mac.

What you describe is surely just a "side effect" of running Audacity as a portable app rather than an intended "feature" of Audacity. If it really is an intended feature, then I don't understand why we have code comments such as:

Code: Select all
// There is another copy of Audacity running.  Force quit.


Code: Select all
   //<<<< Try to avoid dialogs before this point.
   // The reason is that InitTempDir starts the single instance checker.
   // If we're waiitng in a dialog before then we can very easily
   // start multiple instances, defeating the single instance checker

which strongly implies to me that we don't want the single instance checker to be defeated. Your 'steps to make it work on Linux and Mac' allow multiple instances because they provide a way to defeat the single instance checker.

In practice, "defeating" the single instance checker is probably a more stable way of recording in one project while working on another than doing it in two project windows in the same instance.

And yes, Leland has been becoming more relaxed to allowing this.

As I understand it, one objection to the "unofficial" method you requested clarification on is that two instances of Audacity could use the same configuration file. This is discussed at http://bugzilla.audacityteam.org/show_bug.cgi?id=840#c0. Leland has a patch there that would store the lock file in the configuration directory rather than the temporary directory, therefore removing that objection.

The objection to two instances of Audacity on basis of resource usage is probably old hat now. Even my 1 GHz netbook managed to record into 2.1.2 and 2.1.3-alpha at the same time without any dropouts, though I would not recommend that on such a machine.

Perhaps you should post your objections on the grounds the user does not know which profile they are using (and other objections) in Bug 840. Personally I would not recommend running multiple instances of the same executable, but I don't find it confusing if there are two Audacity executables in different locations.

steve wrote:On Linux, the standard location for an application lock file is as a hidden file in the user's home directory. To support multiple instances of Audacity we must write the lock file to a non-standard location.

So on that basis we are already using a lock file in a non-standard location, and Leland's patch in Bug 840 would also be non-compliant.

steve wrote:When recording "stereo mix", there is a high risk of damaging a project by playing or previewing in another project. In my opinion the risk is unacceptably high, but (assuming that the system allows the behaviour), I see no way that Audacity can prevent this from happening if there are multiple instances (it "can" be prevented if there are multiple project in the same Audacity instance).

That seems like a user error to me, to think that they can record a song from YouTube with stereo mix in one Audacity instance then play a song in another Audacity instance without affecting the YouTube recording. Per se, that doesn't seem a good reason to me to say you can't run two Audacity instances. Either the user should be using another recording app that can record only from the application producing the sound (like SoundLeech or VB Virtual Audio Cable), or Audacity would need that recording ability.



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

Re: opening more than 1 program

Permanent link to this post Posted by steve » Sun Mar 27, 2016 3:37 pm

Gale Andrews wrote:In practice, "defeating" the single instance checker is probably a more stable way of recording in one project while working on another than doing it in two project windows in the same instance.

But safer than either would be to disallow actions in one project affecting another project.

Looking at how other applications behave, as an example, a word processor: I can open two documents (two "word processor projects"). I can switch from one to the other and edit each project in turn. I can even copy from one "project" (document window) and paste in the other. Thus I can safely work in multiple document windows, secure in the knowledge that changes that I make in "project A" will only affect "project A". When I switch to "project B" I'm not going to find that it is trashed because of something I did in "project A".

Gale Andrews wrote:The objection to two instances of Audacity on basis of resource usage is probably old hat now.

Given that we still see reports of skips and drop-outs in recordings, I'm less confident.

Given that currently we only use one processor core at a time, it is unlikely that there will be recording performance problems due to the CPU, though that is probably not true for single processor machines and will probably cease to be true when we start using multiple CPU cores.

I agree that it is probably reasonably safe at the moment on a modern machine to do a bit of gentle editing while recording an LP, but do we / can we know the performance limits?

Gale Andrews wrote:This is discussed at http://bugzilla.audacityteam.org/show_bug.cgi?id=840#c0

Thanks, I'll have a read through that entire thread.

Gale Andrews wrote:So on that basis we are already using a lock file in a non-standard location, and Leland's patch in Bug 840 would also be non-compliant.

Yes we are currently non-compliant (on Linux at least), whereas revision 13868 was compliant.

Gale Andrews wrote:That seems like a user error to me

Sure it is. Stepping into a bear trap is invariable user error.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 45379
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: opening more than 1 program

Permanent link to this post Posted by Gale Andrews » Sun Mar 27, 2016 4:20 pm

steve wrote:
Gale Andrews wrote:In practice, "defeating" the single instance checker is probably a more stable way of recording in one project while working on another than doing it in two project windows in the same instance.

But safer than either would be to disallow actions in one project affecting another project.

Looking at how other applications behave, as an example, a word processor: I can open two documents (two "word processor projects"). I can switch from one to the other and edit each project in turn. I can even copy from one "project" (document window) and paste in the other. Thus I can safely work in multiple document windows, secure in the knowledge that changes that I make in "project A" will only affect "project A". When I switch to "project B" I'm not going to find that it is trashed because of something I did in "project A".

And for the more complex case of Audacity we have the Multiproject Wormcan.

If that was ever solved, presumably multi-threading being part of the answer, then we could simply lock down running multiple instances of Audacity.

As it is, usability conflicts somewhat with a desire for lock down. I think if you know the limits on your own machine it could well be safer to run two instances than risk the "wormcan".

steve wrote:
Gale Andrews wrote:The objection to two instances of Audacity on basis of resource usage is probably old hat now.

Given that we still see reports of skips and drop-outs in recordings, I'm less confident.

Given that currently we only use one processor core at a time, it is unlikely that there will be recording performance problems due to the CPU, though that is probably not true for single processor machines and will probably cease to be true when we start using multiple CPU cores.

Or we restrict each Audacity instance to one core if more than one instance? So if single core, we might prevent running another instance for that reason.

steve wrote:I agree that it is probably reasonably safe at the moment on a modern machine to do a bit of gentle editing while recording an LP, but do we / can we know the performance limits?

We don't, but the user is more likely to know. If the user does not get dropouts recording with one instance of Audacity, they "probably" won't do so with two instances running. On Windows 7 or later I have tried several times exporting a track in Audacity 2.x.x with project rate different to track rate (60% CPU, dual core) while recording in Audacity 1.0.0. I never had a problem myself with recording dropouts.

I might expect dropouts on Windows XP (which is not so good at multi-tasking) and probably Vista (which is just a "heavy" OS). But I have not tried it there.

Maybe if you had two recordings in two instances of Audacity and managed to get them writing block files at the same time with an anti-virus scanning the files, there would be a problem. But even with one Audacity instance, people may be editing videos while recording. We can only give general guidance.


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

Re: opening more than 1 program

Permanent link to this post Posted by steve » Sun Mar 27, 2016 4:56 pm

Gale Andrews wrote:But even with one Audacity instance, people may be editing videos while recording. We can only give general guidance.

Indeed we do. We advise:
"Real-time recording is a very resource-intensive task for computers, which in most settings are not recording studios but multi-task machines with many competing demands on their processor. Therefore it's important to take steps to maximise available computer resources when recording."

http://wiki.audacityteam.org/wiki/Manag ... nd_Drivers
Promoting running multiple instances of Audacity as a feature, appears somewhat contrary to that advice don't you think?

I can appreciate some of the frustration for some users in that if they have a quad core processor and see Audacity running with less than 25% CPU load, it gives the impression that they are needlessly waiting around for Audacity. If we make better use of multiple core CPUs, then perhaps the incentive for running multiple instances will be somewhat diminished.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 45379
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Next

Return to General Audio Programming



Who is online

Users browsing this forum: No registered users and 5 guests