Seven or so years ago, a friend of mine suggested an outing to the British premiere of an opera by Karlheinz Stockhausen. Stockhausen had been working on an opera cycle for years, each section named after a day of the week. I remembered the thrill of seeing Donnerstag at the Royal Opera House 16 years before, with the throb of anticipation in the crowd on the first night, and, afterwards, the trumpeters on the roof of the Opera House calling out their valedictory fanfares to a bewildered WC2. Of course I would go.
The atmosphere surrounding Stockhausen had changed a great deal in the intervening years. What we went to see must have been Freitag, and there was little glamour in the Barbican foyer, just a lot of malodorous new-music enthusiasts with their plastic bags full of unperformable manuscripts, muttering to each other. I couldn't tell you what the piece was about: a lot of highly personal mythology about Lucifer, dancers dressed as syringes, instrumental solos, taped children's choruses. The music, as far as I remember, was largely made up of interminable two-part counterpoint between woodwind instruments, devoid of any interest. We left at the interval.
After a deep trough of unfashionability, Stockhausen's death seems to have sparked off some serious attempts to come to terms with his immense, confusing legacy. With festivals in Paris and London this autumn attempting to revive the best of his catalogue, we could be facing an Elgar situation, in which late-career neglect is followed by posthumous popular canonisation.
What happened to Stockhausen? At his zenith, 40 years ago, his work and presence permeated every corner of the musical world, and beyond. People with no interest in contemporary art music were aware of Stockhausen, in name at least. His works were issued on disc by Deutsche Grammophon as soon as they were written and performed. Far from being a vanity project, DG's Stockhausen discs sold well enough for it to issue two greatest hits LPs. Stockhausen events routinely sold out immense venues; rock musicians took to name-checking the master. Even now, it's rare to read an article about Stockhausen that doesn't refer, awestruck, to the fact that his face appears on the cover of the Beatles' Sgt Pepper's Lonely Hearts Club Band.
By the time Stockhausen died, last year, rock journalists were about the only ones taking him seriously. Ed Vulliamy, writing in the Observer the day after his death, was in no doubt: "This was the man who realised that Wagner was rock'n'roll and that rock'n'roll is Wagner ... no Stockhausen, no Pink Floyd, no Stockhausen, no Velvet Underground or Yes, certainly no Brian Eno. Probably no Radiohead either."
It seems a tragic justification of the career of the author of Gruppen that it would lead, in the end, to a multi-million selling pop album called OK Computer. But such Lilliputian testaments were very much in the air in 2007 because, for the best part of 30 years, the people who understood what had made Stockhausen interesting in the first place were generally not willing to stand up for his whole career. Since the mid-1970s, the composer who had once ruled a vast swath of contemporary taste had turned into a curiosity.
Stockhausen scholars are keen to discourage people from dividing his career into a soberly analytical period and a mystical one. Nevertheless, there is a Darmstadt Stockhausen and a Sirius Stockhausen. The first, running from 1950 to the mid-1960s, was exposed at the famous Darmstadt summer school where Pierre Boulez, Luigi Nono and Bruno Maderna first came together. Stockhausen's music of this period is tonally, rather than conceptually, adventurous. Like many of the Darmstadt school, he was interested in "total serialism", or the extension of Schoenberg's theories to regions the latter never dreamed of. In addition, there were the first ventures into "electronic music": with what now seem very primitive means (razorblades and one-track or, later, four-track tapes), Stockhausen created the first enduring masterpieces of the medium, Gesang der Jünglinge and Kontakte.
These pieces are full of life, colour and dramatic power. I would guess that Gruppen, the intricate and torrential piece for three simultaneous orchestras of 1958, remains his most admired piece by musicians. But if he had remained a Darmstadt figure, he would never have made the cover of Sgt Pepper, and few people would have justified his existence by the popularity of Yes.
What occurred - and continued, controversially, until his death - was what might be called the Sirius period. The composer who would declare in the 1970s that he had arrived from the star Sirius (rather than been born in Burg Mödrath, near Cologne, in 1928) actually started to appear in the 1960s. You could even trace the mystical tendency back to his first encounters with John Cage, inviting the American guru of chance procedures and Zen contemplation to speak at Darmstadt in 1958. At first, pieces such as the four-ensemble Carré were intended to alter the sense of the passing of time in listeners' minds; these were followed by idealistic statements of global endeavour, such as Telemusik and Momente. Ideas about the process of performance then started to inflect the work.
Stockhausen's exotic appearance and counter-cultural way of life drew much attention in the 1970s, as he trotted about the world with two companions and a number of children. One of the worrying things about Stockhausen's development was how he withdrew from publishers, record companies and ensembles. He preferred to issue his work through his own networks and circles; it isn't difficult to imagine that this removed any kind of nourishing critique from the processes of composition. What critique Stockhausen had, after he withdrew from Darmstadt, was undoubtedly either frivolous or frankly exotic; his first assistant, Cornelius Cardew, detached himself into a position of ludicrous Maoism, and wrote a book with the glorious title Stockhausen Serves Imperialism.
Despite its undoubted excesses, the post-1960s period produced some unforgettable spectacles. Stimmung, a 90-minute vocal meditation on the overtones of a bass B flat, never fails to capture an audience's imagination. Inori and Trans, vast and simple sonorous canvases - one with a Japanese priest carrying out adorations on a platform - at first can arouse giggles, but in the end are impressively sustained exercises in pure orchestral grandeur.
If some of Stockhausen's middle period requires an audience to suppress impatience or scepticism, the operas from the cycle Licht seem to depend on irritation, embarrassment and bewilderment in the audience to maintain any interest at all. Part of the problem was his decision to make demands an opera house could never meet, with some works having to be premiered in sports halls. Later, we would hear of eccentric ideas such as having each member of a string quartet play in a separate helicopter, connected by intercoms. Viewing the Helicopter Quartet on YouTube reveals some highly jejune musical invention and a spectacular visual concept. But, despite occasional striking inventions, it is hard to conceive of Licht as anything but a vast folly.
Stockhausen's reputation sank catastrophically. The point of these festivals is to see what can be rescued from the absurdity in his later work. Everyone knows there is a good deal of solid, adventurous worth. Perhaps an illuminating comparison is with the German artist Joseph Beuys. They were both towering guru figures in their fields, but Beuys saw the absurdity of the guru, the genius, in a postwar Germany. The society he grew up in had had rather too much of authority figures commanding unquestioning respect. Stockhausen never quite accepted that, and the weakness and the foolishness were the product of someone in love with the idea of his own cryptic authority.
There are moments of incomparable genius in Stockhausen. Now he is dead, it's up to listeners to pick through the music and discover the moments of startling newness that need neither explanation nor justification. Just listen to the brass chords hurtling round the hall at the climax of Gruppen and ask yourself: does this man need to be sold by the mention of Radiohead?
• Klang, a Tribute to Karlheinz Stockhausen, is at the Southbank Centre, London SE1, from Saturday to November 9. southbankcentre.co.uk