Melodic inversion is a transformation technique where intervals are flipped: ascending becomes descending, and vice versa. It's a powerful compositional tool used from Bach's counterpoint to Schoenberg's twelve-tone rows to film scores.
Enter a melody below using note names (C, D#, Bb) or integers (0-11), choose your inversion axis, and see the transformation instantly.
Enter Your Melody
Formula: Inverted = (2 × Axis) - Original mod 12
Original
Inverted
Visual Comparison
See how intervals flipWhy Invert a Melody?
Counterpoint & Fugue
Bach's fugues use inversion to create new countersubjects. An ascending theme becomes descending, maintaining intervallic relationships while creating contrast.
Thematic Development
Beethoven and Brahms transform motifs through inversion to build entire symphonic movements from a single idea, creating unity through variation.
Twelve-Tone Technique
Schoenberg's method requires four row forms: Prime (P), Retrograde (R), Inversion (I), and Retrograde-Inversion (RI). Inversion is fundamental to serial composition.
Film & Game Scoring
John Williams inverts leitmotifs to suggest transformation—a hero's theme inverted for their dark moment, then restored in triumph.
How Melodic Inversion Works
How Melodic Inversion Works
Convert Notes to Pitch Classes
Each note maps to a number 0-11, ignoring octave:
Choose an Axis
The axis is the "mirror point" around which notes reflect. Common choices:
- Axis 0: Standard in post-tonal analysis. C stays C, but E(4) becomes Ab(8).
- Axis 6: Symmetric around tritone. C↔C and F#↔F# are fixed points.
- First note: Some composers invert around the melody's starting pitch.
Apply the Formula
For each note, calculate:
Inverted Pitch = (2 × Axis - Original) mod 12
The "mod 12" means we wrap around: if you get -2, add 12 to get 10 (Bb).
Worked Example: Invert C-E-G around axis 0
Key Insight: Intervals Flip Direction
The beauty of inversion: every interval flips direction but keeps its size.
- An ascending major 3rd (C→E) becomes a descending major 3rd (C→Ab)
- A leap up of 7 semitones becomes a leap down of 7 semitones
- The melody's "shape" is mirrored, not destroyed
This is why inverted themes sound related but different—they preserve the melodic character while reversing its motion.
Famous Examples of Inversion
Contrapunctus III and IV are inversions of each other. The entire fugue subject is flipped, demonstrating Bach's mastery of invertible counterpoint.
The famous "fate" motif (G-G-G-Eb) appears inverted throughout the symphony, creating thematic unity while allowing development.
Built entirely on a twelve-tone row and its transformations. The row is designed so that its inversion is also its retrograde transposed—extreme economy.
The Imperial March contains melodic cells that invert the heroic Force Theme intervals, musically portraying the dark side as a twisted reflection.