[Alsaplayer-devel] Logarithmic volume scale.

Adam Kuklasiński akukuq at gmail.com
Tue Dec 16 00:14:30 GMT 2008


Hi,
I'm using Alsaplayer since few days. I like it a lot, but I've noticed
two drawbacks.

The volume slide apparently attenuates the signal linearly instead of
logarithmically. I mean, from what I can hear, the way it affects the
signal is something like:

Sout(t) = Sin(t) * X

where Sin(t) and Sout(t) are original signal and the attenuated signal
respectively, X being the position of the volume slide in percents.
From what I know about the nature of human hearing this formula should
look like that:

Sout(t) = Sin(t) * { 10 ^ [ ( 1 - X ) * 75 / 20 ] }

Thanks to this "75 / 20" factor, the attenuation done by the
attenuator is between -75dB and 0dB. This means that in the "loudest"
position it does nothing to the signal (0db) and in it's minimum it
lowers the sound level by 75 dB (the magnitude is then ca. 5600 times
lower). The -75dB - 0dB range could and can be changed, but is quite
optimal. 75dB attenuation causes that very loud sounds, say 90dB, are
after attenuating only 15dB which is barely audible in normal
conditions.
This little change would greatly improve the "feeling" of the volume
slide. Notice, that there is only small (subjective) difference
between 100% and 50%, and there is huge difference between 50% and 20%
in loudness of played music now. With formula above, this subjective
change of loudness will be spread evenly across the whole range of the
slide.

Second thing I want to write about, is that I'm able to set the volume
to 101% by scrolling with the mouse wheel above the volume slide (it
is not possible by dragging with Mouse). Additionally I can't set the
volume to "mute" by scrolling if the value is smaller than 4% just
before scrolling.

I hope that my suggestions will help improve the Alsaplayer.

Adam Kuklasiński
Poland

PS.: Of course, it would be nice to leave the "0% means mute" behavior
of the volume slide. And sorry for my English.


More information about the alsaplayer-devel mailing list