In vocal music, contrafactum (pl. contrafacta) is "the substitution of one text for another without substantial change to the music".
While translations meant for singing do not usually constitute intentional "substitution", examples of contrafacta which do constitute wholesale substitution of a different text include the following types:
An existing tune already possessing secular or sacred words is given a new poem, as often happens in hymns (typically Protestant ones); sometimes more than one new set of words is created over time. Examples:
A lyricist might re-cast his/her own song (or someone else's song) with new lyrics, as in the case of Alan Jay Lerner with the number She Wasn't You / He Isn't You from the stage and film versions, respectively, of the musical On a Clear Day You Can See Forever.
Intentional parodies (as opposed to mere translations) of lyrics, especially for satirical purposes, as practiced in the United States by "Weird Al" Yankovic with popular music; humorist Tom Lehrer with his song "The Elements", which uses a tune from The Pirates of Penzance; Forbidden Broadway with musicals; the Capitol Steps; and Mark Russell (the last two involving political parody).
Other notable songs with significantly different lyrics in different languages include:
Songs which have been re-written by the same writer with different lyrics include:
Contrafactum has been used in writing several national anthems, such as those of the United States,United Kingdom, Russia and the Netherlands.