Re: [chuck-users] dbtopow(), dbtorms(), powtodb(), powtorms() off by 100 db (Robert Poor)
Oh yea, that too :-)
Thanx Adam.
PRC
----- "Perry R Cook"
dB just implies 20log_10. A reference must be selected.
The most common are dBV (1 volt = 0dB), dBm (0dB = 1 milliwatt into 600 ohms), and dBSPL (watts relative to threshold of hearing at 0dB).
I suspect that the implementers of this were thinking about the approximate 96dB of 16 bit audio, and the +/-1.0 float recommended max range of STK. Thus a range of 0.00001=0dB to 1.0=100dB resulted. Easy to change to any reference by just subtracting/adding/multiplying/dividing by a constant.
PRC
Where I was raised (south pole of Mars, IIRC), absent any other reference, a "ratio" of 1:1 was always 0 db. But I can adapt. ChucK is like a box of chocolates -- you never know what you're going to get. - Rob
----- "Perry R Cook"
wrote: dB just implies 20log_10. A reference must be selected.
The most common are dBV (1 volt = 0dB), dBm (0dB = 1 milliwatt into 600 ohms), and dBSPL (watts relative to threshold of hearing at 0dB).
I suspect that the implementers of this were thinking about the approximate 96dB of 16 bit audio, and the +/-1.0 float recommended max range of STK. Thus a range of 0.00001=0dB to 1.0=100dB resulted. Easy to change to any reference by just subtracting/adding/multiplying/dividing by a constant.
PRC
chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
Rob;
Where I was raised (south pole of Mars, IIRC), absent any other reference, a "ratio" of 1:1 was always 0 db.
Yup. So your sound is "1" and mine is "1" and the difference is 0db, right? Cool, now I'm disgrunted over you playing in the high mid and me in the lower bass and nobody can hear me so I turn my sound up. In my enthousiasm I even double it. Now my sound is 10db higher than yours. What does this mean, exactly? Well, it's "10db over Rob". db needs a reference. For db SPL the reference level is the treshold of hearing for a baby (babies typically haven't been exposed to semi-legal free parties yet). This reference is missing in ChucK where a rather large range can be expressed in a rather abstract way so Adam's note was quite useful to me. Yours, Kas.
Perry;
Oh yea, that too :-)
Thanx Adam.
The link to MIDI would be a nice thing to add to the docs as it will make the reference more clear and immediately increase usability. db is confusing enough as it is and frequently misused (I'm still in the dark on why we would use "A-weighing" on decidedly high volumes as various powers-that-be insist on), by definition it needs a reference. The reference isn't at all clear when we are dealing with floats and the threshold of hearing is determined by the volume of the final amp, the lowest possible value of a double precision float doesn't seem very useful here. Thanks to Adam for clearing up one of the more confusing Std functions; I wasn't sure about that one either. Yours, Kas.
participants (3)
-
Kassen
-
Perry R Cook
-
Robert Poor