The interval name: an optional '-', a quality label, and a
diatonic number. Surrounding whitespace is ignored.
The spelled interval. descending is always present, false for an
ascending name, and the span is the one intervalSemitones reports —
negative for the rare second narrowed past a zero span.
If the name is not a quality label followed by a number, or the two cannot describe the same interval. Use tryParseInterval where failure is ordinary, such as an interval field read on every keystroke.
Parse an interval name such as
'P5','m3','AA4', or'-m3'.A leading
'-'names the same interval taken downward: the span is negated anddescendingis set. The flag is not redundant with the sign — a descending unison spans zero semitones, so only the flag records that the letters move down.