Haydn trained as a choirboy at St Stephen’s Cathedral in Vienna before embarking upon his long career. His first appointment was as music director at Lukavec, but financial problems soon closed Count Morzin’s orchestra and terminated this employment.

In 1761 Haydn entered the service of the Esterházy family, where he remained for thirty years. Beginning as Vice-Kapellmeister, he took over the leading position in 1766, succeeding Gregor Werner. In the early years of this service Haydn’s orchestra comprised at least six violins, three violas, three cellos and two double-basses, together with pairs of oboes and horns, with other instruments added occasionally.

His relationship with the Esterházy establishment, first at Eisenstadt and from 1767 at Esterháza (the new palace modelled on Versailles), enabled Haydn to view his isolation positively: "Cut off from the world, I was forced to become original." His development was crucial to the evolution of the classical style. While he did not invent the symphony or the string quartet, more than any other composer he guided these genres from infancy to maturity. It is hardly surprising that he inspired Mozart and other composers beyond.

The palace of Esterháza contained an opera house, and after 1777 opera became Haydn’s priority for several years. The "heroic-comic drama" Orlando paladino of 1782 gained an international reputation, with performances in Vienna and Prague. Mixing seria and buffa styles, dramatic recitatives and dazzling arias combine with comic characterisation; the bluff squire Pasquino even has a patter catalogue aria. Other fine operas include La vera constanza (True Constancy) and La fedeltà premiata (Loyalty Rewarded).

Haydn composed more than a hundred symphonies and was imaginatively independent, his works invariably having special personalities. Several begin with slow movements in ‘church sonata’ style, including No. 22, The Philosopher (1764) and No. 49, La Passione (1768). He also contributed to the expressive Sturm und Drang (Storm and Stress) style, in which emotional intensity reacted against the more superficial galant style, as for instance in Symphony No. 44, Trauer (1772). Meanwhile, Haydn became famous throughout Europe, and in 1785 he received a prestigious commission from "Le Concert de la Loge olympique". The resulting Paris Symphonies (Nos. 82-87) were his most ambitious and sophisticated to date.

In 1790 Prince Nikolaus died, and Haydn was allowed to leave. The impresario Johann Peter Salomon travelled in person to invite him to London. He accepted, and between 1791 and 1795 composed twelve symphonies, Nos. 93-104, which are his crowning achievement. His finales particularly are miracles of intellectual organisation, combining with music’s most pointed wit.

Haydn led the way in developing the string quartet. Towards the end of his life he told his publisher that his acknowledged quartets should begin with Opus 9 (1771), omitting the first eighteen compositions. There is close development of the music, rather than the easier entertainment style. He also claimed his Opus 33 quartets (1781) were written 'in a new and special way'. Although mere sales talk, the boast is justified by the music, which inspired Mozart to return to quartet writing with a series of compositions that he dedicated to Haydn. By now there was a sophisticated public who might perform and hear the music over and over again, whereas symphonies could seldom be repeated. The process of understanding a continuum of developing sounds was quite new, and it was why these years brought music of such lucidity.

The ‘Tost’ Quartets, Opus 54, 55 and 64, were composed for the Viennese merchant Johann Tost, who had worked at Esterháza. The boundaries between drawing room and concert room were disappearing, and the Opus 71 and Opus 74 use the same devices, including slow introductions, as the London symphonies. The final quartets came after Haydn’s return to Vienna. In 1797 the Opus 76 set was composed, two years before the two last completed quartets, Opus 77. How fitting that the same patron, Prince Lobkowitz, simultaneously commissioned the first quartets, Opus 18, of the young Beethoven.

The keyboard sonatas display a variety of forms and moods, as well as taxing the dexterity of the player. Haydn’s London visits yielded his finest sonatas, including the marvelous C major, whose opening Allegro is symphonic in scale and scope.

The trip to London, which included the experience of seeing the sea for the first time in his life, released a new flow of creativity from Haydn. Following his return to Vienna, he remained at the summit of his creative powers, in trios and quartets, the magnificent oratorios The Creation and The Seasons, and the six Masses for Princess Marie Josepha Hermenegild. His final years, however, brought the misfortune of ill health and little creative work was possible. He died in Vienna on 31st May 1809, aged 77.

© Terry Barfoot/BBC