[sdiy] math question - somewhat OT
Ian Fritz
ijfritz at earthlink.net
Tue Sep 21 22:45:09 CEST 2004
At 02:24 PM 9/21/2004, Scott Gravenhorst wrote:
> (n/12+v)
>f = s * 2
>
>where f is frequency in Hz, s is scale factor (constant), n
>is an integer note number (increments 1 for each semitone)
>and v is an integer representing an octave.
>
>The constant value s can be set so that particular values of
>n and v give the standard frequency values such as 440 Hz.
I believe he wants the inverse of that. The formula is:
p = (12/log2)log(f/f0),
Where f is the frequency and p is the pitch in semitones relative to the
pitch of f0. The log function can be to any base, ie, log_10, ln, etc.
Ian
More information about the Synth-diy
mailing list