Function noteNumber

  • Gets the MIDI note number from a text representation (middle C is 'C4')

    Parameters

    • noteName: string

      Can include sharp (#) and flat (b) alterations, like Db5 or F#2.

    Returns number | string

    The MIDI note number or a string with an explanatory error message.