index.js
function fromFreq (freq, tuning) {
  tuning = tuning || 440
  var lineal = 12 * ((Math.log(freq) - Math.log(tuning)) / Math.log(2))
  var midi = Math.round(69 + lineal)
  return fromMidi(midi)
}
function fromFreq (freq, tuning) {
  tuning = tuning || 440
  var lineal = 12 * ((Math.log(freq) - Math.log(tuning)) / Math.log(2))
  var midi = Math.round(69 + lineal)
  return fromMidi(midi)
}
function fromFreq ( freq , tuning ) { tuning = tuning || 440 var lineal = 12 * ( ( Math . log ( freq ) - Math . log ( tuning ) ) / Math . log ( 2 ) ) var midi = Math . round ( 69 + lineal ) return fromMidi ( midi ) }
Get the pitch of a given frequency.

It will round the frequency to the nearest pitch frequency. Use `cents` function
if you need to know the difference between the the frequency and the pitch.

@param {Float} freq - the frequency
@return {String} the pitch

@see cents

@example
pitch.fromFreq(440) // => 'A4'
pitch.fromFreq(443) // => 'A4'
pitch.cents(443, 'A4') // => ... to get the difference
Get the pitch of a given frequency .