The world has not yet been blessed with The Da Vinci Code: The Opera (it's surely only a matter of time) but when that happens there will undoubtedly be plans mooted to bring it to the Edinburgh Festival Fringe with one obvious venue in mind: the hallowed surroundings of Rosslyn Chapel, the setting for the mystery unravelling, code-cracking denouement of the story.

In the meantime, an enterprising group has come up with an excellent alternative on the mystery-code-thriller front. It's a tale full of symbols and portents, of an enigmatic brotherhood, a vengeful queen, a shadowy acolyte who does her bidding and a hero whose quest for enlightenment leads him into great danger - with a beautiful girl at his side. And unlike Dan Brown's novel, The Magic Flute has stood the test of time; it is debatable whether anyone will be reading The Da Vinci Code as a literary masterpiece in 118 years time.

The Magic Flute is being performed in Rosslyn Chapel this week by Shadwell Opera, a group of Cambridge University students who only staged their first opera at the beginning of this year. Such was the success of that production of Così fan tutte that the company decided to repeat the experiment with another of Mozart's works the following term.

"I'd recently seen ENO's Magic Flute at the Coliseum and it made me think about how I'd stage my own production," says Shadwell Opera's director Jack Furness.

Quite how the production has ended up on the Edinburgh Fringe and, what is more, being performed in Rosslyn was a matter of happy coincidence.

The aim of Shadwell Opera's founders of making opera more approachable to their student peers means finding an accessible modern English translation. Furness discovered the existence of one written a few years ago by Kit Hesketh-Harvey, best known as one half of comedy duo Kit and The Widow.

"I contacted Kit about using his translation of The Magic Flute and he just happened to drop into the conversation how he'd always had this idea of staging the opera in Rosslyn Chapel," Furness explains. "I looked up the history of the place and I was intrigued by all the Masonic symbolism - it seemed like a perfect setting."

With all its carvings and architectural detail the surroundings of Rosslyn Chapel are such that any set design would be in serious danger of being upstaged.

The company has kept its production of The Magic Flute simple, not least because in Cambridge earlier this year it was performed in three very different venues - the Cambridge Union, the Master's Garden in St John's and Gonville and Caius College Hall.

"Part of the thinking was let's sell as many tickets as possible by bringing the opera to different groups of students'," says Furness, "but it was also important to make the production as adaptable as possible since we knew we would be bringing it to Rosslyn.

"We've rehearsed in so many different locations that I think the cast could now give a performance in any venue at ten minutes' notice."

Just as people have been puzzling for centuries over the symbolism of the various carvings in Rosslyn Chapel, they have been pondering the meaning of The Magic Flute since its premiere.

The threefold seal of the sun is the central image and three symbolism permeates both score and story. There are three ladies, three spirits, three opening chords and even three flats in the predominant key signature (E-flat major).

The opera has been read as a metaphor for the revolutionary European politics of the time and the overthrowing of the old world order, it has been seen as a private ritual made public for the Masonic Lodge of which both Mozart and his librettist Emanuel Schikaneder (also the original Papageno) were members.

For Furness the music itself is central to the interpretation of the opera. "The idea of magic items in German Romantic literature is that they can be used for good or ill depending on the intent of the possessor," he explains. "In The Magic Flute these items are musical instruments which made me think that perhaps the main magic in the opera is the music itself, to be put to good or bad effect by the characters."

He contrasts the musical world of the Queen of the Night with that of the leader of the Brotherhood Sarastro. "The Queen's music is all superfluous, riding over the top of everything and she violates the words of her arias with all those high notes, Sarastro's is usually supporting the musical texture. Ultimately I thought the difference between these characters was that the Queen of the Night uses her music for power and to gain control over people whereas Sarastro uses it to portray fundamental truths." The Magic Flute, Rosslyn Chapel, 26 - 29 August. 0131 440 2159 www.rosslynchapel.com