• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required as is 20 years of participation in forums (not all true). Come here to have fun, be ready to be teased and not take online life too seriously. We now measure and review equipment for free! Click here for details.

For those who worry about quality of software volume control

Joined
Feb 9, 2018
Messages
291
Likes
197
#21
Using Audacity, the visual effect of -60dB on a music waveform.
Of course, a visual comparison isn't very useful, since you're only using a couple of hundred pixels for the vertical scale (so, about 8-bit resolution). Since you've attenuated by 60dB, you've dropped the bottom 10 bits. You started with 24-bit PCM, so that leaves 14 bits, so differences won't be visible in your 8-bit visual representation.

That said, with 24 bits to play with, you can afford a 48dB gain control without getting poorer than CD quality reproduction...
 
OP
B

bennetng

Major Contributor
Joined
Nov 15, 2017
Messages
1,056
Likes
928
Thread Starter #22
I suspect some viewers may be impatient to watch the first video from start to end. I changed to DS at 3:40 and I also made some changes in foobar's ReplagGain settings. The purpose is to demonstrate the effect of Windows CAudioLimiter APO.

https://matthewvaneerde.wordpress.c...audiometerinformation-and-full-scale-signals/

As you can see when I enabled ReplayGain in foobar the distortion is gone. However it is not the usual way to use ReplayGain. It is a rather hackish way to avoid triggering the limiter when using DS mode, if you don't want exclusive mode to block the sound of other programs.
 

Blumlein 88

Major Contributor
Forum Donor
Joined
Feb 23, 2016
Messages
10,225
Likes
14,134
#23
Of course, a visual comparison isn't very useful, since you're only using a couple of hundred pixels for the vertical scale (so, about 8-bit resolution). Since you've attenuated by 60dB, you've dropped the bottom 10 bits. You started with 24-bit PCM, so that leaves 14 bits, so differences won't be visible in your 8-bit visual representation.

That said, with 24 bits to play with, you can afford a 48dB gain control without getting poorer than CD quality reproduction...
Well here is a similar display to Ray's. Zoomed into the individual samples. Still limited vertical resolution and I couldn't zoom in enough to get the scale on both the same. The lower waveform is -60db. You can see the general shape is all there. Oh and with dither, you can get below the 48 db gain control.

60 db volume drop waveform.png
 
Joined
Apr 23, 2019
Messages
29
Likes
5
#24
The defaults on replaygain are -3db overall IIRC. Is that a bad default? I was thinking it may be good in some cases.
 
Joined
Feb 9, 2018
Messages
291
Likes
197
#25
Zoomed into the individual samples.
And how big is the sample marker...?

Yes, of course the shape will be roughly the same, but visual plots are hopeless for objective measurements of accuracy. It's why simple oscilloscopes are only useful for checking basic functions, not doing precision distortion measurements.
 

RayDunzl

Major Contributor
Central Scrutinizer
Joined
Mar 9, 2016
Messages
10,459
Likes
9,528
Location
Riverview FL
#26
Yes, of course the shape will be roughly the same, but visual plots are hopeless for objective measurements of accuracy. It's why simple oscilloscopes are only useful for checking basic functions, not doing precision distortion measurements
Set full scale digital with attenuation pre-amplification, and a comfortable listening level:

In this case, it's TV, and it's too loud.

1556746337834.png



Digitally attenuate the signal by 60dB
.

1556746535078.png




Practical Scientist Result:
There being nothing audible left to hear (black line is registering the room/mic noise floor) leaves me less than acutely concerned about the lack of precision distortion measurements in the prior visual examples. Sorry.
 
Last edited:
Joined
Feb 9, 2018
Messages
291
Likes
197
#27
I was never concerned about the fidelity of software gain control.

I was only concerned with the attempt to use an 8-bit visual representation to 'prove' it...
 

Blumlein 88

Major Contributor
Forum Donor
Joined
Feb 23, 2016
Messages
10,225
Likes
14,134
#28
Okay, dropped level 60 db and saved it in Audacity. Using 16 bit files, and saving to 24 bit (which should equal something using 24 bit volume control). I did use triangular dither. Then used pkane's excellent Deltawave to perform a null of this vs the original. I'll show what's left in one, but several gave the same results. The difference was in the -89 to 90 db range. Considering 16 bit originals with dither about what you'd expect. So if you drop volume by 60 db the playback level will be only marginally audible and the noise from doing so would be too far down to matter.

Amplifying this difference by 70 db all you hear is smooth unchanging noise.

Now any decent software will be doing volume in 32 bit float or 64 bit. Software volume just isn't a problem with good software. Roon has explained at one time how they use 64 bit and can do I think it was 100,000 changes in volume and make the last one back to original level and the difference is below the 24th bit as the end will be bit perfect compared to a 24 bit original.

minux 60 db with dither.png
 

Blumlein 88

Major Contributor
Forum Donor
Joined
Feb 23, 2016
Messages
10,225
Likes
14,134
#29
Here is the difference in a 60 db volume reduction vs the original if carried out in 32 bit float.

60db volume 32 float.png
 

solderdude

Major Contributor
Joined
Jul 21, 2018
Messages
6,598
Likes
12,389
Location
The Neverlands
#30
I don't worry about digital volume control, but would be worried if I used it to drive a poweramp directly and for some reason volume would be set to 0dB attenuation by accident in such a case.
 

Daverz

Addicted to Fun and Learning
Joined
Mar 17, 2019
Messages
736
Likes
622
#31
I don't worry about digital volume control, but would be worried if I used it to drive a poweramp directly and for some reason volume would be set to 0dB attenuation by accident in such a case.
You can also have accidents with analog technology. I once sat on my remote and accidentally turned my pre-amp up to nearly it's full +18 dB gain setting. Luckily, the speakers didn't explode.
 

Theo

Active Member
Joined
Mar 31, 2018
Messages
288
Likes
166
#32
Obviously, all modern recording studios use DAW for mixing their recording, so digital volume on all tracks... So no issue in software volume for me...
 
OP
B

bennetng

Major Contributor
Joined
Nov 15, 2017
Messages
1,056
Likes
928
Thread Starter #33
Joined
Apr 23, 2019
Messages
29
Likes
5
#34
There seems to be conflicting information on this. If your device supports WASAPI exclusive mode, and Windows volume control also works with it, is it safe to use? I understand not every device that supports WASAPI also works with volume (my FiiO E10K is like that) but my onboard sound does.

Thanks!
 
OP
B

bennetng

Major Contributor
Joined
Nov 15, 2017
Messages
1,056
Likes
928
Thread Starter #35
A simple experiment: If you can use WASAPI exclusive mode + a volume control you "trust" to turn down the volume (-12dB) of a.mp3 to make it sound like b.mp3, then that volume control is safe for you, otherwise no.
 

Attachments

Last edited:
Joined
Apr 23, 2019
Messages
29
Likes
5
#36
That is a unique test. You take an audio file that intentionally clips the waveforms and the test succeeds if lowering the volume brings the waveform inside of clipping.

Does anything other than foobar (or other music playing software) actually do this? Clearly an analog knob would not behave this way.

And no, WASAPI Windows volume does not pass this test. I doubt a hardware-controlled DSP volume control would, either.
 
OP
B

bennetng

Major Contributor
Joined
Nov 15, 2017
Messages
1,056
Likes
928
Thread Starter #37
The mp3 file is not clipped, your signal chain clipped it, otherwise even foobar's volume control will distort.
mpc-hc.PNG

For freeware, mpc-hc with exclusive mode turn on and internal volume control can achieve the same. For commercial software, something like JRiver would do. So it is not specific to foobar.
 
Last edited:
Joined
Apr 23, 2019
Messages
29
Likes
5
#38
Sure, but how would the system volume know that the signal is past limits? It just passes what it's given to the output device. If the signal is over reference, it isn't surprising it would clip. The music software is 'closer' to the source, so it can analyze the waveform and adjust it accordingly.

Does any system-level volume on any OS pass this test?
 
OP
B

bennetng

Major Contributor
Joined
Nov 15, 2017
Messages
1,056
Likes
928
Thread Starter #39
That's why I was talking about software volume control within the playback software at the very beginning. If you insist on using something else then you should consult some other experts to solve your problem. I cannot help you. Sorry.
 

Blumlein 88

Major Contributor
Forum Donor
Joined
Feb 23, 2016
Messages
10,225
Likes
14,134
#40
A simple experiment: If you can use WASAPI exclusive mode + Windows system volume control to turn down the volume (-12dB) of a.mp3 to make it sound like b.mp3, then Windows system volume control is safe for you, otherwise no.
I fail to see how this will work either. You have clipped and unclipped portions. What kind of volume control will unclip the first part of the file?
 
Top Bottom