Skip to content

Instantly share code, notes, and snippets.

@stuartmemo
stuartmemo / Note to Frequency
Created Sep 22, 2012
Convert note to frequency
View Note to Frequency
// 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) {