db volume scaling
Tim Blechmann
tim at klingt.org
Wed Jun 10 00:55:54 UTC 2009
>>> would be curious to hear comments about the patch ...
>> Well, it doesn't change much for the average user, except that the volume
>
>> control would sound better.
>
> For the average user, it makes it less intuitive.
>
> And I don't see why it would make the volume control "sound better".
some quick comments about, why it sounds `better'. sound pressure level
[1] correlates with perceived loudness more or less logarithmically. the
logarithmical dB(SPL) scale is defined with the threshold of the human
hearing as reference point.
the range, which is reasonable for listening to music, is possibly
between 40 and 80 dB(SPL).
in digital audio, the reference point for the dB scale is the maximum of
the dynamic range of the signal representation. increasing the volume
more, would result in a clipping of the signal, therefore only reducing
the volume is reasonable, so our values are negative.
the threshold of loudness perception is about 1 dB, i.e. two sounds with
a volume difference of less than 1dB are usually perceived a equally
loud (i don't have any reference on that, but my ears confirmed it,
after my acoustics professor claimed that in his class). increasing the
volume by 10dB perceptually doubles the perceived volume.
so much about the theory, now for amarok's implementation, using
phonon's setVolume interface: after checking the sources, and
reimplementing the formula, it gives me the following table:
0% equals -inf dB
4% equals -41.729552 dB
8% equals -32.743582 dB
12% equals -27.487127 dB
16% equals -23.757612 dB
20% equals -20.864776 dB
24% equals -18.501157 dB
28% equals -16.502745 dB
32% equals -14.771642 dB
36% equals -13.244701 dB
40% equals -11.878806 dB
44% equals -10.643204 dB
48% equals -9.515187 dB
52% equals -8.477512 dB
56% equals -7.516775 dB
60% equals -6.622351 dB
64% equals -5.785672 dB
68% equals -4.999734 dB
72% equals -4.258731 dB
76% equals -3.557803 dB
80% equals -2.892836 dB
84% equals -2.260320 dB
88% equals -1.657234 dB
92% equals -1.080960 dB
96% equals -0.529217 dB
100% equals 0.000000 dB
as it can be seen, this is a good linear representation of the
psychoacoustic loudness perception (10db doubles the loudness).
now, why do i argue for a logarithmic scale? for loud volumes, the top
8% (92%-100%) are used for a dynamic range of 1dB, that is barely
audible, while from 4% to 8%, the dynamic range of 9dB almost doubles
the perceived loudness.
ok, now consider the following setup: the speakers are able to reproduce
a sound of 90dB(SPL). depending on my mood, i like to listen to soft,
normal or loud music. so i would have to adjust the volume in amarok to
-40, -20 or -5dB, at the current scale 10%, 20% or 68%. for fine-tuning
the volume, it means, that a step of 2% changes the volume by less than
0.4dB at 68%, which is barely audible, and by almost 3dB at 10%. so, you
can do a very good fine tuning at high volumes, but you can barely do a
fine tuning at low volumes.
having a logarithmic db scale, the user can do a fine tuning equally
well at low volumes and at high volumes, so the volume control would
`sound better'.
best, tim
[1] http://en.wikipedia.org/wiki/Sound_pressure_level
--
tim at klingt.org
http://tim.klingt.org
Your mind will answer most questions if you learn to relax and wait
for the answer.
William S. Burroughs
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: OpenPGP digital signature
URL: <http://mail.kde.org/pipermail/amarok/attachments/20090610/672af3b6/attachment.sig>
More information about the Amarok
mailing list