Composing a Baroque Two-Part Invention
Composing a Two-Part Invention
Linear counterpoint and underlying harmony
A two-part invention is a piece for two independent melodic lines, or voices, that interact through imitation and other contrapuntal techniques. Each part should be singable and coherent on its own, while the two parts combine to form convincing harmony.
This way of composing differs from a primarily homophonic approach, which often begins by planning chords and then arranging them vertically. In counterpoint, attention is also given to the horizontal movement of each melody: how one line continues, answers, imitates, or contrasts with the other.
The two perspectives must work together:
Linear thinking considers the shape, rhythm, and continuation of each voice.
Harmonic thinking considers the chords created when the voices sound together.
A successful contrapuntal passage makes its imitations recognizable without allowing the resulting harmony to become awkward or unclear.
Counterpoint is not simply the repetition of a melodic idea in another voice. The imitation must also fit the harmony and voice leading.
Analyze the supplied material before composing
A skeleton score may contain rests or gaps where notes still need to be added. Before filling those gaps, it is useful to identify what is already present and how its parts relate.
Find the main motif
A motif is a short, recognizable musical idea that can be repeated, varied, or developed. In the example, the principal motif has a distinctive rhythm and a leap followed by three ascending notes. Its exact intervals change in different appearances, but its general shape remains recognizable.
When studying a skeleton score, look for recurring features such as:
A characteristic rhythm
A leap followed by stepwise motion
A rising or falling contour
Repeated or sequential patterns
A figure that begins at a consistent point in the beat
The motif may appear in either voice and at different pitches. Identifying it provides a plan for adding notes: rather than inventing every passage from scratch, the composer can choose places where the existing idea might be imitated.
Recognize transformed versions of the motif
An imitated motif does not always need to preserve every interval exactly. The example uses several kinds of variation:
Transposition: moving a figure to a different pitch level.
Interval modification: preserving the rhythm and general shape while changing one or more intervals. For example, an opening rising fourth may become a rising third or a rising sixth.
Inversion: reversing the direction of a figure, so that a descending shape becomes ascending or vice versa.
Sequence: repeating a figure at a different pitch level, often stepwise.
Fragmentation: using only part of a motif or a short snippet of it.
These transformations allow a motif to remain identifiable while adapting to the musical context. A passage can still be heard as related to the original idea even when its precise pitches differ.
Strict and free counterpoint
In strict counterpoint, an imitated figure is more likely to preserve its intervals closely. In free counterpoint, the composer has greater freedom to alter intervals and details, provided the relationship to the original idea remains perceptible.
The choice is not simply between exact copying and unrelated material. A free imitation can preserve rhythm, contour, or characteristic gestures while changing pitches to suit the harmony.
Make imitation fit the harmony
A motif should not be copied mechanically if doing so produces unsuitable notes. The resulting harmony needs to make sense.
In the example, the opening is in C major and is based largely on the tonic chord, whose notes are C, E, and G. Some notes belong directly to the chord; others function as inessential notes that connect or decorate chord tones.
Common inessential notes include:
Passing notes, which move stepwise between chord tones.
Auxiliary notes, which move away from a chord tone and return to it.
In the first bar, the right-hand figure is imitated in the left hand, but one interval is altered. That change helps the imitation use notes appropriate to the tonic harmony. The result retains the motif’s rhythm and melodic identity while fitting the chord.
The same principle applies throughout a piece:
Identify the chord or harmonic area beneath the passage.
Decide which notes of the motif can remain as chord tones.
Adjust other pitches where necessary.
Use passing or auxiliary notes when a non-chord tone helps connect or decorate the line.
Check that the two voices together create a plausible progression.
The important aim is not to force every note into a chord. Rather, non-chord tones should have a clear melodic function and should lead convincingly to notes that belong to the harmony.
Track the harmonic plan
Even in a contrapuntal composition, a basic harmonic outline helps guide decisions about imitation, bass notes, and cadences.
The early bars
The example’s first bar is centered on the C-major tonic. The second bar moves to the dominant chord, then returns to the tonic in its latter part. The third bar begins with tonic harmony and moves toward the dominant, probably a dominant seventh, in its second half.
The broad pattern is straightforward. Thinking in terms of these harmonic areas helps the composer choose pitches for new imitations rather than treating every melodic figure as independent of the chords.
Modulation and sequence
Later passages suggest a sequence of dominant-to-tonic progressions in different keys:
A V–I progression in G major
A similar progression a tone lower, in F major
A return to V–I in C major
The movement from C major to G major visits the dominant key; the move to F major visits the subdominant key; the music then returns to C major. A sequence of related harmonic gestures gives the passage direction while keeping the underlying plan manageable.
An altered note such as F-sharp may signal that the harmony has moved toward G major. If the same pattern appears a tone lower in the next bar, it may point toward F major. Chromatic or altered pitches should therefore be interpreted in relation to the harmony rather than treated as isolated details.
A later passage appears to prepare G major with a dominant in an inversion: the F-sharp in the bass can function as the third of a D-major dominant chord, leading to G. G major then also functions as the dominant key of C major, allowing the music to move back toward C.
A simple harmonic plan can support complex-sounding counterpoint. The composer can vary the melodic lines while preserving a clear sense of where the harmony is going.
A practical method for adding notes
A productive approach is to complete the most important imitative relationships first and fill in the remaining gaps afterward. This avoids treating the skeleton score as a collection of empty spaces that must all be filled immediately.
1. Map the existing motif statements
Mark where the main motif appears in each voice. Note which statements are exact, which are modified, and which use only part of the motif. Also identify any secondary ideas or sequences.
2. Identify likely places for further imitation
The opening may alternate between voices: one voice introduces the idea and the other answers. That pattern can suggest a possible continuation, but it does not have to continue mechanically. The next imitation might occur in the lower voice, the upper voice, or in a transformed form.
3. Choose the pitches according to the chord
When transferring a motif to another voice, fit it to the prevailing harmony. In one example, a new figure uses E and G as tones of the C-major tonic, an A as a passing note, and then moves to B as the harmony approaches the dominant or dominant seventh.
This preserves the motif’s character while adapting its notes to the local chord.
4. Vary the response when useful
A response does not have to copy the first figure exactly. One method is to invert the shape. For instance, a descending triadic figure in the upper voice can become an ascending triadic figure in the lower voice, provided the new notes fit the harmony.
The example also uses sequential imitation: after a V–I gesture in G, a related gesture appears a tone lower in F. The sequence links the bars and supports the harmonic movement.
5. Use fragments and looser relationships
Not every added passage needs to be a full statement of the main motif. A shorter figure may imitate only part of another line. A later passage can also be related to the motif through rhythm or contour rather than through exact pitches.
For example, a short figure near the end is treated as a loose imitation of an earlier one. Its relationship is recognizable without being a strict copy.
6. Fill in the remaining gaps
Once the principal imitations are in place, the remaining spaces can be completed with notes that support the harmony and maintain smooth melodic movement. Some notes may continue an existing scale or sequence. If one voice moves C–E–F–G, a complementary line might continue G–B–C–D, provided the harmony permits it.
The composer should consider both:
Whether the individual line moves naturally
Whether the combination of voices supports the intended chord
Complete the ending and cadence
The ending can be planned before the rest of the piece is finished. There is no requirement to compose from the first bar to the last in strict order. Writing the cadence early can establish the destination toward which the remaining material will move.
Creating a strong cadence
The final bars should make the ending sound decisive. The example completes a penultimate bar with notes belonging to its harmony, then uses a 4–3 suspension at the cadence.
A 4–3 suspension is a three-stage event:
A note is prepared as a consonant tone in the preceding harmony.
It is held while the bass changes, creating a dissonant fourth above the bass.
The suspended note resolves downward by step to a third above the bass.
This common Baroque device adds tension immediately before the final resolution. The composer should ensure that the suspension is prepared and resolved correctly rather than introduced as an unsupported dissonance.
Decorating the final bar
A cadence may sound harmonically sound but rhythmically plain. It can be enlivened with a figure drawn from a secondary motif, such as a pair of sixteenth notes. A lower mordent can also add a Baroque-style ornament at the end.
Decoration should strengthen the musical character without obscuring the cadence or weakening its finality.
Maintain complete bars and coherent voice leading
A common practical mistake is to begin working on a later bar and forget that an earlier one is still incomplete. Each voice must have the required duration for its measure. If a part is missing a beat, the gap needs to be completed with an appropriate note or rest.
Useful checks include:
Confirm that each measure contains its full rhythmic duration.
Check that each added note belongs to the chord or has a clear melodic role.
Make sure that a voice continues smoothly into the next figure.
Avoid unnecessary activity when the other voice is already busy.
Use rests when they improve the texture; not every gap needs to contain a note.
The example sometimes gives the more active line to one hand and lets the other move more steadily. At other points, the lower voice can add notes in thirds with the upper voice. Rests may also help distinguish one motif statement from the next and prevent the texture from becoming crowded.
A concise workflow
A complete method for working from a contrapuntal skeleton is:
Identify the key and harmonic outline.
Locate the main motif and any secondary ideas.
Mark exact statements, transformations, sequences, and fragments.
Choose strategic places to add imitation.
Adapt the pitches so each imitation fits the prevailing harmony.
Fill in other notes with attention to line, chord, and voice leading.
Complete the cadence, using a suspension or ornament if appropriate.
Check every measure for rhythmic completeness and every transition for continuity.
The central principle is to combine motivic imagination with harmonic awareness: ideas can be copied, altered, inverted, or sequenced, but each transformation should contribute to both the melodic lines and the underlying progression.

Ask anything
We've read this whole study set, so questions about it get the best answers.