Individual Storage of Host Settings

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.
Locked
Robert J. H.
Posts: 3635
Joined: Thu May 31, 2012 8:33 am
Operating System: Windows 10 / 11

Individual Storage of Host Settings

Post by Robert J. H. » Sat Nov 30, 2013 4:12 am

Hello all,
Audacity is currently introducing new hosts for the Windows system.
There will be available:
- MME
- Windows Direct Sound
- Wasapi
- WDM kernel streaming

The feature request does nevertheless also apply to other operating systems.
One can set different options in Preferences --> Recording to grant a floorless playback/recording. Especially Audio Buffer and Latency Correction.

My request is now to save these settings for each host/input combination.

For example: MME needs an Audio Buffer of 200 and a Latency Correction of -170.
Wasapi on the other hand must have the Audio Buffer set to zero and the Latency Correction to -41.
These values will change with other sound-cards and input sources.

It would be most convenient if the values were stored for each combination, once the optimal settings are found, otherwise the defaults would be applied.
On my system, this would mean that all 30 IDs from the device info could have their own profile.
The samplerate and number of channels should also be stored. The settings are unfortunately in different tabs, namely "Devices" and "Recording". However, a profile could be created anyway.
The management is a background task, so no new options etc would be introduced in the main GUI.

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

Re: Individual Storage of Host Settings

Post by steve » Sat Nov 30, 2013 4:20 pm

I think this is a good idea, but quite complicated to do. On my machine the latency also changes according to the sample rate, so ideally there would be separate profiles for each sample rate. If the computer has more than one sound card then the latency is likely to be different for each sound card. There could end up being very many profiles, one for each combination of host, recording device, playback device and sample rate. Each profile needs to be set up initially, which in itself can be quite time consuming.

I think that what I'd prefer is for there to be a quick and easy way to set up latency correction, though of course this does not preclude your suggestion of saving those settings as a profile.
Robert J. H. wrote: It would be most convenient if the values were stored for each combination, once the optimal settings are found, otherwise the defaults would be applied.
What "default" would be used?
If I set up latency correction for my internal sound card with a specific host and sample rate, and then change the sample rate, the required latency correction is likely to be close to the latency correction that I have just set up. I think that in this case it would be better for Audacity to use the correction amount that I had just set up as the "default" for the new profile rather than the 130 ms default that we currently have.

So then I tweak the correction setting for the new sample rate and I now have 2 profiles.

I then change the sample rate again. Which "default" should be used this time?
Learn more about Nyquist programming at audionyq.com

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

Re: Individual Storage of Host Settings

Post by Robert J. H. » Sat Nov 30, 2013 10:55 pm

I see that you're thinking already at how to implement this feature.There are numerous ways to set an initial or default value. When upgrading, there should be naturally the last setting in the preferences be taken as default.
The device info gives some rough latency estimations. The actual latency correction is on my system near the lower limit.
The default could therefore alternatively be taken from there (e.g. the average between low and high latency)

As soon as a host's settings are altered, the profile for this host is created and all sub-combinations get these settings.
If such an entry for a host/input combination already exists, only this specific entry will be altered.
Let's assume that we newly install Audacity:
- First start, we have the default settings, audio buffer 100, latency correction -130, sample rate 44100/32 bit/1 channel.
- The host is perhaps MME.
- We change the latency correction to -190.
- Several profiles for the host "MME" will now be created with the last latency correction.
- Sample rate and number of channels are still the default ones.
- changing the sample rate or the number of channels will create a new entry for this combination.
- You now have to set manually a new latency correction for this entry, if you wish so.

It would be nice if we could also differentiate between different sound cards, not only hosts, and initialize the settings for this host/card combination.

I personally prefer the simple approach:
Create a new entry as soon as one of the default values has changed. I would probably set the values for my favourite combinations in one go. If I encounter the default values, I can at least be sure that no proper values are yet set for this combination.

A total other approach would be to save the selected combination as a separate recording preset, e.g. "Low-Fi Streaming". However, this would involve a preset editor of its own, a thing that no developer will chew.

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

Re: Individual Storage of Host Settings

Post by steve » Sun Dec 01, 2013 3:48 pm

Robert J. H. wrote:The device info gives some rough latency estimations.
Unfortunately on some machines that information is completely unreliable. Probably the most simple and expected approach would be to use the current 130 ms value the first time that Audacity runs, and then if/when the configuration is changed, the current correction value remains until/unless the user changes it (I'm not a fan of programs doing "stuff" in the background about which the user is unaware - I much prefer the program does what the user tells it to do).

I'm still unsure of how external devices should be handled. For example, if I use a Behringer UCA 202 USB sound card one day, then the next day I boot up the computer with an M-Audio MobilePre USB Audio Interface, should a new profile be created or should there be just one profile for USB audio devices? It rather undermines the scheme if there is only one profile for USB devices, but on the other hand Audacity reports that my USB sound card is: "USB Audio CODEC: USB Audio (hw:1,0)", which I presume is likely to be the same if I used a different USB audio device.
Learn more about Nyquist programming at audionyq.com

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

Re: Individual Storage of Host Settings

Post by Robert J. H. » Sun Dec 01, 2013 5:34 pm

steve wrote:
Robert J. H. wrote:The device info gives some rough latency estimations.
Unfortunately on some machines that information is completely unreliable. Probably the most simple and expected approach would be to use the current 130 ms value the first time that Audacity runs, and then if/when the configuration is changed, the current correction value remains until/unless the user changes it (I'm not a fan of programs doing "stuff" in the background about which the user is unaware - I much prefer the program does what the user tells it to do).

I'm still unsure of how external devices should be handled. For example, if I use a Behringer UCA 202 USB sound card one day, then the next day I boot up the computer with an M-Audio MobilePre USB Audio Interface, should a new profile be created or should there be just one profile for USB audio devices? It rather undermines the scheme if there is only one profile for USB devices, but on the other hand Audacity reports that my USB sound card is: "USB Audio CODEC: USB Audio (hw:1,0)", which I presume is likely to be the same if I used a different USB audio device.
In general, I have unique names for my Usb devices, it depends on the driver actually.
One device is called "USB Multi-Channel", the other is called "Lexicon bla-bla".
Pluggin' the device into another slot will create another device such as "2- USB Multi-Channel".
This will of course lead to a new profile. This might not be bad since different HUBs can have another latency behaviour.
A problematic input source might be things like "Microsoft Soundmapper-Input".
However, the documentation suggests distinct inputs like microphone" already. The user doesn't change his standard input that often in the sound control panel, I hope.

All profiles could be gathered in a separate file such as "recording.cfg". This file could be edited or deleted by the user, if too many profiles accumulate.
The normal "audacity.cfg" would behave as usual with the last settings stored.
This grants also backward compatibility.

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

Re: Individual Storage of Host Settings

Post by Gale Andrews » Wed Dec 04, 2013 1:12 am

It's already been suggested elsewhere that the "Audio to buffer" and "Latency correction" boxes could move to "Devices Preferences" underneath the Recording Channels. One way it might work is that there would be a checkbox for buffer and correction called "Apply to all" or similar. If you uncheck that box, make a change to buffer or correction then OK Preferences, then those new settings only apply to the host/recording device (and possibly playback device) combo active at the time.

You could make a decision on whether changing default sample rate in Quality Preferences then changing buffer and latency correction should save those changes only for that sample rate and the host/device combo.

Steve's point about USB recording devices is a good one - on Windows, most will say "USB Audio CODEC" whatever the device is. I don't know whether Audacity can capture some low level driver information about the device that could identify what it actually is.

Or we could extend the idea of having Recording Profiles for multi-channel track allocation to include devices and their settings.

I think I prefer the idea of handling this in Preferences but once there is more than a certain variability for a given host/device combination (as with Windows DirectSound for me) it becomes rather pointless. It would be better to have automatic latency correction (measuring distances between pings) with some easy way to remeasure the latency.


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

Locked