coda, in musical composition, a concluding section (typically at the end of a sonata movement) that is based, as a general rule, on extensions or reelaborations of thematic material previously heard.
The origins of the coda go back at least as far as the later European Middle Ages, when special ornamental sections called caudae served to extend relatively simple polyphonic pieces. In the sonata-allegro form of the Classical symphony or sonata, the typical coda section immediately follows the recapitulation section and thus ends the movement. The coda may be quite brief, only a few measures, or it may be of sizable proportions relative to the rest of the movement. Often the coda will include subdominant harmony (based on the fourth degree of the scale) as a tonal counterbalance to the tonic–dominant relationship emphasized in the exposition (based on the first and fifth degrees of the scale, respectively). A famous example of an extended coda is in the finale of Wolfgang Amadeus Mozart’s Symphony No. 41 in C Major, K 551 (1788; Jupiter), in which five previously heard independent motives are combined in a complex fugal texture. Another large coda, 135 measures long, is in the first movement of Beethoven’s Symphony No. 3 in E-flat Major (1804); the main theme appears triumphantly transformed in the dramatic climax of the movement.
A codetta (“little coda”) is a brief conclusion, a dominant–tonic cadence at the end of the exposition that may be repeated several times for emphasis.