A capriccio or caprice (sometimes plural: caprices, capri or, in Italian, capricci), is a piece of music, usually fairly free in form and of a lively character. The typical capriccio is one that is fast, intense, and often virtuosic in nature.
The term has been applied in disparate ways, covering works using many different procedures and forms, as well as a wide variety of vocal and instrumental forces. The earliest occurrence of the term was in 1561 by Jacquet de Berchem and applied to a set of madrigals. In the late 16th and early 17th centuries, it could refer to madrigals, music intended alternatively for voices or instruments, or strictly instrumental pieces, especially keyboard compositions.