By George Bozarth
Each of those little French Rococo “bird” pieces to which we listened conveyed a single mood or “Affect.” In that regard they are like nearly all individual movements during the late Baroque period. This approach is termed “The Doctrine of the Affections” and was advanced by Aristotle (Rhetoric), who believed there exist discrete states, Affections, such as fear, love, hate, anger, and joy. In The Passions of the Soul (1649) René Descartes wrote a comprehensive study of the Affections , and ninety years later Johann Mattheson included a discussion of how the Affections can be represented in music in his Der vollkommene Kapellmeister or The Perfect Music Director (1739), with each movement exploring a single Affection (Affekt).

Frans Hals, Portrait of René Descartes (Louvre)

Johann Mattheson
In 1769 the Irish writer on aesthetics Daniel Webb advanced a new theory in his Observations on the Correspondence between Poetry and Music. For Webb the feeling of pleasure was “not, as some have imagined, the result of any fixed or permanent condition of the nerves and spirits, but springs from a succession of impressions, and is greatly augmented by sudden or gradual transitions from one kind or strain of vibrations to another.” Composers of the mid-18th century found the portrayal of one Affection per movement to be too static, intellectual, and lifeless, and were enticed by the possibility of continuous dynamic flux and transition of sentiment.

Pianoforte by Bartolomeo Cristofori (1720; Metropolitan Museum of Art)
ENTER the fortepiano, C. P. E. Bach, Mozart, and Haydn!
The pianoforte or fortepiano was invented by Bartolomeo Cristofori in Florence (by 1700) to fill a need – to be able to control with your hands how loudly you are playing impossible on a harpsichord, so that you can make sudden or gradual changes in dynamics. To refresh your memory of “the Cristofori sound,” here’s a Giga, played by Andrea Coen on a replica of a Cristofori piano: Presto by Lodovico Giustini (1685–1743), from his Sonata in G minor, Op. 1 No. 1 (1732) (the first publication of music designated specifically for the piano:

Lodovico Giustini

Giustini, Sonate (1732)
https://www.youtube.com/watch?v=7QaqI7Elqi4
You’ll note that, although this piece still conveys just one Affect, it employs dynamic changes, as specifically indicated in the score.
For a composer who fully embraced the new approach to conveying emotion in music, we can turn to J. S. Bach’s second musical son, Carl Philipp Emanuel Bach (1714–88; who composed keyboard pieces in the Empfindsamer Stil or “sensitivity style” that were in a constant state of intense emotional flux. Haydn was a great fan of this style and C. P. E. Bach’s music, as was Beethoven too.

Franz Conrad Löhr, Portrait of CPE Bach
C.P.E. first worked as keyboardist in the orchestra of Frederick the Great in Berlin/Potsdam, before moving to Hamburg to succeed his godfather, Georg Philipp Telemann, as Kapellmeister. C.P.E.’s favorite keyboard instrument was the ultra-sensitive Clavichord; he also had access to Frederick the Great’s several fortepianos built by Gottfried Silbermann (late 1740s). In 1753 and 1762 he codified his ideas on performance in An Essay on the True Art of Playing Keyboard Instruments.
C.P.E. composed a series of “character pieces” reflecting the personalities of his friends. Here is the one for Dr. Georg Ernst Stahl, godfather of two of his children, played by Lorenzo Ghielmi on a replica of a 1749 Silbermann fortepiano:

Gottfried Silbermann, Fortepiano (1749; Germanisches Nationalmuseum, Nuremberg)
La Stahl: https://www.youtube.com/watch?v=Yr52a6y89OI
C.P.E.’s virtuosity is on display in his Solfeggio in C Minor, Wq. 117/2, H. 220, performed here on a clavichord by Miklós Spányi:
https://www.youtube.com/watch?v=T-Fr-nAOZ_g
The ability to shift emotions at a moment’s notice greatly enhanced music’s power to convey dramatic situations, especially for contrasting comic and serious situations, to create comedies without words that employ known forms vs. unexpected gestures. In a musically informed society, with well-known musical forms and styles, and also with well-acknowledged social norms and practices, it was thus possible to achieve humorous effects. And Wolfgang Amadeus Mozart was the man for the job.

Portrait of Wolfgang Amadeus Mozart
In the humorous finale of his first Piano Sonata (in C major, K. 279; 1774), Mozart wrote in the “serious” sonata form known to his audiences, but filled it with all sorts of youthful hijinks – boisterous and mischievous merrymaking, manic scurrying, rude bass notes, scrunched pitches, silly cadences, odd halts, abortive counterpoint – what Robert Levin calls “Bad Boy Mozart!” Here is Levin performing this movement on a replica of a Johann Andreas Stein fortepiano (south German, late 1770s, the precursor of the Viennese fortepiano of the next decade with delightful extra ornamentation during the repeated sections:

Ludwig Guttenbrunn, Portrait of Joseph Haydn (ca. 1770)
https://www.youtube.com/watch?v=PkElqccaVhw
When you employ a quartet of string instruments – as Joseph Haydn [Attachment 9] first did, and as he and Mozart raised to great musical heights – you can create a witty, intimate conversation among musical friends that we then delight in witnessing.

Anonymous, Haydn Playing String Quartets (before 1790; StaatsMuseum, Vienna)
In the opening Scherzo portion of the third movement of his String Quartet in G major, Op. 33 No. 5 (1784), Haydn “seems to stick his tongue out,” as Richard Wigmore writes, “constantly fooling the listener with displaced accidents, and then inserting a malicious pause just when we seem to have found our feet.” The sly cadence never fails to delight. In contrast, the central Trio section is a well-behaved minuet, all prim and proper. But aren’t we glad when the nonchalantly tripping Scherzo returns! Here is the period-instrument Festetics String Quartet, milking each cadence for full effect.
https://www.youtube.com/watch?v=git6L5aseUI
The humor of the Rondo Finale of Haydn’s String Quartet in E-flat major, Op. 33 No. 2, The Joke, is when will it end?! Mark Steinberg characterizes the movement as “a merry romp of a rondo, quicksilver and pure good spirits” – like a carefree stroll in the park. The progression of the cheerful theme is interrupted by sudden changes of speed. “Pompous, regal music announces itself” toward the end, in a last-ditch, almost farcical and ultimately futile effort “at stately orchestral dignity.” But Haydn’s funny bone cannot be suppressed. Then comes the closing. Since we’ve heard this A section of the rondo several times already, we know exactly when it will end . . . yes? no? (keep listening– “past the end”!). Again we are entertained by the Festetics String Quartet: