A Musical Joke (in German: Ein musikalischer Spaß) K. 522, (Divertimento for two horns and string quartet) is a composition by Wolfgang Amadeus Mozart; the composer entered it in his Verzeichnis aller meiner Werke (Catalogue of All My Works) on June 14, 1787. Commentators have opined that the piece's purpose is satirical - that "[its] harmonic and rhythmic gaffes serve to parody the work of incompetent composers" - though Mozart himself is not known to have revealed his actual intentions.
The piece consists of four movements and takes about 20 minutes to perform.
Compositorial comedic devices include:
The piece is notable for one of the earliest known uses of polytonality (though not the earliest, being predated by Heinrich Ignaz Franz Biber's Battalia), creating the gesture of complete collapse at the finale. This may be intended to produce the impression of grossly out-of-tune string playing, since the horns alone conclude in the tonic key. The lower strings behave as if the tonic has become B-flat, while the violins and violas switch to G major, A major and E-flat major, respectively.
Whole-tone scales and polytonality are foreign to music of the Classical era. However, these became common for early 20th-century composers like Claude Debussy and Igor Stravinsky, who were searching for a new musical language. In this later context, these were legitimate new techniques in serious music. In Mozart's time, however, these non-classical elements gave the piece its comedy, expressing the composer's humor.
The title A Musical Joke might be a poor rendering of the German original: Spaß does not necessarily connote the jocular, for which the word Scherz would more likely be used. In Fritz Spiegl's view, a more accurate translation would be Some Musical Fun. The sometimes-mentioned nicknames "Dorfmusikantensextett" ("village musicians' sextet") and "Bauernsinfonie" ("farmers' symphony") were added after Mozart's death.