THE St Magnus International Festival marked its 40th year with an extended 10-day programme, three chamber operas, a gleaming new Steinway grand piano, 40 world premieres — including one by the late Sir Peter Maxwell Davies; more on that in a moment — and a visit from the BBC Symphony Orchestra that culminated with a performance of Beethoven’s Ninth Symphony. Plenty to celebrate, then, not least the marvel of community involvement and deft politicking that has ensured the sheer survival of a classical musical festival in Orkney for all these years.

Inevitably there was the kind of reminiscing and navel-gazing that comes with any birthday, and inevitably that shone light on the wobbly elements of the festival as well as the strong. Four decades ago the notion of staging contemporary concerts in St Magnus Cathedral was bold, radical, risky. Now the festival is as much a part of Orkney’s tourist infrastructure as ginger fudge and triangular oatcakes. Special anniversary knitwear was available at this year’s concerts. How to find the sweet spot between localism and internationalism, cutting-edge programming and populism, inclusiveness and prestige? The search continues at most festivals, and by and large St Magnus isn’t far off the mark.

That there was no community drama in this year’s programme seemed to ruffle a few local feathers. That there wasn’t much by way of late-night carousalry — the festival club had been relocated to the Girnel and was lacking in good craic or tunes — seemed a shame given the club has traditionally been lynchpin of the audience/performer camaraderie and general bright spirit that used to make St Magnus so special. More alarmingly, there were no composing or conducting courses this year, both of which normally run in parallel to the main concert series and are valued training opportunities for young professionals. The reason is plain money. When festival director Alasdair Nicolson was faced with making this year’s budget add up, he axed the courses because they would make the cleanest cut. He promised they’ll be back next year.

Then there was the tricky shadow cast by Peter Maxwell Davies’s death in March. At a panel discussion hosted by BBC Radio 3’s Music Matters, one audience member asked whether the festival will be able to cope without its famous founder, to which Nicolson looked understandably peeved. Maxwell Davies had long since withdrawn from everyday involvement in running the programme (though had retained a presidential presence) and the festival’s longevity is owed to the many, many hands who have shaped it along the way.

The new piano is a case in point. It’s the product of five long years of fundraising on and off the islands and its arrival is a big, sleek statement of clout and intent. The instrument itself was selected via a trip to the Steinway factory in Hamburg where pianist Steven Osborne travelled with Nicolson, and they chose well: even in the reverberant acoustics of St Magnus Cathedral it sounded direct and dazzling and clear in the duet version of Stravinsky’s The Rite of Spring as played by Samson Tsoy and Pavel Kolesnikov, a joyous young duo. Two nights later the piano was put through its paces by Russian powerhouse Alexei Volodin, careering through Rachmaninov’s Second Concerto with the BBC Symphony Orchestra. There’s no hiding in the Pickuaquoy Centre — a sports-arena-turned-concert-hall whose acoustics don’t do flattery — but the piano sounded great: fierce at the upper and lower extremes, a soft-grained purr in the middle.

Elsewhere I heard a fine performance of Purcell’s Dido and Aeneas by Voces8 and Florilegium featuring the excellent Anna Dennis as Dido, full of dignity and grit and simmering indignation. I was very sorry to miss the St Magnus Festival Chorus joining the BBC Symphony on Saturday for Beethoven’s Ninth, whose Ode to Joy has been the anthem of the European Union since 1972. When he put the programme together, years in the making, there was no way Nicolson could have imagined the poignancy of hearing that theme on 25 June 2016.

At the heart of St Magnus is still a joint emphasis on new music and children that goes right back to the early days, when Maxwell Davies wrote wrote pieces for the schools of Orkney every single festival. Back then he was living in a remote croft on the west coast of Hoy: a tiny place high above Rackwick Bay with no road access or electricity or water. To survive somewhere like that required the support of his neighbours, and underpinning Maxwell Davies’s music for children is a recognition of what it means to be part of an island community. “I thought it was a constructive idea to write words and music about the place where the festival was happening,” he explained a couple of years ago. “The best way to get people to come to the festival was to involve their children.”

And proof of that theory came Monday night when the primary pupils of Sanday gave the world premiere of one of the last pieces Maxwell Davies ever wrote — a score called Wendy’s Wedding Music that he penned as a gift for the headteacher of Sanday Community School. “I don’t have any kids,” my Airbnb hostess told me as she gave me a lift from the ferry pier, “but the school is the heart of the island for everyone.” Later, when the concert was paused so a raffle could be drawn, my hostess won a set of cooking spatulas and I narrowly missed out on a sizeable bar of Cadbury’s Fruit & Nut. It wasn’t my average night out at a premiere.

Wendy’s Wedding Music is a buoyant little score. “I’m honoured that he didn’t just scribble down a simple tune,” Wendy herself told us by way of introduction, splendidly kitted out in her wedding dress for the occasion. “Max gave us a full three-movement piece, like serious classical music.” The first movement is a graceful, flowing melody, the second movement introduces some sturdy Scotch snaps and the third becomes increasingly raucous. On stage was an eight year old who had only had a few cello lessons, playing away alongside recent graduates of the Royal Conservatoire of Scotland. The whole piece (it lasts around four minutes) was performed twice. The last movement went down so well they played it thrice.

Maxwell Davies wrote Wendy’s Wedding Music piece last autumn so it doesn’t count as his very last work: still to come was a children’s opera, The Hogboon, which premiered at the Barbican in London on Sunday, and a movement of a new string quartet, which premiered at a memorial concert in London on Monday. I’m told that when he finished that quartet movement, he turned to those sitting with him and remarked that it felt good to be finished. “The music is changing now,” he said. “It is disappearing into thin air like the tip of a nose.”

Kate Molleson travelled to Orkney with NorthLink Ferries