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:
- Is the vertical interval dissonant? (chapter 1's classification)
- Is the note a chord tone at a structurally strong point?
- 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.
| Rule | Fires when |
|---|---|
strong_beat_dissonance | A 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_dissonance | A 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:
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:
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:
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:
unprepared_dissonance accepts a weak-beat non-chord tone only when it is both approached and left by step, so it rejects this one.| Rule | Fires when |
|---|---|
unprepared_dissonance | A 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.
| Figure | Approach | Departure | Position | Engine verdict |
|---|---|---|---|---|
| Passing tone | step | step, same direction | between beats | accepted |
| Neighbor tone | step | step back | between beats | accepted |
| Anticipation | step | repeated: the next chord tone arrives early | between beats | accepted (a repeated pitch counts as a step of 0) |
| Escape tone | step | leap, opposite direction | between beats | rejected by unprepared_dissonance |
| Cambiata | step down | leap down a third, then step up | between beats | rejected by unprepared_dissonance (left by leap) |
| Appoggiatura | leap | step | on the beat | rejected: at an accent by strong_beat_dissonance, at a weak position by unprepared_dissonance |
| Accented passing tone | step | step | on the beat | rejected at an accent; at a weak position the engine sees an ordinary passing tone |
| Suspension | held over by a tie | step down | on the beat | accepted 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.
- Preparation — the note sounds as a consonance, usually on a weaker beat.
- 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.
- Resolution — the suspended voice moves by a single diatonic step, on a weaker beat again.
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:
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.
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:
Sus2_3 pattern: the suspended voice must be the lowest voice, and all four suspension types resolve down. No form emits it today.Chained, the suspension stops being an event and becomes a texture — each resolution doubles as the next preparation:
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:
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.| Figure | Dissonance → resolution | Suspended voice | Typical home |
|---|---|---|---|
| 4-3 | fourth over the bass → third | upper, resolves down | cadences |
| 7-6 | seventh → sixth | upper, resolves down | sequential chains (the "7-6 chain") |
| 9-8 | ninth → octave | upper, resolves down | moments of settling; resolves into a perfect interval |
| 2-3 | second (or ninth) → third | bass, resolves down | descending 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.
| Rule | Check |
|---|---|
strong_beat_dissonance | The pitch class of a note at a structural accent must be in the active chord; a declared seventh is included. Lifecycle. |
vertical_dissonance | Structural-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_dissonance | Any weak-position tone outside the active triad must be approached and left by step (≤2 semitones). Lifecycle. |
suspension_preparation | The 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_duration | The preparation lasts at least as long as the suspension it prepares. |
suspension_metrical_accent | The 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_down | The resolution is a 1–2 semitone step in the declared direction: down for all four types, the bass of a Sus2_3 included. |
suspension_interval | The 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_sixth | A 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.