A canon is a piece of music in which a melody is played and then imitated by one or more voices or instruments. The term is often used to describe a specific type of musical form where the same melody is repeated at different pitches or times.


It is mentioned in Gödel, Escher, Bach as a way to illustrate the concept of recursion and self-reference in music. The book discusses how canons can create complex structures from simple rules, similar to the way recursive functions work in programming and logic.