The note name.
Optionalopts: NoteNameOptions
system reads the name in that notation system instead of
detecting it.
The parsed note.
If the text is not a valid note in the given (or detected) system. Use tryParseNote where failure is ordinary, such as a note field read on every keystroke.
Parse a note name into a Note, in any supported notation system.
English (the default when a name could be read in more than one system) accepts a letter (case-insensitive) followed by any number of same-direction accidentals and an optional octave, e.g.
"C","C#4","Bb","F##3","Ebb2". Both#andx(double-sharp) are accepted for sharps;bfor flats. Mixing sharps and flats (e.g."C#b") is rejected.Without a
systemthe name is attributed by detectNoteNameSystem, which reads a name any two systems could claim as English:"B"is the B natural, never the German B flat. German is chosen only for a German-only name such as"H","fis"or"es".A scientific octave may follow the name in every system (
"gis4","嬰ト4"), which is what makes formatting and parsing exact inverses for an octave-bearing note.