A chord expressed as a root pitch class plus semitone offsets.
intervals is what the chord sounds and quality is what it is called. The
two are not equally expressive: a chart writes any set of alterations over a
base, while ChordQuality is a closed list of names, so quality is a
derived label — the name that fits the chord exactly, or else the nearest
name inside it (see chordSpecQuality). Read the structure with
chordSpecOf rather than the name when the alterations matter; that is
also what formatChordSymbol does, so a chord no name covers still
writes itself out in full.
rootSpelling/bassSpelling are optional enharmonic hints recorded by
parsers (e.g. parseChordSymbol('Bb7')) so formatters can reproduce the
original spelling instead of defaulting to sharps. Consumers may ignore
them; a hint is only trusted when its pitch class still matches the
corresponding rootPc/bassPc.
toneSpellings is the same kind of hint for the tones themselves, one
spelling per entry in intervals. It exists for the chords whose letters do
not follow from stacking thirds: an augmented sixth is ten semitones like a
minor seventh but is five letters above its root rather than six, and no
ChordQuality can say so. Builders that know better attach it, and
spellChordFromRoot reads the letter distances back out of it; a hint
is trusted as a whole or not at all, and only while every spelling still
names the pitch class its interval names.
A chord expressed as a root pitch class plus semitone offsets.
intervalsis what the chord sounds andqualityis what it is called. The two are not equally expressive: a chart writes any set of alterations over a base, while ChordQuality is a closed list of names, soqualityis a derived label — the name that fits the chord exactly, or else the nearest name inside it (see chordSpecQuality). Read the structure with chordSpecOf rather than the name when the alterations matter; that is also what formatChordSymbol does, so a chord no name covers still writes itself out in full.rootSpelling/bassSpellingare optional enharmonic hints recorded by parsers (e.g.parseChordSymbol('Bb7')) so formatters can reproduce the original spelling instead of defaulting to sharps. Consumers may ignore them; a hint is only trusted when its pitch class still matches the correspondingrootPc/bassPc.toneSpellingsis the same kind of hint for the tones themselves, one spelling per entry inintervals. It exists for the chords whose letters do not follow from stacking thirds: an augmented sixth is ten semitones like a minor seventh but is five letters above its root rather than six, and no ChordQuality can say so. Builders that know better attach it, and spellChordFromRoot reads the letter distances back out of it; a hint is trusted as a whole or not at all, and only while every spelling still names the pitch class its interval names.