Page 2 of 4

Re: A more accessible way to set up latency correction

Posted: Wed Nov 20, 2013 1:06 am
by steve
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.

Re: A more accessible way to set up latency correction

Posted: Wed Nov 20, 2013 1:45 am
by steve
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.

Re: A more accessible way to set up latency correction

Posted: Wed Nov 20, 2013 1:53 am
by Edgar
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.

Re: A more accessible way to set up latency correction

Posted: Wed Nov 20, 2013 1:56 am
by steve
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 :)

Re: A more accessible way to set up latency correction

Posted: Wed Nov 20, 2013 5:52 am
by Robert J. H.
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.

Re: A more accessible way to set up latency correction

Posted: Wed Nov 20, 2013 6:40 am
by steve
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.

Re: A more accessible way to set up latency correction

Posted: Wed Nov 20, 2013 9:01 am
by Robert J. H.
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?

Re: A more accessible way to set up latency correction

Posted: Wed Nov 20, 2013 9:39 am
by steve
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.

Re: A more accessible way to set up latency correction

Posted: Sat Nov 23, 2013 9:19 pm
by Gale Andrews
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

Re: A more accessible way to set up latency correction

Posted: Thu Jan 16, 2014 10:34 am
by waxcylinder
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.