Lend Me a Jukebox Opera. Yuks and Tenor Required.

Comic operas tend to be crowd-pleasers: At last, a break from all the tragic deaths and doomed lovers. The problem is there aren’t that many to choose from. Opera companies can program “Così Fan Tutte,” “Il Barbiere di Siviglia” or “L’Elisir d’Amore” and a handful of others only so many times.

So Francesca Zambello, the artistic and general director of the Glimmerglass Festival, came up with a novel idea. “I just said, ‘Let’s do a Rossini comedy that doesn’t exist yet,’” she said in a recent video conversation.

In other words, a jukebox opera — “Tenor Overboard,” which is to have its premiere at the festival, in Cooperstown, N.Y., on Tuesday and run through Aug. 18.

While the jukebox format is common enough on Broadway, it is much rarer in opera houses. Baroque opera lends itself to the genre better than most styles, from the “pasticcio” of yore, which recycled pre-existing works, to “The Enchanted Island” in 2011, a Metropolitan Opera commission in which the librettist Jeremy Sams inserted music by Handel, Vivaldi, Rameau and others into a plot borrowed from Shakespeare plays.

Undaunted by this relative dearth, or maybe stimulated by it, Zambello called the playwright Ken Ludwig last summer to ask if he would be interested in writing the libretto for the project. He was a good candidate on two counts: He wrote the book for “Crazy for You,” the Tony-winning Gershwin jukebox musical, and his most famous play, “Lend Me a Tenor,” is a farce involving an opera star in the 1930s. (His new “Lend Me a Soprano,” with lead female characters in the same basic plot, opens at the Alley Theater in Houston in September.)

Ludwig, an opera buff, jumped on the opportunity to collaborate, sort of, with Rossini. He decided to set “Tenor Overboard” in the 1940s and to cram it with what he called “the great tropes of comic opera.”

“Often they are stories about love that can’t be fulfilled because the older generation is trying to stand in the way of the sexual urges of the younger generation: ‘You can’t marry that boy,’” he said in a video chat. “I also wanted a storm — they often change the story, as they did in ‘Barber of Seville’ and ‘The Italian Girl in Algiers.’”

Ludwig cooked up a story involving two New York sisters, Gianna (Reilly Nelson) and Mimi (Jasmine Habersham), trying to escape their domineering father and an arranged marriage for Mimi. They end up joining — in cross-dressing disguise, a narrative device beloved by Shakespeare, opera and screwball comedy alike — an all-male quartet called the Singing Sicilians on a ship sailing to Sicily. Naturally, mayhem ensues.

“Tenor Overboard” relies more on theatrical dialogue than on the usual operatic recitative, so Ludwig’s libretto had to be fairly extensive — and funny. “Rossini has given you moments that clearly land comically because he was such a comic genius,” Ludwig said he told the singers. “And I’ve tried to write a libretto that is comic in the same way, and in the same way my plays normally have that sense of rhythm.”

Ludwig also retooled the supertitles that accompany the arias, which are sung in Italian, trying to give some of them “rhyme and rhythm,” as he put it. “Opera supertitles do need to convey to people something and you want people to be looking at the stage,” said Zambello, who is directing the production with Brenna Corner, “but these also have a little bit of extra Ludwig humor.”

After a general synopsis had been agreed upon, the hardest part was still to come: It had to be filled with music — which, in the end, came from 15 different sources.

“We wanted to be absolutely sure that we weren’t just rehashing famous arias of Rossini,” Joseph Colaneri, Glimmerglass’s music director, said on Zoom. “Yes, we have the ‘Barbiere’ duet, but we wanted this piece to also represent lesser-known music by Rossini.”

Colaneri became part detective, tracking down obscure versions of obscure operas online and in libraries, and part MacGyver, adapting some vocal scores to make them work in their new context. The text of the “Barbiere” duet, “Dunque io son,” that Colaneri referred to, for example, was slightly adjusted to make sense in the story. And because Ludwig’s main couple is made up of a mezzo and a baritone (a nod to “Dunque io son”), some transposing was required — Rossini tended to pair a tenor and a soprano for the love duets of his comic operas.

Another challenge was the scene introducing the Singing Sicilians, whom we first meet at a Y.M.C.A. — because why not? Colaneri looked at male quartets in Rossini operas but couldn’t find anything suitable. So he turned his attention to short pieces the composer wrote for “soirées musicales” after he stopped writing operas, and spotted the patter song “La Danza” (recorded by Luciano Pavarotti, among others).

Colaneri had to write a vocal arrangement for two tenors, a baritone and a bass — and more. “It has to work again in the second act because two of the men are replaced by the two women who are in disguise as men,” he said. “They’re singing in the female range, but I designed the piece so that it could work with mixed vocal styles.”

“Some people would say, ‘How can you transpose Rossini?’” Colaneri said. “But Rossini did this himself all the time.”

For Act 2, Colaneri had to find a basso buffo aria for the sisters’ father, Petronio (Stefano de Peppo). Instead of the popular “A un dottor della mia sorte,” from “Il Barbiere,” he chose “Io, Don Profondo” from “Il Viaggio a Reims” (an opera Rossini himself had harvested for parts, reusing some of it in “Le Comte Ory”). “To me, it’s the greatest of these buffo arias,” Colaneri said. “Rossini kind of went over the top with it. We knew we were going to have Stefano and that he would be able to pull it off.”

Colaneri and his cast also had to deal with the vocal embellishments and ornamentation that are part of performing Rossini. The conductor suggested that the singers listen to Ella Fitzgerald’s live version of “How High the Moon” for an example of masterful improvisation, which he described as “harmonically off the charts.” He also worked closely with them to come up with ornamentations that fit their register and roles. “You can’t write ornamentation for someone until you hear what they can do,” Colaneri said. “You have to kind of suss that out.”

As with most comedies, speed and timing are of the essence onstage and even off — “Tenor Overboard” was hatched in about a year. “Rossini wrote his operas sometimes in a month so why shouldn’t we?” Zambello said.

Fans should be reassured that they will laugh with Rossini, not at him. “We are seeking to perform these pieces with all the musical integrity necessary to make them come off,” Colaneri said. “We’re taking it all musically very seriously, and putting a spin on it.”

Still, it’s clear that Zambello wants this work, part of her last season as the head of the Glimmerglass Festival (she remains the artistic director of the Washington National Opera), to be unabashedly festive. “It’s Italy, Sicily, food — things that people love.”

When asked if she was willing to embrace Ludwig’s love of farcical shenanigans and have someone hurl a plate of spaghetti for a laugh, Zambello smiled. “I’m resisting that,” she said. “But I think it’s going to work its way in.”