UNPKG

note-to-frequency

Version:

🎼 converts a note (scientific pitch notation) to a frequency

7 lines (5 loc) • 251 B
import notes from '../data/notes'; export default (function (letter, octave) { var signature = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ''; return octave * notes.length + notes.indexOf('' + letter + signature) + 1; });