double MIDItoFreq(int keynum) {
return 440.0 * Math.pow(2.0, ((double) keynum - 69.0) / 12.0);
}
[/code]
source:
http://www.musicdsp.org/showone.php?id=125
“Here is some C code: double MIDItoFreq( char keynum ) { return 440.0 * pow( 2.0, ((double)keynum - 69.0) / 12.0 ); } you can double-check the table here: http://tomscarff.tripod.com/midi_analyser/midi_note_frequency.htm“