This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function pythagorean(e){ | |
var frequency = e; | |
var cents; | |
// multiply/divide frequency until between 440 & 880 | |
for (let step = 0; step < 100; step++) { | |
if (frequency < tuningHz) { frequency = frequency * 2; } | |
else if (frequency > tuningHz * 2) { frequency = frequency / 2; } | |
else { break; } | |
} |
NewerOlder