A more accessible way to set up latency correction

This read-only archive contains discussions from the Adding Feature forum.
New feature request may be posted to the Adding Feature forum.
Technical support is available via the Help forum.
steve
Site Admin
Posts: 81609
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: A more accessible way to set up latency correction

Post by steve » Wed Nov 20, 2013 1:06 am

Robert J. H. wrote:How about

Code: Select all

(print *default-sf-dir*)
No that's not reliable. It seems to show the location from which it was launched rather than where the executable is.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

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

Re: A more accessible way to set up latency correction

Post by steve » Wed Nov 20, 2013 1:45 am

Matthew, I split your last post to here http://forum.audacityteam.org/viewtopic ... 20&t=75908 as it is really a different proposal to what is being discussed here.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Edgar
Forum Crew
Posts: 2043
Joined: Thu Sep 03, 2009 9:13 pm
Operating System: Windows 10

Re: A more accessible way to set up latency correction

Post by Edgar » Wed Nov 20, 2013 1:53 am

steve wrote:I don't know of any reliable way to find the directory from which Audacity is running (which I think would be required to find a Portable Settings folder). Let me know if you find one ;)
This is pretty easy for a built-in effect but without patching Nyquist code it's probably not available to an external plug-in. But in reality you don't need all of that from a built-in effect because there's a wxWidgets function which returns the configuration directory no matter where it is.

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

Re: A more accessible way to set up latency correction

Post by steve » Wed Nov 20, 2013 1:56 am

Edgar wrote:But in reality you don't need all of that from a built-in effect because there's a wxWidgets function which returns the configuration directory no matter where it is.
Thanks Edgar. That's going on the Nyquist wish list :)
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Robert J. H.
Posts: 3633
Joined: Thu May 31, 2012 8:33 am
Operating System: Windows 10

Re: A more accessible way to set up latency correction

Post by Robert J. H. » Wed Nov 20, 2013 5:52 am

steve wrote:
Robert J. H. wrote:How about

Code: Select all

(print *default-sf-dir*)
No that's not reliable. It seems to show the location from which it was launched rather than where the executable is.
What do you mean by launched? I launch it via link on the desktop, but it returns the right directory.
Another way but probably giving the same result is:

Code: Select all

(print (setdir ""))
Proper file allocation is in any case something to implement in version 4 plug-ins.

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

Re: A more accessible way to set up latency correction

Post by steve » Wed Nov 20, 2013 6:40 am

Robert J. H. wrote:What do you mean by launched?
As an example, if you open the Windows Command Prompt, the prompt will indicate the current directory. If you then launch Audacity from the Command Prompt, *default-sf-dir* will indicate the same directory as was shown in the Command Prompt. If you then close Audacity, navigate to a new directory and relaunch Audacity, *default-sf-dir* will indicate the new location.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Robert J. H.
Posts: 3633
Joined: Thu May 31, 2012 8:33 am
Operating System: Windows 10

Re: A more accessible way to set up latency correction

Post by Robert J. H. » Wed Nov 20, 2013 9:01 am

steve wrote:
Robert J. H. wrote:What do you mean by launched?
As an example, if you open the Windows Command Prompt, the prompt will indicate the current directory. If you then launch Audacity from the Command Prompt, *default-sf-dir* will indicate the same directory as was shown in the Command Prompt. If you then close Audacity, navigate to a new directory and relaunch Audacity, *default-sf-dir* will indicate the new location.
I guess that's the Linux way of doing things... :D

After all, reading the current Latency Correction isn't that important. It is rather a question of "Please type the following number in the Latency Correction box" or to tell the user to add or substract that value--this leads perhaps to confusion. For example, if the current value is -100 and he/she should substract 50, will there be afterwards -150 or -50?

Anyway, The algorithm seems to work fine. There are 10 Accuracy levels from 1 ms resolution to 0.1 ms (which needs 100 times more calculations). Level 5 is actually enough, it returns a correction of -31.6 ms on my system (didn't know that decimal places work).
A Recording done with this setting aligns almost perfect. The test signals were click track (default setting), noise, chirp and so on. The returned value is practically always identical--if the test signal hasn't a decaying character (e.g. Risset Drum).
Recording with WASAPI is a special case though. Since my Mixer does not work, I won't be able to test other sources.
By the way, does anyone know why positive values are allowed as Latency Correction?

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

Re: A more accessible way to set up latency correction

Post by steve » Wed Nov 20, 2013 9:39 am

Robert J. H. wrote:I guess that's the Linux way of doing things... :D
That was on Windows XP :)
Robert J. H. wrote:After all, reading the current Latency Correction isn't that important.
Not essential, but easier for the user.

How about providing options for "standard installation" and "Portable Installation", where the former checks in the default location for audacity.cfg and the latter requires the user to enter the location of their Portable Settings folder? If the user has created a Portable Settings folder then they should know where it is.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: A more accessible way to set up latency correction

Post by Gale Andrews » Sat Nov 23, 2013 9:19 pm

steve wrote:The next best thing would be if Audacity automatically knew how much round trip latency there would be, then Audacity could automatically adjust for it.
The PortAudio library we use does of course have a simplistic feature that tries to do that. It works fairly well with MME host in Device Toolbar but not with Windows DirectSound, which was the reason the automatic adjustment was turned off.


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

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

Re: A more accessible way to set up latency correction

Post by waxcylinder » Thu Jan 16, 2014 10:34 am

BUMP: can I just archive this thread - or is there an idea that can be expressed succinctly that I could transfer to Wiki>PFR with a link back to the archived thread. Advice please.

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

Locked