This file contains 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
// get postitive sequence values | |
// n - index of value in sequence | |
// x - array of values describing function | |
// general function: f(n) = f(n - x[0]) + f(n - x[1]) + ... + f(n - x[m]); f(0) = 1; | |
function stair(n, x, cache) | |
{ | |
cache = cache || [1]; | |
if (cache[n]){ |
This file contains 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
var noteValues = { | |
'C0': 16.35, | |
'C#0': 17.32, | |
'Db0': 17.32, | |
'D0': 18.35, | |
'D#0': 19.45, | |
'Eb0': 19.45, | |
'E0': 20.60, | |
'F0': 21.83, | |
'F#0': 23.12, |