Kontrafakti
Kontrafakti is a musical technique where new melodic material is composed over the existing harmonic framework of a pre-existing composition. This means that the chord progressions and the underlying structure of a well-known piece are retained, but a new melody is written to be sung or played over these familiar chords. The term "kontrafakt" is German and translates to "counterfeit" or "imitation," reflecting the idea that the new melody is an adaptation or reinterpretation of an older work.
This technique was particularly prevalent during the Baroque and Classical eras, often used in sacred music.