the midi note number
= default: { sharps: false, pitchClass: false }
the note name
import { midiToNoteName } from '../midi'
midiToNoteName(61) // => "Db4"
midiToNoteName(61, { pitchClass: true }) // => "Db"
midiToNoteName(61, { sharps: true }) // => "C#4"
midiToNoteName(61, { pitchClass: true, sharps: true }) // => "C#"
// it rounds to nearest note
midiToNoteName(61.7) // => "D4"
Given a midi number, returns a note name. The altered notes will have flats unless explicitly set with the optional
useSharps
parameter.