[wdmaudiodev] Re: Positive/negative dB range in volume control

  • From: Larry Osterman <Larry.Osterman@xxxxxxxxxxxxx>
  • To: "wdmaudiodev@xxxxxxxxxxxxx" <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Mon, 11 Jul 2011 15:17:54 +0000

If you want to control the absolute volume without tapering, Windows provides 
APIs that allow you to set the absolute dB.

The "SetMasterVolumeLevel" API allows you to set an absolute volume in dB, the 
"SetMasterVolumeLevelScalar" applies the taper.  SetMasterVolumeLevelScalar is 
appropriate for UI controls, SetMasterVolumeLevel is appropriate if you need to 
bypass the slider.

Larry

-----Original Message-----
From: wdmaudiodev-bounce@xxxxxxxxxxxxx 
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Mike Kemp
Sent: Monday, July 11, 2011 7:33 AM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: Positive/negative dB range in volume control

Hi Eugene

The MS document you were referred to does not explain audio taper (though it 
uses that term). It only describes the logarithmic response you need as a basis 
for understanding perception.

The fact is as I said, every usuable volume control provides an additional 
scaling on top of the logarithmic scale that expands the upper 20dB or so of 
the scale to the majority of the physical travel. This is because as the audio 
level falls towards the noise floor of the listening environment you don't care 
much about the setting to the nearest dB, which you do when it is relatively 
loud. It also usually provides a cut to "off" at the bottom, which saves you 
needing an infinitely long control.

If you have input signals that can be as much as 90dB above or below a "normal" 
level, you should probably consider providing some sort of ranging control to 
bring it into line before offering a level control for the user to operate. An 
input gain text box for example, or a switch. But I struggle to know what your 
source would be covering that range. This would be a good approach if it is a 
recording input.

If you make a control that covers even a modest range, say 60dB, linear in dB 
you will find that you are fine adjusting in the top end of the range and a 
small movement of the mouse will jump the signal level more than anyone would 
want. Net effect it would not be much use.

Windows has slowly understood this and provides a usable audio taper. I'd 
suggest that you use it for what it is good for, that is a user adjusting the 
volume in a user friendly way.

M


>>>>>>
----- Original Message -----
From: Eugene Muzychenko
To: Mike Kemp
Sent: Monday, July 11, 2011 3:03 PM
Subject: [wdmaudiodev] Re: Positive/negative dB range in volume control


Hello Mike,

> Every real volume control you have used stretches the top part of its
> range
> across the bulk of the physical travel. It's called the audio taper

A typical audio taper is simply a logarithmic potentiometer, right? So
Windows volume level sliders should behave like them. MS describes
them as the following:

"For a particular travel distance, the amount by which the perceived
loudness increases or decreases is approximately the same regardless
of whether the slider movement occurs in the lower, upper, or middle
portion of the slider's range of movement. Perceived loudness varies
approximately linearly with the logarithm of the audio signal power".

If I specify -6..6 dB for the range, SndVol32 sets the "0 dB" position
exactly to the middle. For -12..12 dB, it sets the "0 dB" to about 25%
and so on. The wider is the absolute range, the less is the
attenuation range, and the more is the boost range. What is a reason
for it? Or SndVol32 still uses a linear scale instead of a logarithmic
one?

> You rarely want precision control below -20dB, whereas above that
> the ear is sensitive to less than a dB of change and its where you
> want fine control

I need a precise control for the recording purpose, not for hearing
only.

Regards,
Eugene

******************

WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx

URL to WDMAUDIODEV page:
http://www.wdmaudiodev.com/

******************

WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx

URL to WDMAUDIODEV page:
http://www.wdmaudiodev.com/


******************

WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx

URL to WDMAUDIODEV page:
http://www.wdmaudiodev.com/

Other related posts: