A riff is a repeated chord progression or refrain in music (also known as an ostinato figure in classical music); it is a pattern, or melody, often played by the rhythm section instruments or solo instrument, that forms the basis or accompaniment of a musical composition. Though riffs are most often found in rock music, heavy metal music, Latin, funk, and jazz, classical music is also sometimes based on a riff, such as Ravel's Boléro. Riffs can be as simple as a tenor saxophone honking a simple, catchy rhythmic figure, or as complex as the riff-based variations in the head arrangements played by the Count Basie Orchestra.
David Brackett (1999) defines riffs as "short melodic phrases", while Richard Middleton (1999) defines them as "short rhythmic, melodic, or harmonic figures repeated to form a structural framework". Rikky Rooksby states: "A riff is a short, repeated, memorable musical phrase, often pitched low on the guitar, which focuses much of the energy and excitement of a rock song."
BBC Radio 2, in compiling its list of 100 Greatest Guitar Riffs, defined a riff as the “main hook of a song”, often beginning the song, and is “repeated throughout it, giving the song its distinctive voice”.
Use of the term has extended to comedy, where riffing means the verbal exploration of a particular subject, thus moving the meaning away from the original jazz sense of a repeated figure that a soloist improvises over, to instead indicate the improvisation itself—improvising on a melody or progression as one would improvise on a subject by extending a singular thought, idea or inspiration into a bit, or routine.