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 it entered and left in a way that explains it?

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).

How the engine scopes these rules

The accent rules run at structural accents only; the weak-position rule runs everywhere else. During Generation the note-level rules check only Compose notes, and a pair made only of fixed Material or Ornament notes is exempted; FinalScore audits every source again (validation lifecycle). The rule tables below say "lifecycle" for this instead of repeating it.

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 structural accents and blames the editable Compose side of the pair. A passing-tone shape does not help here: on an accent, only a declared suspension or cadential 6/4 licenses a dissonance.
vertical_dissonanceThe simultaneous red interval is dissonant on a structural accent, with no declared suspension or cadential 6/4 behind it.
RuleFires when
strong_beat_dissonanceA 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. When the active chord declares a seventh, a pair whose two tones both belong to that chord counts as consonant.

The two rules share one chord-membership test. When the active chord declares a seventh, a vertical pair whose two tones both belong to that chord (the seventh against the root, the tritone of V7, the fourth inside V4/3) is read as harmony and passes vertical_dissonance, just as the seventh itself passes strong_beat_dissonance. A fourth over the bass outside such a sonority still needs a suspension or a cadential 6/4 license. The example below sets a declared V7 seventh on the downbeat against a fourth that belongs to no chord:

One chord testA chord seventh on the downbeat
strong_beat_dissonance and vertical_dissonance read the same chord-membership test. When the plan declares a seventh, the seventh itself passes the first rule, and a pair whose two tones both belong to the chord passes the second: the seventh against the root, the tritone of V7, the fourth inside V4/3. In Baroque practice the seventh of V7 on a strong beat is normal, provided it resolves down by step, as F does to E here. Switch to the second figure for a fourth that belongs to no chord.
strong_beat_dissonancevertical_dissonanceF is the seventh of G7, and F against G is a pair of chord tones, so both accent rules accept it.

In Baroque practice the dominant seventh on a strong beat is ordinary, as long as the seventh resolves down by step. On a weak position, the non-chord-tone check uses only the triad root, third, and fifth, so a chordal seventh there also needs stepwise entry and exit.

Weak positions tolerate legible dissonance ​

Between structural accents, a 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 beatPassing dissonance on a weak beat
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.

Baroque music has more non-chord-tone figures than these two, and the engine accepts fewer of them than the style does. Step in, leap out is an escape tone, a real figure that the engine's step-in, step-out contract rejects:

Engine rejectsEscape tone: a real figure the engine rejects
Stepping off a chord tone and then leaping away in the other direction is an escape tone (échappée), a figure Baroque composers use freely, often to decorate a cadence. The engine is more conservative than the style. unprepared_dissonance accepts a weak-beat non-chord tone only when it is both approached and left by step, so it rejects this one.
unprepared_dissonanceThe weak-beat D is entered by step but left by leap, so it is neither a passing nor a neighbor tone.
RuleFires when
unprepared_dissonanceA note at a weak position that is not a root, third, or fifth of the active triad is approached or left by more than 2 semitones. It applies to every such tone, even one that happens to be consonant with the other voices. A voice's very first and last notes are exempt: with no neighbor on one side, "approached by step" cannot be evaluated.

The rule's name uses "prepared" loosely, to mean "approached by step". A suspension's preparation (below) is something stricter: the same pitch sounding first as a consonance, then held over.

The non-chord-tone figures ​

Dissonances that fall between the beats are unaccented; those that land on the beat and delay the chord tone are accented. In the table, "accent" means the engine's structural accent: beat 2 of a 4/4 bar is a weak position to the validator even though a player may lean on it.

FigureApproachDeparturePositionEngine verdict
Passing tonestepstep, same directionbetween beatsaccepted
Neighbor tonestepstep backbetween beatsaccepted
Anticipationsteprepeated: the next chord tone arrives earlybetween beatsaccepted (a repeated pitch counts as a step of 0)
Escape tonestepleap, opposite directionbetween beatsrejected by unprepared_dissonance
Cambiatastep downleap down a third, then step upbetween beatsrejected by unprepared_dissonance (left by leap)
Appoggiaturaleapstepon the beatrejected: at an accent by strong_beat_dissonance, at a weak position by unprepared_dissonance
Accented passing tonestepstepon the beatrejected at an accent; at a weak position the engine sees an ordinary passing tone
Suspensionheld over by a tiestep downon the beataccepted only when declared; checked by the suspension rules

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, usually on a weaker beat.
  2. Suspension — the note is held over (a tie — one continuous sound across the boundary) into a stronger beat while the other voice moves, creating the dissonance.
  3. Resolution — the suspended voice moves by a single diatonic step, on a weaker beat again.
Where a suspension sits in the barTwo bars of 3/4 drawn as a timeline. The top row shows beat strength: each downbeat is strong, beats 2 and 3 are weak. The upper voice plays E5, then C5 on weak beat 2, tied across the bar line into the downbeat. The bass moves from A3 to G3 under the tie, so the held C becomes a dissonant fourth on the strong downbeat. On weak beat 2 the upper voice falls to B4, a tenth above G, and the bar closes on C over C.A 4-3 suspension in 3/4: the dissonance is placed on the stronger beat, and both its neighbors are weaker.BAR 1BAR 2BEATstrongweakweakstrongweakweakUPPERBASSE5C5C5B4C5tieC4A3G3C3M10m10P4M10P15preparationconsonant, on a weak beatsuspension4th on the downbeatresolutionstep down, weak beat

The metric placement is the point. The dissonance arrives on the accent, where the listener expects stability, and the resolution follows on a weak beat. Each name below identifies the dissonant interval over the bass and the interval it resolves to:

Allowed pattern4-3 suspension
The most common suspension at cadences. Preparation: C sounds on the weak second beat as a consonant third above the bass A. Suspension: the tie carries it over the bar line while the bass moves to G, so the dissonant fourth arrives on the downbeat, the strongest beat in the bar. Resolution: on the next, weaker beat the voice falls one step to B, the third of the G chord, and the phrase closes on C. The dissonance must sit on the stronger beat; prepare on the downbeat and suspend on a weak beat, and the figure loses its weight.
suspension_preparationsuspension_metrical_accentsuspension_resolution_step_downC is prepared on a weak beat, tied into the downbeat as a fourth over G, then falls to B, a third.
Allowed pattern7-6 suspension
The bass steps down from D to C under a held B: what was a consonant sixth becomes a seventh on the downbeat, and the upper voice resolves down to the sixth while the bass stays put. 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_metrical_accentsuspension_resolution_step_downsuspension_seventh_sixthB is prepared as a sixth over D, held into the downbeat as a seventh over C, then falls to A, a sixth.
Allowed pattern9-8 suspension
The bass moves from G to C, dominant to tonic, under a held D, which becomes a ninth on the downbeat and resolves down into the octave over the same bass. 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_metrical_accentsuspension_resolution_step_downD is prepared as a fifth over G, held into the downbeat as a ninth over C, then falls 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. Its preparation is a half note on the downbeat and the dissonance arrives on beat 3, with the resolution on the off-beat after it. The dissonance is stronger than its resolution, which is all suspension_metrical_accent asks (see below), so a preparation on a stronger beat than the dissonance is allowed.

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_metrical_accentsuspension_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.

In a 2-3 suspension the held note is in the bass: the bass is tied over, the upper voice moves against it to form a second (or ninth), and the bass resolves down by step to a third:

Teaching example2-3 suspension in the bass
In a 2-3 suspension the suspended note is in the bass. Preparation: B sounds on beat 3 as a consonant tenth below D. Suspension: the bass holds B over the bar line while the upper voice steps down to C, so the dissonant second (here a ninth) falls on the downbeat. Resolution: the bass falls one step to A and the interval opens to a tenth, a compound third. The upper C simply holds; the voice that resolves is the one that was suspended. The engine declares this as a Sus2_3 pattern: the suspended voice must be the lowest voice, and all four suspension types resolve down. No form emits it today.
suspension_resolution_step_downsuspension_intervalThe bass holds B into the downbeat under the upper C, forming a ninth (a compound second), then falls to A, a tenth.

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. Each preparation sits on a weak beat (2 or 4) and each seventh on the accented beat after it (3 or 1), so every link keeps the dissonance on the stronger side of the tie. The syncopated upper line against the steadily falling bass is one of the most recognizable sounds in Baroque sequences.
suspension_seventh_sixthsuspension_metrical_accentsuspension_resolution_step_downEach resolution becomes the preparation of the next suspension as the bass walks down; every seventh lands on beat 1 or 3.

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. Because the bass keeps walking in eighths, the resolutions do not land on the textbook intervals: the alto's A meets the bass A on an octave, the soprano's E sounds over A♯ as the seventh of an F♯7 chord, and the alto's B lands a tenth above G. 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 → resolutionSuspended voiceTypical home
4-3fourth over the bass → thirdupper, resolves downcadences
7-6seventh → sixthupper, resolves downsequential chains (the "7-6 chain")
9-8ninth → octaveupper, resolves downmoments of settling; resolves into a perfect interval
2-3second (or ninth) → thirdbass, resolves downdescending bass lines

All four types resolve down. The engine generates 4-3, 7-6, and 9-8 suspensions; it also declares a Sus2_3 type, the bass suspension described above, but no form emits it today.

How the validator sees this chapter ​

All rules below are MusicalFail.

RuleCheck
strong_beat_dissonanceThe pitch class of a note at a structural accent must be in the active chord; a declared seventh is included. Lifecycle.
vertical_dissonanceStructural-accent simultaneities must be bass-sensitively consonant or carry a valid suspension/cadential 6/4 license. When the active chord declares a seventh, a pair made of two tones of that chord passes. Lifecycle, then the form's vertical budget.
unprepared_dissonanceAny weak-position tone outside the active triad must be approached and left by step (≤2 semitones). Lifecycle.
suspension_preparationThe emitted preparation, suspension, and resolution pitches match the declaration; preparation and suspension are the same pitch; the preparation is consonant against the lowest sounding voice, or is the seventh of the chord declared at that moment (ii7 preparing a 4-3 over V).
suspension_preparation_durationThe preparation lasts at least as long as the suspension it prepares.
suspension_metrical_accentThe dissonance must fall on a strictly stronger metric position than its resolution. The preparation may sit on any beat: in 4/4, a preparation on beat 1, a dissonance on beat 3 and a resolution on beat 4 passes, as in Bach.
suspension_resolution_step_downThe resolution is a 1–2 semitone step in the declared direction: down for all four types, the bass of a Sus2_3 included.
suspension_intervalThe intervals between the suspended voice and the lowest sounding other voice match the declared type: 4-3, 7-6, 9-8, or 2-3; for 2-3 the suspended voice must be the lowest voice, with the other voice above it, and the interval is measured upward from it.
suspension_seventh_sixthA declared 7-6 figure must form a genuine seventh over the lowest sounding voice and resolve to a genuine sixth. Evaluated only when the emitted notes carry the SuspensionPrepared and SuspensionResolved provenance bits, so it 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.