subsequence.cadences

Cadences — the curated formula table behind the producer cadence names.

A cadence is a two-chord tail formula plus a melodic close degree. The producer names are primary — "strong", "soft", "open", "fakeout" — with the theory names (authentic, plagal, half, deceptive) accepted as aliases, per the standing rule: theory machinery under the hood, producer words on the surface.

The table is pure data; the consumers wire it in:

  • Progression.cadence(name) — tail substitution on a progression value.

  • Progression.generate(cadence=) / freeze(cadence=) — the formula becomes pins on the final bars of the constrained walk.

  • Motif.generate(cadence=) — the close degree becomes end_on.

  • Composition.request_cadence() / section_cadence() — the live clock steers its walk to arrive at the formula.

  • sentence() / period() — the close degree aims the final unit.

Formula elements follow the progression-element grammar: ints are diatonic degrees (quality inferred from key+scale at resolution time — 4 is IV in major and iv in minor), roman strings carry their quality with them ("V" is the major dominant even in minor — the cadential convention).

Module Contents

class subsequence.cadences.Cadence[source]

One cadence formula — a named tail plus its melodic close.

name[source]

The producer name (the primary key in the table).

theory_name[source]

The traditional name, for the curious.

formula[source]

The chord tail, in progression-element grammar, ending on the arrival chord.

close_degree[source]

The scale degree a melody lands on at this cadence (1 for full closes; 5 for the open half — and 1 for the fakeout too: the melody resolves as promised while the harmony swerves, which is the trick of it).

subsequence.cadences.cadence_formula(name: str) Cadence[source]

Look up a cadence by producer name or theory alias, loudly.

Raises:

ValueError – If the name is unknown — the error lists every valid name and alias.