Accepts <root><quality>[/<bass>], e.g. Cmaj7, F#m7b5, Bb7, C/G,
C6/9, C6/9/E. Root and bass letters are case-insensitive, matching
parseNote. A / is ambiguous between a slash bass and the 6/9
quality; the text splits at the last / whose right-hand side is a valid
bare note preceded by a recognized quality, so 6/9 (with or without a
further slash bass) parses as a quality.
The parsed chord carries the root/bass spellings as enharmonic hints
(rootSpelling/bassSpelling) so formatChordSymbol can reproduce
flat spellings such as Bbmaj7 instead of respelling them with sharps.
Parse a lead-sheet chord symbol into a Chord.
Accepts
<root><quality>[/<bass>], e.g.Cmaj7,F#m7b5,Bb7,C/G,C6/9,C6/9/E. Root and bass letters are case-insensitive, matching parseNote. A/is ambiguous between a slash bass and the6/9quality; the text splits at the last/whose right-hand side is a valid bare note preceded by a recognized quality, so6/9(with or without a further slash bass) parses as a quality.The parsed chord carries the root/bass spellings as enharmonic hints (
rootSpelling/bassSpelling) so formatChordSymbol can reproduce flat spellings such asBbmaj7instead of respelling them with sharps.