Hi,

This is intentional. This is the same convention that Pure Data uses, the reason being is that it is easy to use MIDI velocity numbers to change volume.

Std.dbopow(MIDI_VEL) => mysynth.volume;

Or some similar line of code. It is nice because a MIDI value of 100 means full volume (1.0) and anything above that jacks up the volume if you have a quiet synth or sample loaded.

Remember that decibels are a logarithmic scale that is relative to some value, in this case 1.0.

--art

> From: rdpoor@gmail.com
> To: chuck-users@lists.cs.princeton.edu
> Date: Sun, 3 May 2009 08:28:24 -0700
> Subject: [chuck-users] dbtopow(), dbtorms(), powtodb(), powtorms() off by 100 db
>
> In chuck 1.2.1.2, the family of db conversion functions appear to be
> broken, or at least have a unconventional interpretation of db -- they
> all seem have an offset of 100 db:
>
> for example:
>
> Std.powtodb(1.0) => 100.0 (expected 0.0)
> Std.powtodb(10.0) => 110.0 (expected 10.0)
>
> Std.dbtopow(0) => 0 (expected 1.0)
> Std.dbtopow(100) => 1.0 (expected 10000000000)
>
> (Similar comments apply to rmstodb() and dbtorms())
>
> OTOH they are self-consistent, in that Std.dbtopow(Std.powtodb(x)) ==
> x, so maybe someone thinks that's how they're supposed to behave?
>
> - Rob
>
> _______________________________________________
> chuck-users mailing list
> chuck-users@lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users


Help keep personal info safe. Get Internet Explorer 8 today!