Skip to content

1. Intervals & Consonance

Counterpoint starts with one measurement: the vertical distance between two voices sounding at the same time. Everything else in this course — parallels, dissonance treatment, cadences — is built on how that distance is classified.

What is an interval?

An interval is the distance between two notes. Count letter names inclusively from the lower note to the upper note: C-D-E-F-G is five letter steps, so C to G is a fifth. MIDI stores pitches as semitones, so the engine also sees that C to G is 7 semitones. The validator works in semitones modulo 12 — an octave plus a third is still "a third" for consonance purposes.

The three families

Baroque practice sorts intervals into three families, and the engine encodes exactly this taxonomy in its consonant interval-class set {0, 3, 4, 5, 7, 8, 9} (semitones mod 12):

FamilyIntervalsSemitones (mod 12)Engine treatment
Perfect consonanceunison, 5th, octave0, 7Stable pillars — but repeating them by parallel motion is forbidden (chapter 2).
Imperfect consonance3rds, 6ths3, 4, 8, 9The everyday contrapuntal sound; may move in parallel freely.
Dissonance2nds, 7ths, tritone1, 2, 6, 10, 11Needs a declared or recognizable job: passing motion, suspension, pedal context (chapter 3).
Special caseperfect 4th5In the consonant set, but a scoped rule rejects strong-beat fourths in upper-voice pairs.

The staff figures label intervals with the standard shorthand — P5 (perfect fifth), M3 (major third), m10 (minor tenth), A4 (augmented fourth, the tritone). If the letters are new, the interval name legend in the primer decodes them all.

Perfect consonances: stable but hollow

Perfect consonancePerfect consonances: fifth, octave, twelfth
Perfect consonances are acoustically hollow and stable. They anchor beginnings and endings, but two voices that keep landing on them in parallel stop sounding independent — that is why the parallel rules in the next chapter exist.
Each upper note forms a perfect consonance with the held C.

Perfect intervals are acoustically the purest — their frequency ratios are simple (2:1 for the octave, 3:2 for the fifth) — which is exactly why they are dangerous. Two voices locked in perfect intervals blend so well that the ear stops hearing two voices. Counterpoint wants stability at anchor points (openings, cadences) and independence everywhere else.

Imperfect consonances: the workhorses

Imperfect consonanceThirds, sixths, and tenths
Imperfect consonances are the workhorses of two-voice counterpoint: rich enough to sound full, unstable enough to keep moving. Unlike perfect intervals, voices may travel in parallel thirds or sixths freely.
Thirds and sixths against the held C — full but mobile sonorities.

Thirds, sixths, and their compounds (tenths, thirteenths) are full but mobile. Most of the vertical sonorities in a generated two-voice texture are imperfect consonances, and chains of parallel thirds or sixths are idiomatic — the engine never penalizes them.

Bach exploits that license at full tilt. In the E♭ major prelude from WTC I, two sixteenth-note lines run an entire bar in strict parallel tenths:

From BachBach: WTC I Prelude in E♭ — a full bar of parallel tenths
Bar 32 of the E♭ major prelude (WTC I, BWV 852): two lines race a whole bar in lockstep tenths — a compound third on every single sixteenth. The quality flexes between major and minor as the scale dictates, but the family never leaves imperfect consonance, so the parallel rules of chapter 2 have nothing to say. Compare what happens when voices try the same trick with fifths or octaves. (The sustained notes that ring above each run — B♭ and G, then E♭ and C — are omitted here.)
Two sixteenth-note lines move in strict parallel tenths for the whole bar — and no rule objects.

And one bar of the C minor prelude shows the two families dividing the labor — perfect consonances standing as pillars on the strong positions, sixths carrying all the motion between them:

From BachBach: WTC I Prelude in C minor — perfect pillars, imperfect motion
Bar 1 of the C minor prelude (WTC I, BWV 847) divides the labor exactly as this chapter describes. On the strong half-bars the hands meet in a bare double octave — the perfect consonance, stable and hollow, used as a pillar. Every sixteenth in between is a sixth — the imperfect consonance, full and mobile, carrying all the motion. Neither family does the other's job: the octaves never move in parallel (that would fuse the hands into one voice), and the sixths never have to bear structural weight. One bar of churning texture, and the whole division of labor is on display.
The strong positions anchor on bare octaves; every sixteenth between them runs in sixths.

Dissonances: tension with an obligation

DissonanceSeconds, sevenths, and the tritone
Dissonance is not forbidden — counterpoint runs on the tension it creates. What the validator rejects is unmanaged dissonance: a clash that arrives without preparation or leaves without resolution. Chapter 3 covers the legal patterns.
vertical_dissonanceEach red interval is dissonant: it demands preparation and resolution.

Consonance and dissonance are roles, not aesthetics

Consonance means the interval can stand as a structural sonority. Dissonance means the interval needs a job: passing motion, suspension, preparation, or resolution. The validator is not judging "nice" versus "ugly"; it is checking whether an unstable interval has a declared musical reason. Chapter 3 catalogs the legal jobs.

The fourth: counterpoint's boundary case

Context-dependentThe perfect fourth: consonant or dissonant?
The fourth is the boundary case of interval theory. Between upper voices over a supporting bass it sounds consonant; directly against the bass it behaves as a dissonance and resolves to a third. The engine encodes this ambivalence: its interval-class table accepts the fourth, but a scoped rule rejects strong-beat fourths in upper-voice pairs.
fourth_only_on_weak_beatThe fourth above the bass resolves down to a third, like a dissonance.

The perfect fourth has been argued about for centuries, and the engine's treatment mirrors the historical compromise:

  • Against the bass, a fourth behaves as a dissonance — it wants to resolve down to a third (this is the skeleton of the 4-3 suspension in chapter 3).
  • Between upper voices over a supporting bass, a fourth is acceptable — but the scoped rule fourth_only_on_weak_beat still rejects it as a pillar on a strong beat (the bar's downbeat) in upper-voice pairs, because in invertible counterpoint a fourth flips into a fifth (chapter 2).

How the validator sees this chapter

The interval families are not a rule themselves; they are the lookup table that the vertical rules consult.

ConceptWhere it is enforced
Consonant interval-class set {0, 3, 4, 5, 7, 8, 9}vertical_dissonance (chapter 3), suspension preparation checks
Perfect intervals (0, 7 mod 12)parallel and hidden-parallel rules (chapter 2)
The scoped fourthfourth_only_on_weak_beat (chapter 2)

Continue with Chapter 2 — Motion & Forbidden Parallels.

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