Frequency Math
Joost Schuttelaar
EMAIL HIDDEN
Fri Oct 10 23:01:48 CEST 2008
On Oct 10, 2008, at 20:31 , Martin Naef wrote:
> 431.942, if I got the math right...
>
> That would be: 440 * 2 ^ (offset/(12*100)), assuming that 12 notes
> is an
> octave (which is half/double the frequency) and each note is divided
> into 100 cents.
Yep! Correct.
float semitonesToFreq(float s) {
return 440.0 * pow(2, ((s - 69.0) / 12.0));
}
:)
--
Joost Schuttelaar
The Hague, NL
More information about the music-bar
mailing list