Joseph Haydn wrote his f-sharp minor Symphony No. 45 in 1772, while he was in the service of an Austro-Hungarian prince named Nikolaus Esterházy. Esterházy was a wonderful patron of music, who kept a full orchestra on his payroll and who required, and received, a continuous outpouring of original symphonies, concertos, operas, masses, and chamber music by his Kapellmeister. He kept them on retainer year-round, not only to entertain his regular court in Eisenstadt, but also (and more constantly) at his summer palace of Eszterháza near the Hungarian town of Fertőd.
Begun as a hunting lodge, Eszterháza grew under Prince Nikolaus's guiding hand into a spectacular pleasure-palace, comparable to Versailles. Sometimes he had such a good time there that he didn't want to go back to Eisenstadt. This was the case in 1772, when Haydn found his orchestra on the brink of mutiny. They had been kept so long over their proposed date of return that they were pining for their wives, who had not been allowed to join them at Eszterháza. So Haydn composed this symphony, nicknamed "Farewell," as a hint to their princely patron.
It begins with an energetic sonata, marked Allegro assai (quite fast) in f-sharp minor, a key rarely used at the time because it presented tuning difficulties to some of the players. The passionate character of the music, together with its wide melodic leaps, rhythmic displacements, contrasts of loud and soft, sudden pauses, and intense unison passages, qualify this movement as an example of the Sturm und Drang style. It is essentially a monothematic sonata, its entire Exposition being derived from the broken-triad theme referenced above. As a special surprise, however, Haydn introduces a new theme at the end of the Development. The effect is particularly striking because of the calm and gentle nature of this new theme, in contrast to the "storm and stress" that grip the rest of the movement.
Movement II, Adagio, is a calm, tender piece in A major, immediately recognizable by its repeated grace-note figures that Wiki describes as "hicupping." Oddly enough, that image didn't come to my mind. The movement's harmony is unusually rich, far-reaching, and expressive for its time. Some of the most touching passages are those in which the texture thins to one line of melody over a bass line. In such intimate moments, it is hard not to feel the sense of loneliness that Haydn apparently meant to express.
Movement III is the expected Minuet. Haydn lavished on it the tempo-marking Allegretto, though a simple "Tempo di Minuetto" would usually do. Set in the fiendishly tricky key of F-sharp Major, whose key signature looks like a briar patch, it thrives on dynamic contrasts (loud vs. soft), unexpected harmonic twists, tied-across-the-bar rhythms, and a deliberately inconclusive-sounding final phrase of each section. The trio briefly spotlights the horns, and also contains the first strong hint of minor-key angst since the first movement.
Movement IV begins as a customary Haydn finale, marked Presto in cut time. Beginning, once again, in f-sharp minor, it follows sonata form with a seemingly unstoppable energy. It's really very exciting, and it comes to the point so directly that it seems close to being finished by about 2:45 or 3:00, when the Recap comes to a sudden halt on the dominant chord. Then Haydn does something totally unprecedented.
He ends the movement with a 5-minute-long coda in a slow (Adagio) 3/8 time, beginning in the key of A (relative major to f-sharp minor) and working its way toward F-sharp Major. Flamboyantly anticlimactic, this sweet, gentle music starts softly and grows ever softer. The instrumental texture grows thinner, too. You'll notice this even on an audio recording, such as this Youtube playlist of the entire symphony. What you can't fully appreciate without seeing a live performance, is that the players are actually leaving the stage, in ones and twos and sometimes whole sections at a time, as they reach the end of their parts. Some of them, notably the horns and oboes, get somewhat of a solo before they leave. Others simply, quietly, excuse themselves until, at last, only two solo violins are left to complete the work.
As a bit of stage business combined with a musical message that even a blind man can pick up, this finale basically told Prince Nikolaus: "Enough is enough. It's time to go home." And he got the message, evidently, because the whole court moved back to Eisenstadt the next day. Ah, the power of music!
Here's a video of the finale that you may enjoy. Daniel Barenboim conducts the Vienna Philharmonic in a New Years' Day concert, and plays the business of the departing musicians as slapstick comedy.