"The Magic Flute" is considered such a jumble of nonsense that it is as well to endeavour to extract some sense from it.
Emanuel Johann Schikaneder, who wrote it with the aid of a chorister named Gieseke, was a friend of Mozart and a member of the same Masonic Lodge. He also was the manager of a theatrical company and had persuaded Mozart to compose the music to a puppet show for him. He had selected for this show the story of "Lulu" by Liebeskind, which had appeared in a volume of Oriental tales brought out by Wieland under the title of "Dschinnistan." In the original tale a wicked sorcerer has stolen the daughter of the Queen of Night, who is restored by a Prince by means of magic. While Schikaneder was busy on his libretto, a fairy story by Perinet, music by Wenzel Müller, and treating of the same subject, was given at another Viennese theatre. Its great success interfered with Schikaneder’s original plan.
At that time, however, freemasonry was a much discussed subject. It had been interdicted by Maria Theresa and armed forces were employed to break up the lodges. As a practical man Schikaneder saw his chance to exploit the interdicted rites on the stage. Out of the wicked sorcerer he made Sarastro, the sage priest of Isis. The ordeals of Tamino and Pamina became copies of the ceremonials of freemasonry. He also laid the scene of the opera in Egypt, where freemansory believes its rites to have originated. In addition to all this Mozart’s beautiful music ennobled the libretto even in its dull and unpoetical passages, and lent to the whole a touch of the mysterious and sacred. "The muse of Mozart lightly bears her century of existence," writes a French authority, of this score. Because of its supposed relation to freemasonry, commentators have identified the vengeful Queen of the Night with Maria Theresa, and Tamino with the Emperor. Pamina, Papageno, and Papagena are set down as types of the people, and Monostatos as the fugleman of monasticism.
Mozart wrote on "The Magic Flute" from March until July and in September, 1791. September, 1791. September 30, two months before his death, the first performance was given. In the overture to "The Magic Flute" the heavy reiterated chords represent, it has been suggested, the knocking at the door of the lodge room, especially as they are heard again in the temple scene, when the novitiate of Tamino is about to begin. The brilliancy of the fugued allegro often has been commented on as well as the resemblance of its theme to that of Clementi’s sonata in B-flat.