Volume Control Function - Just dBFS?

Help for Audacity on Windows.
Forum rules
ImageThis forum is for Audacity on Windows.
Please state which version of Windows you are using,
and the exact three-section version number of Audacity from "Help menu > About Audacity".


Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade at https://www.audacityteam.org/download/.
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.
Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Volume Control Function - Just dBFS?

Post by Gale Andrews » Sun Oct 23, 2016 12:56 pm

prout wrote:I am using WASAPI in exclusive mode. The Roland ADC output level in dBFS and the Audacity data stream input level in dBFS match precisely when the 'volume control' is set at 100%. This is what I expect to see if Windows has no control over the bit depth of the data stream.
Unity gain at 100% slider level "may" be something the Roland drivers are able to accomplish, but the Windows USB Audio Class drivers typically work very differently.

Again, the Audacity input level slider is merely a mirror to the Windows slider. It does whatever the Windows slider does.


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

prout
Posts: 28
Joined: Fri Oct 21, 2016 7:53 pm
Operating System: Windows 10

Re: Volume Control Function - Just dBFS?

Post by prout » Sun Oct 23, 2016 1:43 pm

This is an unsubstantiated statement by Cambridge Audio found at https://techsupport.cambridgeaudio.com/ ... _Audio.pdf

"ASIO (Audio Stream Input/Output) is another method of audio transport which is superior to WASAPI as it bypasses the Windows Kernel Mixer (and the distortion this adds)."

With regard to WASAPI, it goes on to say say that exclusive mode prevents Windows from mixing Windows sounds with the output stream, but that the data still passes through the kernal mixer which dynamically resamples as required. However, this seems to apply only to output. No mention is made of an incoming datastream to an application.

The question is still unanswered I think.

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

Re: Volume Control Function - Just dBFS?

Post by steve » Sun Oct 23, 2016 2:07 pm

prout wrote:The question is still unanswered I think.
Which question?
Your question about whether there is another DAC-ADC in the chain has been answered - no there isn't.
Your question about whether Audacity resamples the data has been answered - no it doesn't.
Your question about whether the gain change is done by Audacity before or after conversion to 32-bit has been answered - neither, Audacity does not change the gain of the input data, though the Windows sound system may change the gain depending on hardware, drivers and settings.

Your implied question "how do I guarantee zero data loss after the A/D conversion by the Roland ADC" has not been fully answered because we don't know.
I know that with my sound card (Behringer UCA-202) on my Linux computer, using either the ALSA sound card driver directly, or using Jack Audio System, there is no scaling or conversion of the audio data (other than converting from 16-bit to 32-bit float, which is a lossless conversion).
I think that with your hardware, using WASAPI exclusive mode and the gain set to 100%, it is likely that there will be no scaling, but the only way to be sure is to find the relevant documentation from Roland, which may or may not be available. At the end of the day the important question is whether the sound quality of your set-up is good enough for your needs - only you can answer that.

WASAPI exclusive mode, with the sample rate in Audacity matched to the sample rate of the device, and the bit-format in Audacity set to 32-bit float, is likely to give you the best quality possible with Audacity. Compiling Audacity from the source code with ASIO support, or using an ASIO enabled audio recorder should allow you to guarantee no scaling, though I very much doubt that there will be any audible difference in sound quality, and there may be no difference at all (measurable or otherwise).

Gale mentioned that in some cases, there may be positive gain when the Windows gain control (hence the Audacity input volume control) is set to 100%. To test if that is the case, set the gain control to 99% and apply an analog signal that overdrives the input. If 100% = unity gain you should see clipping just below full scale amplitude (at 0.99 linear scale = -0.088 dB).
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

prout
Posts: 28
Joined: Fri Oct 21, 2016 7:53 pm
Operating System: Windows 10

Re: Volume Control Function - Just dBFS?

Post by prout » Sun Oct 23, 2016 2:36 pm

This is the question that I think is still unanswered.
Gale Andrews wrote:
DVDdoug wrote:WASAPI in exclusive mode is similar to ASIO but I'm not 100% sure that it prevents resampling.
Why exactly are you not 100% sure? Windows should not be applying explicit sample rate or bit depth conversions.

Gale
You mention about Windows applying gain to the stream. Clearly that is not a bit perfect transfer from the Roland ADC to Audacity. I understand why Windows would do this for generic applications, but, as you mention, undesirable and unnecessary clipping could occur and recorded by Audacity in spite of the supplied data being below clipping.

All this is for the sake of knowledge. I am using tube mics and a final chain s/n of about 76dB, so the resampling errors are well below anything audible. That being said, knowing where to place my 76dB worth of dynamic range in the bit-space is useful, so having gain applied without telling me is not helpful. I also use Ableton Live 9 with ASIO and none of the Windows issues, but I like Audacity much better for my purposes.
Last edited by prout on Sun Oct 23, 2016 2:52 pm, edited 1 time in total.

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

Re: Volume Control Function - Just dBFS?

Post by Gale Andrews » Sun Oct 23, 2016 2:46 pm

prout wrote:This is an unsubstantiated statement by Cambridge Audio found at https://techsupport.cambridgeaudio.com/ ... _Audio.pdf

"ASIO (Audio Stream Input/Output) is another method of audio transport which is superior to WASAPI as it bypasses the Windows Kernel Mixer (and the distortion this adds)."

With regard to WASAPI, it goes on to say say that exclusive mode prevents Windows from mixing Windows sounds with the output stream, but that the data still passes through the kernal mixer which dynamically resamples as required. However, this seems to apply only to output. No mention is made of an incoming datastream to an application.
Certainly the Audacity developer most experienced in Windows audio systems believes that in WASAPI exclusive mode, Audacity can request the bit depth (always 32-bit as described) and sample rate direct from the sound device without Windows processing, and that this applies to input and output.

Even official documentation can be wrong. All Microsoft documentation we had seen suggested Windows DirectSound could only record in 16-bit, but it can record real 24-bit samples and the next 2.1.3 version of Audacity should support that. As far as I understand it, Windows DirectSound Exclusive Mode in Vista and later is not fully exclusive - it does not resample but it does upconvert to 32-bit float.

Certainly if you look at the Windows "Sound" control panel you can see "Default Format: Select the sample rate and bit depth to be used when running in shared mode", which seems to imply that in Exclusive Mode, those Default Format settings are ignored. I agree this does not necessarily mean that "some" other processing might not be done in Exclusive Mode.

The "solution" is probably to use a direct to drive/disk recorder where you should be able to control (or have a clearer idea) how exactly recordings are made.


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

prout
Posts: 28
Joined: Fri Oct 21, 2016 7:53 pm
Operating System: Windows 10

Re: Volume Control Function - Just dBFS?

Post by prout » Mon Oct 24, 2016 10:39 pm

A little OT, but still in the "exclusive mode" "mixer bypass" discussion, here is a 25 second audio file of six samples of base noise - three using the Roland Quad-Capture and three using my laptop Conexant microphone. The Roland had no input mic and the output level was set for 0 gain. The Conexant/Windows Gain control was set to 50% to assure a reasonable bit depth. The three Roland samples were simultaneously normalized to -3dB and the three Conexant were normalized in the same manner. Here is the order:

Roland using WASAPI - Direct Sound - MME - Conexant using WASAPI - Direct Sound - MME

https://www.dropbox.com/s/4ks2urqbcucyy ... e.wav?dl=0

My interpretation of these samples is that only WASAPI bypasses the Windows Mixer and the resultant added noise.

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

Re: Volume Control Function - Just dBFS?

Post by Gale Andrews » Tue Oct 25, 2016 12:30 pm

prout wrote:This is the question that I think is still unanswered.
Gale Andrews wrote:
DVDdoug wrote:WASAPI in exclusive mode is similar to ASIO but I'm not 100% sure that it prevents resampling.
Why exactly are you not 100% sure? Windows should not be applying explicit sample rate or bit depth conversions.

Gale
You mention about Windows applying gain to the stream. Clearly that is not a bit perfect transfer from the Roland ADC to Audacity.
Windows will likely do that for a device using built-in USB Audio Class drivers. You would need to ask Roland what they intend to happen with their drivers and your specific device.


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

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

Re: Volume Control Function - Just dBFS?

Post by Gale Andrews » Tue Oct 25, 2016 12:39 pm

prout wrote:A little OT, but still in the "exclusive mode" "mixer bypass" discussion, here is a 25 second audio file of six samples of base noise - three using the Roland Quad-Capture and three using my laptop Conexant microphone. The Roland had no input mic and the output level was set for 0 gain. The Conexant/Windows Gain control was set to 50% to assure a reasonable bit depth. The three Roland samples were simultaneously normalized to -3dB and the three Conexant were normalized in the same manner.
Where/how were you simultaneously normalising the Roland and Conexant samples?

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

prout
Posts: 28
Joined: Fri Oct 21, 2016 7:53 pm
Operating System: Windows 10

Re: Volume Control Function - Just dBFS?

Post by prout » Tue Oct 25, 2016 12:58 pm

I recorded each sample directly into Audacity using 'exclusive' mode, Audacity volume control at 100% for the Roland data stream, and the Audacity volume control at 50% for the internal mic. The Roland samples were copied into a single track, then normalized as a group. The same technique was used for the internal mic. The two groups were then copied into a single stereo track. Normalization was used to make the noise easily audible (base noise in the recordings was in the -80 to -60dBFS range).

A direct comparison cannot be made between the Roland (no mic input, just Roland pre-amp noise in the data stream) and the Conexant internal mic (Software Volume had to be set above 0% and thus mic was active, adding some room noise and Johnson-Nyquist noise), except that the spectral content of the noise varies among the Roland and Conexant samples in the same manner, implying that the audio interface choice has a significant effect on the type of noise added to the recording by the computer.

Post Reply