Skip to content

Instantly share code, notes, and snippets.

// 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]){
@lostrepo
lostrepo / notevalues.json
Last active July 14, 2017 18:49 — forked from marcgg/notevalues.json
note frequency values (Hz, additional notes after C8)
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,