UNPKG

note-to-frequency

Version:

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

8 lines (5 loc) • 213 B
// @flow import notes from '../data/notes'; export default (letter: string, octave: number, signature: string = ``): number => { return (octave * notes.length) + notes.indexOf(`${letter}${signature}`) + 1; };