Universal Music Theory Library - v0.12.0
    Preparing search index...

    Function parseNote

    • Parses a note string into a Note object in 12-TET.

      Accepts: "C4", "Bb3", "F#", "c#5" (case-insensitive root). The original spelling (sharp or flat) is preserved in the returned Note's name.

      Parameters

      • noteStr: string

        Note string with optional octave number.

      • defaultOctave: number = 4

        Octave to use if none is specified (default: 4).

      Returns Note

      if the string cannot be parsed.