| You have discovered the reason I wrote the dbfsamp and ampdbfs opcodes
many years ago - precisely because of this non-standard behaviour.
The old dbamp interprets the input value as a sample value assuming the
traditional 16bit range, with the amplitude value of 10000 converted to
a dB value of +80, as you see. We would more correctly define that
amplitude (relative to 32767) as 10000/32767 ~= -10.3dBFS. the
convention today of course is that 0dB signifies peak amplitude.
But with dbamp as you found, the amplitude of 1 (understood here as one
sample point above silence) gets translated to the value of 0dB, which
is ~really~ confusing!
The newer dbfs~ opcodes take the current value of 0dbfs into account (by
default 32767, but recommended to be set to 1.0 these days), so that you
can use the standard definitions of dB levels (0dB for peak amplitude,
-60dB for the threshold of silence, etc) and always get the appropriate
amplitude value; whatever 0dbfs is set to.
So - use dbfsamp instead, and ideally specify 0dbfs = 1 in the
orchestra, and use either fractional amplitude values or standard dB
values in the score, as you prefer.
A few users have indicated that there are still uses for the old dbamp
opcodes (which simply make the 20*log10(amp) calculation on whatever
number is supplied), but for all general amplitude control purposes, use
the dbfs versions,and read/write dB values in the industry-standard manner.
Richard Dobson
On 16/11/2010 14:45, menno wrote:
>
> hi,
>
> i was using "dbamp" and found something that puzzled me, quite possibly a
> lack of knowledge. I tried out this csd:
...
>
> here i see that with amp=10000 dbamp returns: 80, which i accept. But when
> amp=1 dbamp gives 0 ??
> And when amp=01 the result is even worse: -20 ??
> What i like is to have confirmed that my knowledge of the oh so complex
> issue of decibels needs an extreme makeover ??
>
> thank you,
> menno
Send bugs reports to the Sourceforge bug tracker
https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
|