First, a few arresting facts and figures. In 1817, when he wrote La Cenerentola (his 19th opera, and the 6th within 15 months) Gioachino Rossini was just 24 years old. He wrote it in three weeks. After the fairly disastrous premiere, he told his anxious librettist: “Calm down! It will be all the rage in Rome by the end of the season, all over Italy by the end of the year, and France and England in two years. Impresarios and prima donnas will be fighting over it…” He wasn’t far off: Cenerentola was performed in Spain in 1818, Vienna and England in 1820, Paris in 1822, Berlin, Moscow, New York… In 1844 it became the first opera ever to be performed in Australia.

It was also Rossini’s last Italian comedy (if comedy is the right description). This composer, whom we have come to think of as the nonchalant prankster of bel canto opera, spent the remaining 12 years of his short composing life (he retired in 1829, after William Tell) writing grand melodramas, historical extravaganzas and sentimental tragedies. Then he spent – according to the legend, at any rate – 30 years eating, drinking and sleeping before becoming, in the late 1850s, the grand old man of European music, a fixture of Second Empire Paris, whose soirées were the last word in chic.

By the time he wrote La Cenerentola this very young man was already well on the way to becoming a pan-European legend: The Barber of Seville, written the previous year, was seeing to that. Since the brilliant patriotic knockabout L’italiana in Algeri of 1813, Rossini had been writing operas to commission for houses all over Italy: Venice, Milan, Naples, Rome. After Cenerentola, he would settle down in Naples (where he had been director of the opera since 1815) for five years and produce a body of work which fixed the templates for Italian opera for the rest of the 19th century; Giuseppe Verdi adhered to his models almost until the end of his days, and even Wagner’s Tannhäusershows Rossini’s influence in its formal aspects. In Paris with William Tell, Rossini further perfected the genre known as Grand Opera, with equal influence over the following decades.

But legends still have to go to work, and even by Rossini’s standards the genesis of his Cinderella was fraught. He had been commissioned by the Teatro Valle in Rome to write a piece based on a French comedy, but the Papal censor demanded so many changes that it finally became too much. On Christmas Eve Rossini and the librettist Jacopo Ferretti had a brainstorming session, and after the increasingly exasperated Ferretti had suggested a couple of dozen subjects, his desperate mention of the Cinderella story made the dozing composer suddenly prick up his ears. The opening night was already fixed: January 25th. Ferretti worked overnight to give Rossini a workable treatment, both worked like madmen for a month, and so this Cinderella was born.

What was it about the subject that so caught Rossini’s interest? We can only work backwards from the opera’s story and music to try to find out. And what we do find is quite surprising: not the ironic, distanced, Byronic observer of human foibles we might expect from his genuine comedies, but an almost Mozartian sensibility and sincerity hidden amid the folds of foolery and vocal fireworks. It’s about the last thing you’d expect from Rossini. But in Cenerentolahe was wearing his heart on his sleeve as never before or after. La Cenerentola is an opera for the Carnival season (between Christmas and Ash Wednesday), and one of the perennial Carnival themes is “the world turned upside down” – the natural order reversed, an explosion of licensed madness where all manner of bad behaviour is permitted for a short time. And perhaps this is the only cynical thing about Cenerentola: the implied admission that the victory of Cinderella, the “triumph of goodness” that is the opera’s subtitle and true subject, is rather far from the normal state of affairs. But where the carnival game of prince and valet swapping identities comes to its end, the trajectory of Angelina – the heroine’s real name – continues to its triumph.

It is hard, and not really necessary, to pin this opera down precisely in terms of genre. Opera buffaopera semi-seria, sentimental comedy, dramma giocoso (“drama with jokes” – the designation used for the darker Don Giovanni)…the fact is it partakes of all these, and for a good reason: Rossini, as usual, was not particularly interested in repeating what had happened before, but in creating new types of drama to suit his ever-new types of music. It is certainly quite far from the unstoppable, madcap Barber of the previous year, in its music as much as in its intentions and sensibility.

Cenerentola is Rossini’s most Mozartian opera. The music is, a lot of the time, rather more elegant and responsive to the emotions of the text than you’d expect in a pure comedy – rather as in Mozart’s Marriage of Figaro. The characters are drawn from various theatrical traditions, with Angelina (“Cenerentola” is the teasing name given her by the sisters), Prince Ramiro and Alidoro entirely serious creations, straight from the opera seria. Angelina’s family is strictly buffo, the yelping, vain, stupid sisters, the blustering, magniloquent father. And as with Mozart’s Così fan tutte, Rossini confounds expectations by treating a fantasy story with complete seriousness.

And confounds them further still, because you’d think realism would be alien to a composer who tended to avoid psychological analysis and any sort of programmatic or descriptive music. And yet in Cenerentola he goes to great lengths to do both. It may be based on a fairy story, but Rossini and Ferretti removed every jot of the fantastical from the story in order to concentrate on the humanity of the heroine. Various theories have been adduced as to why Rossini did away with fairy godmothers, crystal slippers, magic coaches and so on. Some have even said his nature was averse to magic and fantasy – but they can’t have seen his Armida, which is entirely about enchantment. The real reason is surely the obvious one: he wanted his Cenerentola to be a real story about actual people.

In the Barber, and his true comedies, Rossini’s music has a life of its own and is in a sense autonomous from the written drama: it creates and incarnates its own dramatic logic, it is driven by its own forms, propelled by the manic genius of the composer’s delight in pure rhythm, melody, internal energy. And there is some of that in Cenerentola, to be sure; but there is also a musical engagement with words and drama that creates a much closer bond between them.

Angelina undertakes a musical journey from her melancholy opening song to final triumph – a journey exemplified by the way the final ‘Non più mesta’ musically transfigures her opening canzonetta ‘Una volta c’era un rè’. She is no doubt Rossini’s most affecting heroine. In most Cinderella stories, the heroine’s main virtue stems simply from the fact that she is victimised. Ferretti and Rossini have something more interesting in mind, a young woman who grows and changes in surprising ways through the opera. The wistful wraith of ‘Una volta c’era un rè’ has a kind heart, as her treatment of Alidoro-as-beggar shows, and is capable of love: one of the most touching moments in Cenerentolais Angelina’s duet with the disguised Prince, ‘Un soave non so che’, full of a dreamy, palpitating delicacy, as Rossini captures a genuine moment of transition and awakening where Angelina becomes a woman.

This is the catalyst for what we might call her discovery of her true self, her conscious birth as a person: after vainly entreating Magnifico to let her go to the ball, a rebel is born. As she makes her disguised entrance at the ball itself, she rather boldly lays out her requirements in a spouse: respect, love, kindness – fairly basic requests, but a big step for her. The “bontà” she stipulates – goodness, kindness – is her own lodestone, and now she extends it to her undeserving family. Its triumph is also the opera’s subtitle, and part of that triumph is that in the end the awful family embraces it.

But Cenerentola is not merely a sentimental comedy; that would have been alien to a composer whose sly intelligence loves to set up expectations and then whip the carpet from under the audience’s feet. Rossini prevents this by setting what could certainly look like a soppy story against a genuinely edgy background of farce, true malice and a hint of genuine madness. One of his favourite games is depicting with considerable detachment the borderline insanity of human behaviour. There is no better example than Don Magnifico, a man of wildly fluctuating temperament who, while generally an appalling chap, is far from wholly dislikeable: the extravagance of his fantasy is highly engaging, and he is full of energy and crazy optimism. His unstoppable flights of imagination in Act 2 are guaranteed to get the biggest cheers of the evening, rather marvellous relentless outpourings of words and images that conjure and echo the furious musical momentum that only Rossini can produce.

And yet Magnifico is also a man who can shock the orchestra into silence: hear the juddering halt the music comes to when, to get himself out of a corner, he claims that his third daughter (ie Cinderella, who is standing beside him) is dead. Rossini shared some elements of his sensibility with Byron, and this illustrates one: the ironically indulgent treatment of Magnifico suddenly produces a moment where the moral effects of human venality appear in their starkest form.

Rossini, the master of a screw-turning musical tension usually designed to explode into audience applause, experiments with different kinds of tension in Cenerentola: notably, a fruitful collision between apparently exclusive genres that enriches both. Without Magnifico’s visions of gargantuan excess and absurdity, without Dandini’s immersion in his assumed role of Prince that entirely goes to his head, without the sisters’ hysterical meanness and vanity, the ending – Angelina’s final journey to a Mozartian territory of pure idealism and forgiveness – her fourfold repetition of “tutto” as she embraces her family – would have much lesser effect. As it is, properly done, this is one of opera’s most moving moments, up there with the divinity that descends to bless the household at the end of The Marriage of Figaro. Rossini’s mythology – much of it self-created – has meant that sincerity is about the last thing we have come to expect from this composer. And that probably explains in part why this is such a loveable opera: its aims and effects are simply unexpected, and ambush us anew every time.