@libraz/libcantus - v1.1.0
    Preparing search index...

    Function modalInterchangePalette

    • The modal-interchange palette of a key.

      Lists the diatonic triads of the parallel key that are not diatonic to key (the classic borrowed chords such as iv, bVI, and bVII in a major key), plus the Neapolitan (a major triad on the flat second degree). Each carries its Roman numeral and borrowedSource relative to key.

      Every chord is spelled as the mode it is borrowed from writes it, recorded as a rootSpelling hint: C major borrows Fm, Ab and Bb from C minor and takes Db as its Neapolitan, while a minor key borrows in the other direction (A minor borrows A, D and F#m from A major, with Bb as its Neapolitan). The major dominant of a minor key — E in A minor — is not among them: raising the seventh degree is an alteration inside the key rather than a chord taken from the parallel mode.

      Parameters

      • key: SpelledKeyLike

        The prevailing key, as a key name or as a key/scale.

      Returns BorrowedChord[]

      The borrowed-chord palette.

      import { modalInterchangePalette, majorKey, formatChordSymbol } from '@libraz/libcantus';
      const palette = modalInterchangePalette(majorKey(0));
      palette.map((borrowed) => formatChordSymbol(borrowed.chord));
      // ['Cm', 'Ddim', 'Eb', 'Fm', 'Gm', 'Ab', 'Bb', 'Db'] — flat-side, not 'D#'/'G#'/'A#'