[arch-general] OT: [arch-dev-public] polkit package upgrade patch
Fons Adriaensen
fons at linuxaudio.org
Sun Aug 12 14:29:31 EDT 2012
On Sun, Aug 12, 2012 at 11:10:10AM -0500, Leonid Isaev wrote:
> Correct me if I'm wrong but I don't think that's possible, because dB is
> normalized to max power (in watts = intensity).
[ Tom & Leonid ]
> Lots of questions...
I'll try to answer them, but not all at a time (I need to eat/sleep/etc)
as well, and it may amount to crash course in audio engineering...
Decibels.
What '0 dB' means depends on the context, and usually for someone
'knowing the art' it is clear from the context. For gains it is just
a ratio epxressed on a logarithmic scale. For signal levels it depends
on the physics. For example, for electrical signals a common 'reference
level' corresponding to '0dB' would be 0.775 volt RMS. That is usually
notated just 'dB' or 'dBm' (the origin of this is that it represents
1 mW in a load of 600 Ohm). Or you could see dBV, which means 0 dB =
1 V RMS. For sound pressure levels, the reference is 2e-5 Pa (Pascal),
which is around the hearing threshold at medium frequencies. So e.g.
90 dB SPL means a sound that is 1e9 times (a billion for the Americans)
stronger (in power) than the hearing threshold. The large ratios are why
a logarithmics scale is used in the first place.
In a digital context, '0dB' usually means the RMS value of the highest
sine wave amplitude that can be represented, unless you're talking
about peak sample levels, where it means the highest possible sample
value. This can be confusing.
Resolution
Assume you have a simple 16-bit consumer card, and forget about gain
controls etc. for a moment, the samples produced by your app (e.g.
a player) arrive unmodified at the DA converter.
16 bit means that there are 2^16 possible values for a sample. So the
signal is quantised to the nearest level. Except in some special cases,
the error (a rounding error) is random and appears as noise. For a
16-bit card, that noise will have a level that is 98 dB lower than
the maximum amplitude sine wave it can produce. Let's assume the card
is not really 'perfect' and you actually have 95 dB of dynamic range.
OK, play back some music that has an high average level (i.e. using
all bits most of the time), connect your card to and amp and speakers
and adjust the volume on the amp so it is as loud as you would ever
want it.
Let's assume you now have something like 100 dB average sound pressure
level. That is quite loud (your neighbours will complain) and more
than enough to cause permanent hearing damage. Let's say that 100 dB
average level corresponds to a peak level of 110 dB. Now stop the
music. Assuming the sound card is the weakest part in the chain, you
will now get a noise level of 110 - 95 = 15 dB. This is well below
the ambient noise level in most places, so you won't hear it unless
you stick your ears in the speakers.
What does this mean ? It means that the dynamic range of 95 dB is
more than enough. And if it isn't (as in a music studio where you'd
want higher peak levels and the ambient noise level is lower) you
just need a few more bits, maybe 20.
You can reproduce sound at any level (below the maximum you set)
without having to bother about 'resolution', by just scaling the
samples you send to the soundcard, and without having to adjust
any HW levels. Even if the signal is weak and doesn't use all
bits there is no loss of quality - as the error (the noise) is
well below the ambient level.
If you don't believe this then ask yourself why speakers having
an integrated amplifier and a digital input are so popular in
professional circles. There is no 'volume' control on those (at
least not one you'd normally use) the only way to play at low
levels is by not using all the bits.
All for now.
--
FA
A world of exhaustive, reliable metadata would be an utopia.
It's also a pipe-dream, founded on self-delusion, nerd hubris
and hysterically inflated market opportunities. (Cory Doctorow)
More information about the arch-general
mailing list