function noteToFreq(note) {
let a = 440; //frequency of A (coomon value is 440Hz)
return (a / 32) * (2 ** ((note - 9) / 12));
}
function noteToFreq($note) {
$a = 440; //frequency of A (coomon value is 440Hz)
return ($a / 32) * (2 ** (($note - 9) / 12));
}
def noteToFreq(note):
a = 440 #frequency of A (coomon value is 440Hz)
return (a / 32) * (2 ** ((note - 9) / 12))
#include <math.h> //<cmath> in case of c++
float noteToFreq(int note) {
float a = 440; //frequency of A (coomon value is 440Hz)
return (a / 32) * pow(2, ((note - 9) / 12.0));
}
Yes, that's true. honestly c version was "automatically" generated without even attempt of compiling it.. and that was a mistake.
thanks for you comment should be fixed including second similar error.