List the chords a modulation from from to to can pivot on.
A pivot chord belongs to both keys at once, so it can be heard as a degree of
the key being left and reinterpreted as a degree of the key being entered —
the seamless way into the new key. Candidates are the diatonic triads of
from, degrees 1 through 7, kept when every one of their pitch classes is
also a scale tone of to; the result is ordered by their degree in from.
Only triads are candidates. The textbook pivot is a triad: a seventh narrows
the shared ground by a whole tone for no analytical gain, and the chord that
turns the modulation is heard as a triad whether or not a seventh is played
over it.
A key that is not heptatonic has no diatonic triads at all — stacking scale
thirds only lands on a triad over seven degrees — so such a from key yields
an empty list rather than an error. A to key is only tested for membership,
so it may be any scale; its numerals then follow the chordToRoman
fallback of naming roots against the parallel major.
The shared triads, ascending by their degree in from.
Example
import { majorKey, pivotChords } from'@libraz/libcantus'; pivotChords(majorKey(0), majorKey(7)).map((p) =>`${p.romanFrom}=${p.romanTo}`); // ['I=IV', 'iii=vi', 'V=I', 'vi=ii'] — C major into G major
List the chords a modulation from
fromtotocan pivot on.A pivot chord belongs to both keys at once, so it can be heard as a degree of the key being left and reinterpreted as a degree of the key being entered — the seamless way into the new key. Candidates are the diatonic triads of
from, degrees 1 through 7, kept when every one of their pitch classes is also a scale tone ofto; the result is ordered by their degree infrom.Only triads are candidates. The textbook pivot is a triad: a seventh narrows the shared ground by a whole tone for no analytical gain, and the chord that turns the modulation is heard as a triad whether or not a seventh is played over it.
A key that is not heptatonic has no diatonic triads at all — stacking scale thirds only lands on a triad over seven degrees — so such a
fromkey yields an empty list rather than an error. Atokey is only tested for membership, so it may be any scale; its numerals then follow the chordToRoman fallback of naming roots against the parallel major.