In vocal music, contrafactum (or contrafact, pl. contrafacta) is "the substitution of one text for another without substantial change to the music". The earliest known examples of this procedure (sometimes referred to as ''adaptation'') date back to the 9th century used in connection with Gregorian chant.