In 1763, David Garrick shook up the theatre world by banning audience members from sitting onstage at Drury Lane.

Since the theatres had re-opened in 1660 (after the Restoration), it had become common practice to pay a few extra pennies for the privilege of sitting on the stage. A century earlier, audiences at The Globe were also often as concerned with being seen themselves as with watching the play – as one contemporary diarist, Thomas Platter, put it, ‘Anyone who remains on the level standing pays only one English penny; but if he wants to sit, he is let in at a farther door, and there he gives another penny. If he desires to sit… where he not only sees everything well, but can also be seen then he gives yet another English penny.’

From the earliest staged performances, audience-watching has played a huge part. So it’s no surprise that the idea of people watching people watching a performance has seeped into theatre and opera, in the form of the play-within-a-play.

Perhaps the most famous example is Shakespeare’s A Midsummer Night’s Dream, whose ‘rude mechanicals’ provide much of the comedy with their ‘most lamentable comedy and most cruel death of Pyramus and Thisbe'. Taking his cue from Shakespeare, Purcell incorporates a masque into his A Midsummer Night’s Dream-inspired The Fairy Queen. Rather than a comic interlude courtesy of Bottom and co., however, Purcell conjures the god Phoebus to oversee a masque celebrating the four seasons. Almost three centuries later, Shakespeare’s play-within-a-play becomes an opera-within-an-opera in Britten’s A Midsummer Night’s Dream, in a scene where the composer sends up both the actors’ misguided dramatic intentions and 19th-century opera in one fell swoop.

In both Strauss’s Salome and Wagner’s Die Meistersinger von Nürnberg, a show-within-the-show proves to be a turning point. In Salome, we watch Herod voyeuristically enjoying Salome’s ‘Dance of the Seven Veils’ after his ill-advised promise to give her whatever she wants in return. Wagner’s opera, meanwhile, comes to a head with a singing competition between Nuremberg’s Guild of Mastersingers – with a rather happier ending than the singing competition in his earlier opera Tannhäuser.

Some works, though, take the idea further and explicitly frame the entire work as an opera-within-an-opera, unsettling the ‘real’ audience’s sense of reality. Strauss’s Ariadne auf Naxos is one such opera.

Originally written as a stand-alone divertissement to be performed after Molière’s Le Bourgeois Gentilhomme, Ariadne auf Naxos was later re-worked, with a Prologue added to create the opera that is performed today. In the Prologue, Strauss introduces us to the composer, a music master, a wig-maker, some comedians and a prima donna diva. We see the comic and chaotic preparations for the evening’s entertainment – and then become the audience for the performance itself.

To completely different effect, Berg opens Lulu with a Prologue in which a circus ringmaster addresses the audience and introduces his menagerie – the prize of which is the ‘snake’ Lulu. Like Ariadne, though, the effect is to add another audience layer (or ‘diegetic level’), and to frame the rest of the opera as a performance. The palindromic film that comes half-way through the opera takes us another step deeper.

More recently, composers and directors have adapted this stage tradition to include television-shows-within-operas, to the same effect: think of Anna’s appearance on ‘Larry King Live’ in Turnage’s Anna Nicole and Jonathan Kent’s recent staging of Puccini’s Manon Lescaut, in which Manon dances for both a live audience onstage and a fleet of television cameras.

Composers, librettists and playwrights continue to be fascinated by our love of spectacle. And in the very best examples these make us question our assumptions about reality itself. When you’re watching an opera-within-an-opera, as Orwell didn’t quite say, you look from actors to audience, and from audience to actors again, but sometimes it’s impossible to say which is which.

Ariadne auf Naxos runs until 13 July 2014. Tickets are still available. The production is given with generous philanthropic support from Hélène and Jean Peters, Hamish and Sophie Forsyth and The Maestro’s Circle.

Antonio Pappano conducts the cast and the Orchestra of the Royal Opera House in concert at the Symphony Hall, Birmingham, on 6 July 2014. Tickets are still available.