Hamlet, as the old chestnut goes, is “too full of quotations”: in the centuries since its creation, dozens of its phrases have become part of our language. So how would Brett Dean tackle the daunting task of turning Shakespeare’s five act behemoth into an opera for Glyndebourne? Operatic practicalities demand the cutting of a high percentage of the action, so what is the essence of Hamlet-ness, and in what way might it be preserved?

Dean and librettist Matthew Jocelyn go for a highly innovative solution: they treat Shakespeare’s text as a cut-up, picking what they take to be the most important lines, phrases and fragments, re-ordering them at will, sometimes handing them between characters. The opera opens with Hamlet’s muttered “...or not to be”; the phrase recurs through the opera. Ophelia’s madness fits perfectly into the tradition of operatic mad scenes, with her two entrances conflated and interlaced with repetitions of the words from Polonius and Hamlet that have pushed her to derangement. Famous lines get traded between characters for effect or just for fun: when showing off how they can perform, the Players indulge in garrulous wordplay with some of the most famous quotations. There’s a nod to literary erudition with a gag based on the debate of whether it should be “solid” or “sullied” in “O, that this too too solid flesh would melt”; the treatment of Rosencrantz and Guildenstern has more than a whiff of Tom Stoppard.

Dean, Jocelyn and director Neil Armfield are in no way attempting to “update” Hamlet or “make it relevant”. Rather, they are treating it as a timeless story told in language that has become timeless; they spare no effort in elucidating and amplifying that story and the key relationships between its characters.

Those characters were performed by a truly exceptional cast, the most exceptional of all being Barbara Hannigan as Ophelia. In her mad scene, which became the centrepiece of the whole opera, she had everything. Vocally, she could hit ferociously difficult rapid fire peaks and swoops, or smooth the voice into heart-melting lyricism. She looked young and beautiful in the classic “English rose” mould. And her acting was completely persuasive, the most convincing depiction of a person becoming unhinged that I’ve ever seen on an operatic – or perhaps any – stage. In the title role, Allan Clayton portrayed madness in a way that was contrasting and almost as powerful, if perhaps slightly overdone: from the beginning of the play, he is consumed with manic nervous energy; it’s only at the point of Ophelia’s death that his sanity returns – just at the point where it is too late; he explores many corners of vocal timbre.

John Tomlinson brings his stentorian voice to three small roles, entertaining especially in the hilarious gravedigger scene. Sarah Connolly brings vocal assurance and stress to the role of Gertrude, Kim Begley is a superb windbag as Polonius, Jacques Imbrailo is a warm Horatio who also excels in the passages where he and Hamlet show themselves to be just young students up for a bit of a lark and a bit of banter. The cast has unusual strength in depth: countertenors Rupert Enticknap and Christopher Lowrey relish the Tweedledum-and-Tweedledee pairing of Rosencrantz and Guildenstern; David Butt Philip is an ardent Laertes; Rod Gilfry’s Claudius impresses at the critical moments.

Alice Babidge dresses the characters in dinner jackets and evening gowns, with elegance to outshine even a Glyndebourne audience; Hamlet stands out as the outsider: black-clad and scruffy. Ralph Myers’ sets are crafted out of rolling sections of wall containing many doors and shuttered windows: they are rapidly shifted to generate different configurations of the stage as we move from one scene to the next, sometimes with jaw-dropping slickness. But the most lasting impression of this production is the extraordinarily high level of acting that Neil Armfield achieves from every one of the cast, making us understand the emotions and relationships as clearly as in the best staged versions.

Dean’s music is virtuosic, varied and has moments of great beauty; Vladimir Jurowski and the London Philharmonic Orchestra apply full power to every moment. But his basic atonal style doesn’t really appeal to me: in common with many current opera composers, his music maintains discordant tension continuously in a way that I find rather wearing. That didn’t stop me appreciating the drama that Dean brings to many of the passages and the many snatches of lyricism. But I found myself wishing for more shifts in the mood of the music – to have lyrical or comical passages provide some level of musical relief from the stress.

But this Glyndebourne world première of Hamlet impresses on every other count: this is the true essence of Shakespeare’s play, superbly sung and acted – a riveting evening.