| Chuckk Hubbard wrote:
> On Dec 4, 2007 10:08 PM, Andres Cabrera wrote:
>
>>Bear in mind that amplitude values in csound are not linear, and a
>>halving of amplitude value is actually only 6 dB lower.
>
>
> Don't you mean that amplitude values in Csound are linear, and
> decibels are not linear?
>
> Actually decibels still throw me. I am perfectly fine with computing
> simple logarithmic amplitudes in my head; and to have such a wide
> dynamic range expressed in 6 units seems limiting. I guess I just
> outed myself as never having used much studio equipment...
>
> -Chuckk
>
This is one of the most common questions in digital audio and..
is why so much computer music has such a narrow dynamic range.
People may suppose that 0.1 is a really small amplitude. It isn't.
Amplitude corresponds to voltage in an electrical signal, and to
displacement in a sound wave. Hence it is the most "raw" measure of the
intensity of a signal. As it happens, we can hear over a huge dynamic
range, such that an amplitude of 0.001 (relative to 1.0 as "maximum") is
still very much audible: = -60dB, or the just-audible end of a reverb
decay (hence the "RT60" specification of a space). The decibel is not,
strictly speaking, a raw measure of intensity, but a ~comparison~
between two levels. It is a specific form of logarithmic scale, used to
represent that vast range of amplitudes with a smaller range of numbers
that more closely reflects the perception of the ear. To the eye, the
difference between 1.0 and 0.5 is a lot; but to the ear, it is not such
a big deal.
"Linear" signifies the way a graphic scale is presented - equal distance
= equal difference. The musical frequency scale (in Hz) is linear - the
differences between 220 and 440, and between 440 and 660, are the same
(220). But the ~ratios~ are different, hence the interval they represent
is different. So pitch is described over a logarithmic scale (same
~ratio~). Intensity can be measured similarly in either way.
So in short:
linear = "same distance = same increment"
logarithmic = "same distance = same ratio"
Hence = to get the same chjange of loudness, you multiple amplitudes
("0.5"), or add decibels ("-6dB").
If you remember the good old days of the slide rule: that is marked with
a log scale, so that multiplication etc works for the same amount of
slide, wherever you are. A "linear" slide rule (= any ordinary ruler)
could not be used for anything more than addition and subtraction.
At the "lowest" level of numeric representation, all audio software
eventually deals with amplitudes - 0.5, 0.01, 0.00123, etc. But, it
would be a very bad idea to manually control loudness that way, for the
reasons above:
* covering the top half of the slider range would only reduce power by 6dB
* equal-distance slider movements will not result in equal-sounding
loudness changes
~Much~ better to represent all amplitude values in dB, and let Csound
convert it to the often very small raw amplitude levels. Much easier to
write -30 than 0.031 (approx) and, I suspect, more ~meaningful too! In
an amplifier or mixer, all the volume controls (faders etc) use a
"log-law" potentiometer to achieve this - a "linear" pot would be awful.
A practical consequence of all this is that "normalizing" a soundfile to
a peak amplitiude of 0.25 looks like a massive reduction; whereas it is
only -12dB (of at least 96dB available, more with 24bit and floats);
many professional systems normalize 0dB to much less than that. Thus,
all too often people normalize to such a high level that clipping is
pretty much guaranteed.
A very comprehensive presentation of this topic (with graphs!) is here:
http://www.indiana.edu/~emusic/acoustics/amplitude.htm
HTH
Richard Dobson
|