On 13 January 1525, Jacopo di Filippo Falconetti threw a sumptuous party at his villa just outside Florence to celebrate his return from exile. Everyone who was anyone was there. As the playwright Donato Giannotti recorded, all the city’s leading men were present. Even Florence’s de facto ruler, Ippolito de’ Medici, put in an appearance.

Jacopo had spared no expense. The finest wines were poured from golden flagons into silver cups; the choicest delicacies were served on glittering platters; and all manner of dazzling entertainments were laid on. The highlight of the evening was, however, a comedy called Clizia. Specially written for the occasion, it had everything that Renaissance audiences loved: a beautiful young orphan girl, a lascivious old man, a case of mistaken identity and a happy ending. But its plot was the least of its attractions. Much to the onlookers’ delight and amazement, one of the actresses – Barbera Salutati – came on to sing a light-hearted madrigal before and after each act. No one had ever seen anything like it. It was the first time in history that music had been used to break up a play like this – and it was to change theatre forever. From that moment on, so-called intermedio songs became a regular feature of dramatic performances and, by the end of the 16th century, their popularity had inspired the development of an entirely new form of musical theatre – opera.

But what is most remarkable about all this is that Clizia was written by none other than Niccolò Machiavelli (1469-1527). Then engaged in an extra-marital affair with Barbera Salutati, he had interspersed the action with madrigals so as to give her a bigger role and had worked closely with the French composer Philippe Verdelot (c.1480-c.1530) to ensure that the music would allow her to show off her talents.

It was neither the first nor the last time that Machiavelli would turn his hand to music. Born into an aristocratic – albeit impoverished – family, he had grown up surrounded by the fruits of the musical Renaissance. As befitted any woman of good breeding, his mother had often sung to him and his brother and had even composed some pieces of a religious nature. This would doubtless have imbued him with an innate affection for music; but, when it was time for him to begin his schooling, he would have been expected to gain a more formal grounding in the subject. As Baldassare Castiglione later wrote in Il Cortegiano (The Book of the Courtier), a gentleman could not claim to be well educated ‘unless he [was] also a musician and unless as well as understanding and being able to read music he [could also] play several instruments’. We do not know what, if any, instruments Machiavelli learned; but that he gained at least a rudimentary grasp of music is beyond doubt.

Although the Dominican friar Girolamo Savonarola did his best to stamp out secular music during his brief period of ascendancy in Florence – even going so far as to have a number of instruments thrown onto bonfires in the Piazza della Signoria – Machiavelli carried his youthful fondness for music through into adulthood.

Elected Second Chancellor of the Florentine Republic in 1498, Machiavelli found that music provided him with a welcome distraction from work – as well as an enjoyable outlet for his often bawdy sense of humour. Having already composed a number of amorous verses in his adolescence, he now turned his poetic talents to composing songs. As his correspondence testifies, most of these were meant to be shared with friends over a drink or after a lazy dinner. On 24 April 1504, an anonymous friend, known only as ‘V’, wrote from Rome to thank Machiavelli for some songs that he had sent him. Since Machiavelli had not included the music, ‘V’ suggested that they should sing them together, accompanied on the rebec (a bowed string instrument), when he was back in Florence.

More than anything, however, Machiavelli enjoyed writing canti carnivaleschi. Something of a Florentine speciality, canti carnivaleschi were sung during the city’s annual carnival celebrations and were always full of jokes. How many Machiavelli wrote is unclear, but six have survived. Their subjects vary widely. Some are romantic in nature; others address overtly sexual themes; and others still poke fun at religious sensibilities. But they are all tremendously funny. Double entendres abound; familiar literary tropes are turned on their heads; and rhythmical patterns are exploited for maximum comic effect. Whether Machiavelli wrote the music for them as well cannot be known, but it is at least possible.

During his time in the chancellery, Machiavelli also had the opportunity to meet some of the best-known composers of his day – both in Florence and on his frequent diplomatic missions abroad. While on an embassy to Maximilian I in December 1507, for example, Machiavelli stopped in Constance, where he met the Flemish composer Heinrich Isaac (c.1450-1517), who had recently been living in Florence. The two men already seem to have been on friendly terms and a lively conversation ensued.

Yet Machiavelli’s interest in music only reached its peak after he was removed from his position as Second Chancellor, following the Medici’s return to Florence in 1512. He did not, of course, stop writing songs. Over the coming years, he still penned occasional verses, especially canti carnivaleschi. But now that he had more time on his hands, he began to think about music more seriously – and to explore its application outside the bounds of mere amusement.

He was particularly interested in looking at the role of music in war. Back in 1505-6, Machiavelli had helped establish a citizen militia and, over the years that followed, had been responsible not only for recruitment and training, but also for overseeing its use in the reconquest of Pisa.

During that time, Machiavelli had been alarmed by how difficult it was to communicate orders, especially in the midst of battle. Now that he had the opportunity to reflect on the problem, he was anxious to find a solution. Music seemed to offer some hope. In L’Arte della Guerra (completed in 1519), Machiavelli pointed out that music might be an effective means of directing an army. This was not an entirely novel idea. As he freely acknowledged, it was something that the Romans and the Greeks had known thousands of years before. They had even used different varieties of music (Doric, Phrygian, etc.), according to whether they wanted to ‘stir up or to quiet or to make firm the spirits of their men’. But Machiavelli was unusual in specifying which instruments should be used, by whom, and how: ‘Near the general’, he wrote:

I place the trumpets, as better fitted than any other [instrument] to be heard in the midst of noise of every kind … [And] near the constables and the battalion commanders, I wish there to be little drums and flutes, played not as they now are in armies, but as they are usually played at banquets.

Machiavelli was, however, most enthusiastic about the role of music in theatre. Clizia was just the beginning. Following its success, he became bolder in the use of songs in his plays. In the autumn of 1525, his friend, Francesco Guicciardini – best known today for his histories and for his writings on Florentine government – invited him to put on a performance of his first play, La Mandragola, in Faenza, north of Bologna. Fearing that the audience might not get all the Florentine in-jokes, however, he suggested that Machiavelli should adapt the script slightly. But Machiavelli saw the opportunity to make much more sweeping changes.

In January 1526, Machiavelli informed Guicciardini that, having talked the matter over with Barbera Salutati and his friend Ludovico Alamanni, he had written a host of new songs for her to sing between the acts. This was, admittedly, something of an exaggeration. In fact, he had only written two new songs and had borrowed the other three from Clizia. But they were still a runaway success – cementing his reputation as a pioneer of musical theatre and paving the way for the composition of the earliest operas, such as Jacopo Peri’s Dafne, first performed at the Palazzo Corsi in Florence in 1598.

Even had Machiavelli not won fame as a political philosopher after his death, his role in Renaissance music would doubtless have earned him a place in history. Though his songs are rarely performed today, the madrigals in his plays were to change the face of music forever.

It was hence not without reason that, just a few weeks before his death, he told his son Guido ‘to work hard to learn letters and music … since you see how much the little skill I have [has helped] me’.

Alexander Lee is a fellow in the Centre for the Study of the Renaissance at the University of Warwick and author of The Ugly Renaissance (Arrow, 2015).