@libraz/libcantus - v0.9.3
    Preparing search index...

    Function detectCadence

    • Classify the cadence formed by moving from one chord to the next.

      • authentic: V (dominant a fifth above the tonic) to I
      • plagal: IV (a fourth above the tonic) to I
      • deceptive: V to the submediant (diatonic vi or borrowed bVI in major, VI in minor)
      • half: any chord other than the dominant itself to V

      A static V-to-V repeat with no root motion is not a cadence and yields null.

      Parameters

      Returns Cadence

      The cadence type, or null.

      import { detectCadence, makeChord, majorKey } from '@libraz/libcantus';
      detectCadence(makeChord(7, 'maj'), makeChord(0, 'maj'), majorKey(0)); // => 'authentic'