README
Get frequency of a note:
var freq = require('note-freq')
freq(440, 'a4') // => 440
It works with midi numbers too:
freq(440, 57) // => 222
Usage
Get the frequency using a custom tunning:
// 69 is note A4
var freq = require('note-freq')
freq(440, 'a4') // => 440
freq(null, 'a4') // => 440
freq(444, 'a4') /// => 444
freq(null, 'a3') // => 220
// 57 is note A3
freq(444, 57) // => 222
Set default tuning
Normally you use the same tuning for all your app. You can partially apply the function to set the default tuning:
var freq = require('note-freq')(444)
// the freq function uses 444 as custom tuning
freq('A3') // => 222
License
MIT License