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 extend = Object.getOwnPropertyNames ? | |
function ecma5extend(obj) { | |
var proto = obj; | |
var protos = []; | |
var result = {}; | |
while (proto) { | |
protos.push(proto); | |
proto = Object.getPrototypeOf(proto); | |
} |
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
// Takes string of Note + Octave | |
// Example: | |
// var frequency = getFrequency('C3'); | |
var getFrequency = function (note) { | |
var notes = ['A', 'A#', 'B', 'C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#'], | |
octave, | |
keyNumber; | |
if (note.length === 3) { |