Human-readable chord name (e.g. "Cmaj7", "Bb7", "G/B").
The tuning system this chord operates in.
Step offset of the root from A4 (= 0).
Intervals from the root for each chord tone, in tuning steps. Must include 0 (the root) as the first element.
OptionalbassStep: numberOptional bass note step for slash chords (e.g. C/E). If provided and higher than the root, it is automatically moved an octave down.
OptionalpreferFlats: booleanOptional flat/sharp preference for note naming in getNotes().
When provided, overrides the root-name heuristic. Set by parseChordSymbol and
PLR transforms for context-aware accidental spelling.
OptionalbassOptional bass note step for slash chords (e.g. C/E). If provided and higher than the root, it is automatically moved an octave down.
ReadonlyintervalsIntervals from the root for each chord tone, in tuning steps. Must include 0 (the root) as the first element.
Human-readable chord name (e.g. "Cmaj7", "Bb7", "G/B").
Optional ReadonlypreferOptional flat/sharp preference for note naming in getNotes().
When provided, overrides the root-name heuristic. Set by parseChordSymbol and
PLR transforms for context-aware accidental spelling.
Step offset of the root from A4 (= 0).
The tuning system this chord operates in.
Returns true if the given step (or its pitch class) is a tone of this chord. Comparison is by pitch class - octave is ignored.
Returns the notes of the chord in a specific inversion.
0 = root position, 1 = 1st inversion, 2 = 2nd inversion, etc.
Values ≥ notes.length wrap around (modulo). Slash chord bass notes participate
in the inversion logic and may not stay at the bottom.
Returns the notes of the chord in root position. In 12-TET each tone is named by its interval above the written root (D#m → D# F# A#; Cm7b5 → C Eb Gb Bb; C7#11 has F#). For slash chords, the bass note is prepended below the root.
Returns the pitch classes of all chord tones as step offsets within one period
(0 to octaveSteps - 1). Does not include the bass note of slash chords.
Returns the tritone substitution of this chord.
Typically applied to dominant 7th chords (e.g., G7 -> Db7).
In another tuning it is the same substitution, when every note of the chord and of the
substitute stands for a 12-TET note (retune); otherwise null.
Returns a specific voicing of the chord.
close - notes in root position, as compact as possible (default stack).drop2 - second note from the top dropped one octave (requires ≥ 4 voices).drop3 - third note from the top dropped one octave (requires ≥ 4 voices).rootless - root note omitted (common in jazz piano comping).open - every other upper voice raised an octave (wider spacing).quartal - notes stacked by fourths (approximate; 12-TET–optimised).The same chord in another tuning: each note goes to the step of tuning that stands for
the same 12-TET note (TuningSystem.retuneStep). A Cmaj7 of 31-EDO becomes the Cmaj7 of
12-TET or of Werckmeister III; name and flat/sharp preference are kept.
The chord in tuning, or null when one of its notes stands for no 12-TET note
(a quarter tone) or tuning has no step for it.
Returns a new chord transposed by the given number of steps. The name follows: the root takes the spelling of the key with fewer accidentals, and a slash bass keeps its letter distance from the root (C/E +2 → D/F#; C/Bb +2 → D/C). By whole octaves the chord keeps its name.
Staticsmooth
A chord: a root pitch plus a set of intervals defining the chord quality, within a tuning system.
intervalsInStepscontains the offset in tuning steps from the root for each chord tone, including the root itself (offset 0) as the first element. Example:[0, 4, 7]= major triad in 12-TET (root, major third, perfect fifth).