Most people would probably hazard that the three supreme contributors to the legacy of European music are Bach, Beethoven and Mozart: the first two polar opposites who are also complementary, the third providing a link between them. Bach, the ultimate composer of Lutheran Christian faith, was, paradoxically, born in 1685, at a time when the old religious worldview was giving way to modern science. Though he died at the exact middle point of the 'rational' 18th century, he was Christianly responsive to the burden of human suffering, and equally aware of the dizzy heights of human joy. The musical technique he favoured to achieve this was the fugue, which was a 'monistic approach' in that all the musical substance was derived from a single thematic sequence of pitches. Beethoven, born in 1770, well into the rational 18th century, also called himself a Christian, though he did not, like Bach, affirm a pre-existent faith but, agonisingly aware of the contradictions inherent in living, was a seeker after the truth snatched, even wrenched, out of the very mouth of contradiction. Sonata form became for Beethoven a duality involving a recognition of our own powers, which might become a gateway to paradise: as in the triptych of the last three piano sonatas wherein the dualistic principle of sonata often disturbingly comes to terms with monistic fugue and canon.

The achievements of Bach and Beethoven became, respectively in affirmation and in challenge, the aural mainstream of European civilisation: and their 'oppositeness' became a healing force through the agency of a third supreme figure, Mozart, who lived briefly between Bach and Beethoven from 1756 to 1791.

Mozart fused a measure of Bach's quasi-divine faith with a measure of Beethoven's unambiguously human unpredictability. At the time there was a movement abroad that made this fusion feasible and epitomised Mozart's equivocal position. Its name was Freemasonry, a creed of ethical enlightenment that Mozart was fascinated by from at least the early 1780s. The Holy Roman Emperor, Francis II, expressed displeasure at what he considered Masonry's threat to devout Catholicism. Even so, the emperor seems to have recognised that it contributed to many of the greatest works of Mozart's maturity.

The final trilogy of symphonies is the grandest possible Masonic credo: no 39, in the Masonic ritual key of E flat major, almost always associated with healing grace, and sometimes majesty; no 40 in tragically purgatorial G minor; and no 41 in 'white' C major, representing the triumph of light, and in the process embracing a synthesis of homophonic and polyphonic principles (sonata and fugue). The string quartets, surely the greatest of Mozart's chamber works, similarly re-interpret the social aspects of Masonry in psychological terms: the D major and C major in the same spirit as the 41st symphony, the G minor as an agon and an Edenic rebirth. In the last quintet, again in E flat major, and in the clarinet concerto which makes specific reference to classical Eleusian rites, Mozart evolves what amounts to a new idiom: luminously transparent, seemingly of folk-like simplicity, yet fraught with lacremae rerum.

So the tragic pain of the G minor quintet dissolves in a major apotheosis which reminds us of The Magic Flute's Papageno, a 'simple' bird-man who democratically reintroduces mystical transcendence into the Enlightenment's humanitarian ethic – and which transmutes what might have been grand opera into a pantomime.

Pamina, the central character in The Magic Flute, is the object of conflict between the forces of darkness and light. It is she who gives the flute to Tamino, a young man striving towards human perfection; and it is by means of the flute's magic that he is able to withstand the trials of fire and water. Papageno is a kind of unregenerate Orpheus who impudently tootles Dionyseus's pipe and whose bells simulate Apollo's lyre.

Mozart never lost faith in the potentialities of the human heart, but, unlike Bach and Beethoven, he came to accept man's natural limitations. I suspect this is why most people love Mozart more than any other composer, though he has neither the all-forgiving comprehensiveness of Bach nor the fearsomely unassailable courage of Beethoven. Although his life was so short and intense, the perfection of his music leaves nothing to be said. Had he lived longer, Mozart would presumably have added something to a musical experience that seems all-inclusive, but it is impossible to imagine what. In his last years, even Mozart's slightest works seem to exist independently of time or place.

The little pieces for glass harmonica – not to mention the magnificent divertimento for string trio, once again in compassionate E flat major – are poles apart from the divertimenti and serenades of his childhood and youth. They are no longer music to eat or chatter to. It is as though Mozart had given up the attempt to compose music for a society totally remote from the 'perfection' of his music. He now composes in a celestial drawing room, where the only audience is himself and silence. This suggests that if 'spirit' is feasible, we ourselves must be responsible for it: a thought at once sobering and ecstatic, at which we may justifiably rejoice.