The quodlibet originated in 15th-century Europe, during a time when the practice of combining folk tunes was popular. Composer Wolfgang Schmeltzl [de] first used the term in a specifically musical context in 1544.
Francisco de Peñalosa's quodlibet Por las sierras de Madrid occurs in the Cancionero Musical de Palacio, a manuscript of the early 16th century. Composer Ludwig Senfl (1486–154?) was able to juxtapose several pre-existing melodies in a cantus firmus quodlibet; one such piece, Ach Elselein / Es taget, was noted for its symbolism rather than its humor. In Spain, 1581 saw the publication of the ensaladas of Mateo Flecha et al. The ensaladas were comical compositions that mixed literary texts in a way similar to the quodlibet.
It was not until 1618, however, that anyone published a rigorous definition of the quodlibet: Michael Praetorius described it as "a mixture of diverse elements quoted from sacred and secular compositions".[page needed] During the Renaissance, a composer's ability to juxtapose several pre-existing melodies, such as in the cantus firmus quodlibet, was considered the ultimate mastery of counterpoint.
The quodlibet took on additional functions between the beginning and middle of the 19th century, when it became known as the potpourri and the musical switch. In these forms, the quodlibet would often feature anywhere from six to fifty or more consecutive "quotations"; the distinct incongruity between words and music served as a potent source of parody and entertainment. In the 20th century, the quodlibet remained a genre in which well-known tunes and/or texts were quoted, either simultaneously or in succession, generally for humorous effect.
Bach's Wedding Quodlibet or Quodlibet, which is not a quodlibet by the above definition but a ten-minute procession of nonsense, jokes, puns, obscure cultural references, word games, and parody of other songs. At times, the music imitates a chaconne and a fugue while deliberately obscuring the counterpoint. It is unlike any of Bach's other works, though the sole surviving source is a fair copy manuscript in Bach's own handwriting.