Skip to content

2. Motion & Forbidden Parallels ​

Chapter 1 classified single sonorities. This chapter adds time: how two voices move between sonorities, and which ways of moving into a perfect interval the validator rejects. In a few places the engine is stricter than common Baroque teaching; each one is pointed out where it comes up.

The four types of relative motion ​

Between any two consecutive sonorities, a voice pair moves in one of four ways (primer):

MotionDefinitionRisk level
ContraryThe voices move in opposite directions.Safest — independence is audible.
ObliqueOne voice holds while the other moves.Safe — the held voice anchors the pair.
SimilarBoth move in the same direction by different amounts.Risky into perfect intervals (hidden parallels).
ParallelBoth move in the same direction while keeping the interval.Fine for imperfect consonances; forbidden for perfects.
Safe motionContrary and oblique motion
Contrary and oblique motion are the safest ways to approach any interval — even a perfect one. Independence is audible because the voices do different things. Most parallel-rule violations disappear when one voice simply moves the other way.
First the voices move toward each other from opposite directions, then one holds while the other moves.
Allowed patternSimilar motion into an imperfect interval
The upper voice climbs a third while the lower voice steps up a second, so the interval changes from P5 to M6. Similar motion is only a risk when it lands on a perfect interval; arriving on a third or sixth this way is ordinary writing, and no rule looks at it.
Both voices rise by different amounts, from a fifth to a sixth.
Allowed patternParallel sixths are fine
The parallel prohibition applies only to perfect intervals. Chains of parallel thirds, sixths, and tenths are idiomatic Baroque writing — each sonority is rich enough that the voices keep their identity even while moving together.
Both voices move in parallel, but the repeated interval is imperfect.

Bach's Goldberg Variations 12 and 15 are canons by inversion, where the second voice is the first voice upside down. They are repertoire examples of contrary motion, not a universal rule for every passage:

From BachBach: Goldberg Variations — canons in contrary motion
the same mirror at two intervals —
Variation 12 of the Goldberg Variations (BWV 988) is a canon by inversion: the lower voice repeats the upper voice's line one bar later with every interval flipped — where the leader steps up, the follower steps down, mirror-exact for the whole variation. This excerpt shows how inversion produces contrary motion in this canon; it does not make contrary motion a universal rule in Bach's writing. In bar 2 the leader climbs to its peak while the follower descends beneath it. (The bass of the ground, which runs under both voices, is omitted here.)
The follower replays the leader upside down: every step up answered by a step down, one bar later.

Forbidden perfect parallels ​

Parallel fifths and octaves make two voices sound like a single doubled line — the classic loss of voice independence. Play the two examples below and listen for it: the octave case in particular collapses into one thick voice.

Why exactly fifths and octaves?

Perfect intervals blend so strongly (chapter 1) that when the same perfect interval is repeated by motion in both voices, the ear groups the two lines into one. A single fifth is fine; a fifth moving to another fifth is the violation.

ForbiddenParallel fifths
The red verticals show the repeated perfect fifth. The arrows show that neither voice is stationary, so this is not oblique motion.
parallel_fifthBoth voices move up, and the red vertical interval remains P5 at both arrivals.
ForbiddenParallel octaves
The octave frame is repeated by motion in both voices, collapsing two lines into one doubled contour.
parallel_octaveBoth voices move in the same direction while the interval remains an octave.

How the engine scopes the motion rules

Every rule on this page compares each voice pair at consecutive union onsets, the ticks where any voice starts a note. Two exemptions recur in the tables below:

  • Cadence cells. The engine writes the closing gesture of a phrase as a pre-built unit and stamps its notes CadenceCellCommitted. The strict, hidden, and contrary perfect-motion checks skip a pair when the note sounding as the current lower voice carries that bit. (The melodic-interval and consecutive-leap checks skip a marked current note, and the weak non-chord-tone walk skips a marked current note or the next cadence note.) The dedicated cadence_voice_leading rule (chapter 5) judges the cadence as a whole instead; there is no blanket exemption for every rule.
  • Fixed sources. Findings on notes that are all Material or Ornament follow the validation lifecycle: exempted during Generation, audited again by FinalScore, with the form's vertical budget deciding whether they close the form.
RuleFires when
parallel_fifthTwo voices move in the same direction and the previous and current vertical intervals are perfect fifths (or compound fifths).
parallel_octaveTwo voices move in the same direction and the previous and current intervals are unisons or octaves.
Oblique escapeOblique and static motion are allowed even on repeated perfect intervals — only both voices moving triggers the rule.

Contrary perfect motions ​

Moving in opposite directions does not hide a repeated perfect interval, and contrary motion into an octave can also sound abrupt. The validator keeps two contrary-motion cases separate from strict same-direction parallels:

Contrary motionContrary motion into perfect intervals
three contrary arrivals —
Contrary motion does not hide a repeated perfect interval: C–F to D–G is still fifth after fifth, an octave apart. The other two views show arrivals on an octave from a sixth. When the upper voice drops a third into the octave, the engine calls it battuta and rejects it; when the upper voice steps down instead, the same arrival is the normal way to close a phrase and passes.
anti_parallel_perfectbattutaA fifth moves to a twelfth in contrary motion: the same perfect class twice, so anti_parallel_perfect fires.

anti_parallel_perfect fires when both voices move in opposite directions and repeat the same perfect interval class — a unison, fifth, or octave — across the two sonorities. battuta fires when contrary motion arrives on a unison or an octave (any compound octave counts) from some other interval, and the voice that is upper at the arrival leaps down by more than a major second. A stepwise arrival, or an upper voice that rises into the octave, passes.

Hidden (direct) fifths and octaves ​

A hidden, or direct, perfect interval occurs when voices move in the same direction into a perfect fifth or octave. The parallel never literally happens — it is implied by the similar-motion arrival, which makes the hollow interval jump out of the texture. In this engine, the arrival is classified as hidden only when the upper voice leaps by more than a major second (more than 2 semitones); a stepwise upper voice is allowed. Toggle the hidden-fifth example to hear the difference.

Hidden means "arrived by similar motion"

In a hidden fifth, the first vertical interval is not the same perfect fifth. The previous interval can be another class — for example, a fifth moving to an octave is classified as a hidden octave when the upper voice makes the required leap.

Forbidden arrivalHidden fifth
how the upper voice arrives —
The first sonority is imperfect; the second is the red perfect fifth. Both voices rise, and the upper one leaps a fourth to get there, which makes the hollow arrival stand out. The leap is what the engine’s predicate looks for; switch to the stepwise version to compare.
hidden_parallel_fifthSimilar motion moves from an imperfect interval directly into P5.
Forbidden arrivalHidden octave
Landing on an octave by similar motion makes the empty interval jump out of the texture. The engine checks every voice pair at every onset, with the same exemptions as the hidden fifth: cadence cells and both-material pairs.
hidden_parallel_octaveBoth voices move upward into a perfect octave by similar motion.

Historical teaching usually applies the direct-fifth and direct-octave warning to the outer voices only, and allows the arrival when the soprano moves by step (Open Music Theory). The engine keeps the stepwise allowance but applies the rule to every voice pair at every union onset, a deliberately conservative scope.

RuleScope
hidden_parallel_fifthSimilar motion lands on a perfect fifth, the previous interval class differs, and the upper voice leaps more than 2 semitones. Cadence cells are skipped.
hidden_parallel_octaveSimilar motion lands on a unison or octave under the same previous-class and upper-leap conditions. The engine checks every voice pair at every union onset, including weak positions.

Voice crossing and spacing ​

Vertical writing must remain readable as separate voices even before any interval question arises. Two layout rules cover it:

ForbiddenVoice crossing
Voice order is part of the texture contract. Crossing makes the lines ambiguous.
voice_crossingThe lower voice rises above the upper voice at the red arrival.

Bach himself crosses voices on purpose when a stricter contract demands it. The third Goldberg variation is a canon at the unison — the follower repeats the leader at the very same pitch, so both voices share one register and tangle the moment the second enters. The engine has no page of slurs and stems to keep tangled lines readable, so its ordinary crossing check refuses that trade; the explicit upper-trio exception appears below:

From BachBach: Goldberg Variation 3 — a unison canon crosses at the entry
Variation 3 of the Goldbergs is a canon at the unison: the follower repeats the leader's line one bar later at the very same pitch. Same pitch means same register — and when the follower enters in bar 2 on the B the leader sang a bar ago, the leader has already stepped down to G, a third below it. The voices cross from the follower's first note in this excerpt; one dotted-quarter pulse later the leader vaults an octave to G5 and order is restored. Bach accepts the tangle as the price of strict imitation — on a page, slurs and stems keep the lines legible. The engine's generic voice_crossing rule rejects this Goldberg crossing. Its one-onset allowance is limited to the Trio Sonata's upper-voice policy and does not apply here. The ground bass below the two canonic voices is omitted here.
voice_crossingBoth canonic voices occupy an overlapping register; in this excerpt, the leader drops below the follower as it enters.
SpacingUpper voices too far apart
In a texture of three or more voices, adjacent upper voices stay within an octave so the chord sounds like one sonority instead of a melody floating over an accompaniment. Here G5 over E4 spans 15 semitones. The bottom pair (alto and bass) may be wider. In the engine the check is opt-in: it runs only when a harmonic plan sets enforce_chordal_upper_voice_spacing, which no shipped form does today; a test fixture is the only caller.
spacing_adjacent_voices_within_octaveSoprano and alto stand a minor tenth apart (15 semitones), more than an octave; the alto-bass gap is not checked.

In a real three-voice texture the rule splits cleanly in two — tight above, free below:

SpacingThree-voice spacing: tight on top, free below
This is the rule as it actually applies — to real three-voice texture. Upper adjacent pairs are kept within an octave so the chord sounds connected; the bottom pair is allowed to spread because a wide gap above the bass is exactly how Bach voices keyboard music. On the middle chord the alto F4 stands 15 semitones above the bass D3, and that is fine. When the plan opts in, the validator checks the spacing at each chord start.
spacing_adjacent_voices_within_octaveThe soprano-alto gap stays within an octave; the alto-bass gap may exceed it.
RuleScope
voice_crossingBy convention, a lower voice index means a higher pitch (voice 0 is the soprano). A negative interval between any pair — every combination is checked, not just neighbors — means the voices have swapped; the momentary upper-trio exception below is the only policy allowance.
spacing_adjacent_voices_within_octaveIn textures of three or more voices, adjacent upper pairs must stay within an octave (12 semitones). The bottom pair may be wider, matching four-part Bach practice. Checked at chord starts where the harmonic plan declares the chord (has_degree), and only when the plan opts in with enforce_chordal_upper_voice_spacing. No shipped form sets that switch today; a test fixture is the only caller.

The trio-sonata policy has one explicit crossing allowance. When both upper notes are TrioVoiceCarrier material and the harmonic plan enables AllowTrioUpperMomentary, one union-onset exchange may cross the upper pair if the pair was ordered at the previous onset. A crossing that persists into the next onset still fails voice_crossing; the policy also requires the two upper register ranges to overlap, otherwise trio_upper_register_overlap is reported.

Invertible counterpoint at the octave ​

Fugues reuse two-voice combinations with the voices swapped: what was on top moves below. For that to work, every interval must survive being replaced by its interval inversion, its complement within the octave. Toggle the example below: lift the lower line an octave and every third turns into a sixth, both versions equally consonant.

Invertible counterpointLift one line an octave — and it still works
raise line B an octave —
Two short lines written to be invertible. Line A on top holds still in both views; only line B (blue) rises a whole octave when you switch to “inverted,” so the voices trade places and every interval maps to its octave complement — thirds become sixths — yet both versions stay consonant. That benign mapping is what invertible_at_octave relies on; the next example shows where it turns hostile.
invertible_at_octaveToggle the two: line A on top never moves; only line B (blue) rises an octave, and every third becomes a sixth.

The interval numbers of a pair and its inversion always add up to 9, and the quality flips except for perfect intervals:

IntervalInverts toQuality
unison (1)octave (8)perfect stays perfect
2nd7thmajor ↔ minor
3rd6thmajor ↔ minor
4th5thperfect stays perfect
augmenteddiminishedA4 ↔ d5

Not every interval survives so kindly. The perfect fifth — a stable consonance — inverts to a perfect fourth, which between two voices alone stands directly over the lowest note and counts as a dissonance:

Invertible counterpointInversion at the octave: 5 becomes 4
raise line B an octave —
Invertible counterpoint means two lines still work after swapping registers. Every interval maps to its complement: thirds become sixths, fifths become fourths, octaves become unisons. The third survives as a sixth. The fifth survives too, as a perfect fourth, but with only two voices sounding that fourth stands directly over the lowest note and counts as a dissonance. The engine reports a strong-beat fifth between a countersubject and the subject through countersubject_invertible, as information rather than a failure.
countersubject_invertibleLine A never moves. Raise line B (blue) an octave and the fifth becomes a fourth, while the third becomes a sixth.

Bach cashes in on the benign cases constantly. In the C minor fugue of WTC I, the subject and its countersubject are written so that either can sit on top. Toggle between bar 7 and bar 20 and follow the blue countersubject as it moves from above the subject to below it. The amber mark on beat 4 is the hazard from the previous example in a real piece: a twelfth (a compound fifth) in bar 7 becomes a fourth in bar 20, and it stays legal because a third voice, omitted here, sounds below both:

From BachBach: BWV 847 — the same pair, top and bottom
follow the blue countersubject —
The same subject and countersubject from the C minor fugue (WTC I, BWV 847), at two points in the piece. Toggle between them and follow the blue line: at bar 7 the countersubject sits above the subject; at bar 20 the pair is turned over and the same countersubject runs below — the two voices trade octaves note for note. Watch beat 4 of the first bar: in bar 7 the countersubject’s G stands a twelfth (a compound fifth) above the subject’s C; in bar 20 the same two notes form a fourth, C over G. That fourth is safe because the omitted third voice holds E♭ in the bass beneath both, so C and G are each consonant above the real bass. The engine checks parallel octaves with invertible_at_octave; vertical_dissonance judges any fourth against the actual bass of the complete texture. (A third voice is dropped at each spot for clarity.)
invertible_at_octavevertical_dissonanceAt bar 7 the countersubject (blue) sits above the subject; at bar 20 Bach turns the pair over and the same countersubject runs below — every interval still holds.

Composers also invert at other distances. At the tenth, the lower line moves up a tenth instead of an octave, and an interval x becomes 11 − x: parallel thirds turn into parallel octaves and parallel sixths into parallel fifths, so a line built on parallel thirds cannot be inverted this way. At the twelfth, x becomes 13 − x: fifths become octaves, which is safe, but the sixth becomes a seventh, so every sixth needs dissonance treatment once inverted.

One rule on this page touches the exchange:

RuleWhat it checks
invertible_at_octaveParallel octaves in an adjacent upper-voice pair at a structural accent, which inversion would turn into parallel unisons. Oblique motion and weak positions are exempt, and the bottom pair is excluded. Outside cadence cells this duplicates parallel_octave; inside them, where parallel_octave is skipped, it still fires. It is not a test of invertibility: the fifth-to-fourth hazard is reported only as information, by countersubject_invertible in fugues (chapter 6).

An upper-voice pair is a pair of adjacent voices that does not include the lowest voice: in a three-voice texture, the top two. A fourth is not intrinsically illegal there. The vertical validator finds the actual lowest sounding pitch: a fourth above that bass is dissonant unless a declared suspension or cadential 6/4 licenses it, while a fourth between upper voices is legal when both notes are consonant above the bass.

Bass-sensitive consonanceAn upper-voice fourth can be legal
The validator classifies the whole sonority from its lowest sounding pitch. A fourth above the bass is dissonant unless a declared suspension or cadential 6/4 licenses it. This fourth lies between upper voices, so the F major chord in first inversion (A–C–F) is legal even on a structural accent. The soprano then steps down to E over the same bass, giving an A minor triad in root position.
vertical_dissonanceC and F form a fourth, but both are consonant above the actual bass A.

How the validator sees this chapter ​

All rules below are MusicalFail. "Lifecycle" means the fixed-source handling described in the callout above.

RuleKey exemptions
parallel_fifth, parallel_octaveoblique/static motion, cadence cells, lifecycle
anti_parallel_perfectcontrary motion checked separately from strict parallels; cadence cells, lifecycle
battutaonly a contrary arrival on a unison or octave with a downward leap in the arriving upper voice; cadence cells, lifecycle
hidden_parallel_fifth, hidden_parallel_octavestepwise upper voice, cadence cells; all-pair/all-onset scope is an engine policy
voice_crossingone momentary upper-trio exchange may be allowed by policy
trio_upper_register_overlaponly emitted when the momentary upper-trio policy is enabled
spacing_adjacent_voices_within_octaveopt-in per harmonic plan; bottom pair may exceed an octave; three or more voices only
invertible_at_octaveonly adjacent upper pairs at structural accents; checks parallel octaves, not complete invertibility

Continue with Chapter 3 — Dissonance Treatment.

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