[PD] Acoustic conversions : formulas?
Miller Puckette
mpuckett at man104-1.ucsd.edu
Sun Jul 21 22:59:34 CEST 2002
Hi all,
pitch = 69 + 12 * log_2(frequency/440) = 69 + (12/log(2)) * log(frequency/440)
frequency = 440 * exp(log(2) / 12 * (pitch - 69))
It's calculated (in slightly streamlined form) in x_acoustic.c .
"rms to db" is:
db = 100 + 20 * log_10(rms)
and so on.
cheers
Miller
On Thu, Jul 18, 2002 at 04:48:26PM -0600, David Sabine wrote:
> Hello all,
>
> Can somebody tell me what formula is used in PD to convert MIDI to frequency? (i.e. how does [mtof] REALLY work?)
>
> Is it a table? or a formula?
>
> By the same token, I'd like the formulae for [ftom], [dbtorms], [rmstodb], [dbtopow], and [powtodb] as well.
>
> Regards,
> Dave Sabine
More information about the Pd-list
mailing list