Skip to content

3. Dissonance Treatment ​

Dissonance is not forbidden — counterpoint runs on the tension it creates and releases. What the validator rejects is unmanaged dissonance. This chapter catalogs the legal patterns, from the metric rules that govern where dissonance may sit, to the suspension figures that stage it deliberately.

The engine distinguishes three questions:

  1. Is the vertical interval dissonant? (chapter 1's classification)
  2. Is the note a chord tone at a structurally strong point?
  3. If it is not stable, is there preparation and resolution?

Chord tone and non-chord tone

A chord tone is part of the active harmony. In a C major triad, C, E, and G are chord tones. A note such as D or F can still be musical, but it needs a function such as passing between stable notes — hence "non-chord tone" (NCT).

Structural accents demand chord tones ​

The downbeat is always a structural anchor, and meter adds medium-strength anchors: beat 3 in 4/4, dotted pulses in compound meter, beat 2 in a Sarabande, and the midpoint of longer even simple meters (primer). The engine requires generated notes at every such accent to belong to the active chord — the root, third, fifth, and a declared seventh when the harmony includes one (primer) — and simultaneous voice pairs there to be consonant against the actual bass.

Strong beatStrong-beat non-chord tone
Downbeats are structural anchors. Generated notes are expected to belong to the active triad there.
strong_beat_dissonanceThe red downbeat note is not root, third, or fifth of the active triad.
VerticalUnsupported vertical dissonance
This check samples simultaneous voices on strong beats and blames the editable Compose side of the pair.
vertical_dissonanceThe simultaneous red interval is dissonant and has no declared suspension or passing-tone context.
RuleFires when
strong_beat_dissonanceA Compose-source note at a structural accent is not a tone of the active chord at that tick; a declared seventh counts when the chord has one.
vertical_dissonanceA voice pair sounding together at a structural accent is dissonant. The base consonant set is {0, 3, 4, 5, 7, 8, 9}, but a fourth above the actual bass is dissonant unless a declared suspension or cadential 6/4 licenses it; a fourth between upper voices can be legal. Fixed-source handling follows the Generation/FinalScore lifecycle and the form's vertical budget.

The seventh distinction is deliberate. On a strong position, a seventh that the active chord declares is a chord tone. On a weak position, the non-chord-tone check uses the triad root, third, and fifth; an active chordal seventh therefore still needs the appropriate stepwise preparation and resolution when it is treated as a non-chord tone there.

Weak positions tolerate legible dissonance ​

Between structural accents, a dissonant non-chord tone is acceptable when the line makes its function audible — approached and left by step (motion to the adjacent scale note, at most 2 semitones). The two classic shapes:

Allowed weak beatPrepared passing dissonance
The same dissonance would be unsafe as a structural arrival; stepwise context makes it a passing tone.
unprepared_dissonanceThe middle non-chord tone is approached and left by step.
Allowed weak beatNeighbor tone
A neighbor tone decorates one pitch by stepping away and back. Like the passing tone, it is legible because both the approach and the departure are steps — the validator accepts it on a weak beat.
unprepared_dissonanceThe line steps down to a dissonance and returns to the same note.

A passing tone fills the gap between two chord tones a third apart; a neighbor tone steps off a chord tone and returns. Both read as ornamentation of a stable frame.

Bach runs the pattern at sixteenth-note speed. In bar 2 of the C major fugue (WTC I), the running line clashes twice with the answer above it — a fourth, then a seventh — and both clashes pass the contract:

From BachBach: WTC I Fugue in C major — passing tones in the wild
Bar 2 of the C major fugue (WTC I, BWV 846): the answer enters above in calm eighths — G, A, B — while the first voice keeps its sixteenths running underneath. Twice the running line clashes with the held note above it: a fourth against G, then a major seventh against B. Both dissonances sit on weak sixteenths, both are approached by step and left by step, and the seventh melts into a bare octave one sixteenth later. This is the passing-tone contract executed at speed — the textbook pattern of the previous figure, in real counterpoint, twice in a single bar.
unprepared_dissonanceA fourth and a seventh sound against the answer — both on weak sixteenths, both entered and left by step.

The same dissonance without that frame fails:

Weak beatUnprepared dissonance
Weak-beat non-chord tones are accepted only when approach and departure make the pattern legible.
unprepared_dissonanceThe weak-beat dissonance is left by leap, so it does not read as a passing tone.
RuleFires when
unprepared_dissonanceDuring Generation, a weak-position non-chord tone is approached or left by more than 2 semitones — it neither passes nor neighbors. FinalScore audits all sources. A voice's very first and last notes are exempt: with no neighbor on one side, "approached by step" cannot even be evaluated.

Suspensions: dissonance by appointment ​

A suspension is the most deliberate dissonance in tonal music — a three-stage figure that the engine's material model declares explicitly:

Suspension in plain language

A note that was safe gets held while the harmony underneath changes, becomes temporarily tense, then resolves by step. Think of it as a delayed update: the old value remains for one beat, then catches up.

  1. Preparation — the note sounds as a consonance.
  2. Suspension — the note is held over (a tie — one continuous sound across the boundary) while the other voice moves, creating the declared dissonance.
  3. Resolution — the suspended voice moves by a single diatonic step in the prescribed direction.

The engine validates four declared patterns. The 4–3, 7–6, and 9–8 labels correspond to familiar suspension figures; its 2–3 carrier is an engine-specific direction contract rather than the usual historical lower-voice 2–3 suspension, which is described as a downward resolution in Open Music Theory. Each name identifies the dissonant interval over the bass and the interval it resolves to:

Allowed pattern4-3 suspension
The most common suspension at cadences. Preparation: the note is consonant. Suspension: the bass moves underneath, turning it into a fourth. Resolution: the voice falls one step to the third of the chord.
suspension_preparationsuspension_resolution_step_downThe held note becomes a fourth over the new bass, then resolves down by step to a third.
Allowed pattern7-6 suspension
The bracket marks the three points the material declaration requires: preparation, suspension, resolution. The dedicated rule additionally verifies a genuine seventh above the bass that resolves to a genuine sixth.
suspension_preparationsuspension_resolution_step_downsuspension_seventh_sixthPreparation ties into the dissonance, then resolves down by step from 7 to 6.
Allowed pattern9-8 suspension
The 9-8 suspension resolves into a perfect interval, so it sounds more final than 7-6 or 4-3. Bach often reserves it for moments where the texture settles.
suspension_preparationsuspension_resolution_step_downThe held note forms a ninth over the bass and resolves down into the octave.

The Bach excerpt below shows a 9–8 suspension whose bass drops an octave at the resolution, so the example keeps the actual bass motion visible rather than treating the interval label as a complete analysis.

From BachBach: WTC I Prelude in B minor (BWV 869) — a displaced 9–8 suspension
In m. 3 of WTC I’s B minor prelude (BWV 869), the reduced alto line begins as a consonant minor tenth over E3. G4 is held into beat 3, where F♯3 below it forms a minor ninth; the line then resolves down to F♯4 as the bass drops from F♯3 to F♯2, so the sounding resolution is a double octave (15th), not an octave. The final E4 is clipped at the barline and continues into m. 4. The soprano and other keyboard notes are omitted. This score illustrates the 9–8 type; the validator does not infer a Bach suspension from this reduced excerpt.
suspension_preparationsuspension_resolution_step_downG4 is held into a minor ninth, then falls to F♯4 while the bass drops to F♯2, making a sounding fifteenth.
Teaching exampleConventional 2-3 suspension
This illustrative two-bar example shows the conventional 2-3 figure below a cantus: a consonant preparation on the weak fourth beat, a bass note tied into the next bar’s strong beat, an upper step into the dissonant second, and a downward bass resolution on the following weak beat while the upper C holds. The engine’s named Sus2_3 carrier currently uses the opposite bass direction (an ascending step), so this teaching example illustrates the interval relationship but is not an engine-accepted pattern.
suspension_preparationsuspension_resolution_step_downThe bass is tied into the strong beat, then resolves down while the upper note holds.

Chained, the suspension stops being an event and becomes a texture — each resolution doubles as the next preparation:

Allowed patternThe 7-6 chain
Chained, the 7-6 figure becomes a vehicle: the upper voice is tied over each bass step, clashes at a seventh, resolves to a sixth — and that sixth is already the preparation for the next seventh. The syncopated upper line against the steadily falling bass is one of the most recognizable sounds in Baroque sequences.
suspension_seventh_sixthsuspension_resolution_step_downEach resolution becomes the preparation of the next suspension as the bass walks down.

Bach opens the B minor prelude that closes WTC I with exactly this texture — except the suspensions are handed back and forth between two voices over a walking bass:

From BachBach: WTC I Prelude in B minor — suspensions passed between voices
The opening of the B minor prelude that closes WTC I (BWV 869). Three suspensions in two bars, handed between the voices: the alto holds B into a fourth over the bass's F♯ and falls to A; the soprano ties F♯ across the barline into a fourth over C♯ and falls to E; the alto holds C♯ into a ninth over B and falls to B. Every one follows the three-stage script — consonant preparation, tie, step-down resolution — that suspension_preparation and suspension_resolution_step_down enforce. The soprano's final D is itself tied on into bar 3, where it makes the next seventh: the chain simply keeps going.
suspension_preparationsuspension_resolution_step_downOver a walking bass, soprano and alto take turns holding a note into a dissonance and resolving it down by step.
FigureDissonance → resolutionDirectionTypical home
4-3fourth over the bass → thirddowncadences
7-6seventh → sixthdownsequential chains (the "7-6 chain")
9-8ninth → octavedownmoments of settling; resolves into a perfect interval
2-3second (suspended bass) → thirdup in this enginethe engine's bass-suspension carrier; historical lower-voice 2–3 suspensions normally resolve down as the bass falls

How the validator sees this chapter ​

RuleFailKindCheck
strong_beat_dissonanceMusicalFailDuring Generation, a Compose-source pitch class at a structural accent must be in the active chord; a declared seventh is included. FinalScore audits every source.
vertical_dissonanceMusicalFailStructural-accent simultaneities must be bass-sensitively consonant or carry a valid suspension/cadential 6/4 license; source handling continues through FinalScore and the form budget.
unprepared_dissonanceMusicalFailWeak-position NCTs must be approached and left by step (≤2 semitones).
suspension_preparationMusicalFailThe preparation pitch is consonant against the lowest sounding voice and ties (same pitch) into the suspension.
suspension_preparation_durationMusicalFailThe preparation lasts at least as long as the suspension it prepares.
suspension_metrical_accentMusicalFailThe suspension must land on a stronger metrical position than its preparation.
suspension_resolution_step_downMusicalFailThe resolution is a 1–2 semitone step in the prescribed direction: down for 4-3 / 7-6 / 9-8, up for 2-3.
suspension_intervalMusicalFailThe intervals between the suspended voice and the lowest sounding other voice must match the declared type: 4-3, 7-6, 9-8, or 2-3; for 2-3, the suspended voice is the bass and the interval is measured upward from it.
suspension_seventh_sixthMusicalFailA declared 7-6 figure must form a genuine seventh over the lowest sounding voice and resolve to a genuine sixth (verified via provenance bits, so the rule is inert where no suspension carrier shipped).

Continue with Chapter 4 — Melodic Writing.

Dual-licensed: AGPL-3.0 · commercial licensing available. Generated MIDI is yours to use freely.