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

    Function secondaryDominantOf

    • The secondary dominant (V7) that tonicizes a chord.

      secondaryDominant names its target by scale degree, so it only reaches the degrees a key actually has. This takes the target chord itself and needs no key at all, which is what lets a borrowed or chromatic target — bVI of a major key, a Neapolitan, any chord a modulation left behind — have its dominant built without first inventing a degree for it.

      A rootSpelling hint on the target moves with the root, so a flat-named target yields a flat-named dominant (Eb gives Bb7, not A#7).

      Parameters

      • target: ChordLike

        The chord to tonicize, as a chord symbol, chord data, or a Chord.

      Returns ChordData

      A dominant-seventh chord a perfect fifth above the target's root.

      If the target's root pitch class is not a finite number.

      import { makeChord, secondaryDominantOf } from '@libraz/libcantus';
      secondaryDominantOf(makeChord(8, 'maj')).rootPc; // 3 — Eb7 tonicizes the
      // borrowed bVI of C major