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

    Function reduceProgression

    • Reduce a chord progression to its frame, labelling every chord.

      One entry comes back per timeline segment, in the same order, so the two read in step. Filtering the result to 'structural' is the skeleton view — the I - IV - V - I under a progression that spells far more chords than that — and holding those chords fixed is what a reharmonizer needs in order to rewrite the surface without moving the harmony. Each entry carries its own startBeat and endBeat, so a filtered chord still knows where it sounds once the segments it was read against are gone.

      A chord is structural unless one of two figures demotes it: its root stepping in from the previous chord and on to the next in the same direction (passing), or stepping away from a harmony that returns (neighbor). Chords carrying the frame are never demoted, and what carries the frame is the module's stated theoretical position — see ReductionBasis for the reading this takes by default and the one it can be switched to.

      Chords separated by a rest form no figure across it, the way detectCadences pairs no chords across one.

      Parameters

      Returns ReducedChord[]

      One labelled chord per segment, in time order.

      If opts.basis is not one of the readings ReductionBasis names.

      import { chordTimelineFromChords, majorKey, reduceProgression } from '@libraz/libcantus';
      const timeline = chordTimelineFromChords(
      [
      { rootPc: 0, quality: 'maj7', startBeat: 0 },
      { rootPc: 1, quality: 'dim7', startBeat: 4 },
      { rootPc: 2, quality: 'min7', startBeat: 8 },
      ],
      12,
      );
      reduceProgression(timeline, majorKey(0)).map((entry) => entry.level);
      // ['structural', 'passing', 'structural']