Buffy the Vampire Slayer's iconic Season 6 episode "Once More, with Feeling" has become the gold standard when it comes to musical episodes of TV. It should come as no surprise then that the creative minds behind The Flash looked to Joss Whedon's iconic and ambitious song-and-dance-filled hour for guidance when crafting Tuesday's highly anticipated musical episode.

"I don't mean this pejoratively, but it's a gimmick episode, and the person who did those episodes best was [Buffy the Vampire Slayer creator] Joss Whedon," executive producer Andrew Kreisberg told fans gathered at the Dolby Theater in Los Angeles Saturday for a panel celebrating The CW's four superhero series as part of PaleyFest, an annual television festival featuring television's hottest shows.

The Flash: Has Barry finally learned his lessons?

"You think of 'Hush' or 'The Body' or 'Once More, With Feeling,' and what's so great about those episodes is, they didn't stop the ongoing narrative of the season to step outside to do something fun. Those episodes really spoke to what the characters were going through," said Kreisberg.

In Tuesday's episode of The Flash, a crossover with Supergirl that is aptly titled "Duet," Kara (Melissa Benoist) and Barry (Grant Gustin) both find themselves on the outs with their respective significant others, Chris Wood's Mon-El and Candice Patton's Iris. When they then both fall victim to the whims of a charismatic stranger known as the Music Meister (guest star Darren Criss, who appeared opposite both Benoist and Gustin on Fox's Glee), they're thrust into a dangerous dreamworld where they're lounge singers for a menacing man played by Arrow's John Barrowman.

Melissa Benoist and Grant Gustin, The Flash Photo: Jack Rowand/The CW



The hour draws influence from popular musicals like West Side Story and even The Wizard of Oz as Kara and Barry's friends and family — including Joe, Winn and Professor Stein (Broadway veterans Jesse L. Martin, Jeremy Jordan and Victor Garber) — all pop up throughout the episode playing different characters.

But in order for all of this ambitious storytelling to work, the writers of Supergirl and The Flash had to work diligently this season to make sure their lead characters were in the same place at the same time.

Every CW show, ranked

"We kind of set it up so that both Barry and Kara would be at romantic crossroads," explained Kreisberg, who developed the story for the episode with super-producer and series co-creator Greg Berlanti. "When they go into the musical episode they're both in the same place and they can go on this journey together to either get back the love that they think they've lost or not."

Whether or not Kara will forgive Mon-El for lying to her about his true identity, something that finally comes to light in Monday's new episode after being hinted at earlier this season, or if Iris can get past Barry proposing for all the wrong reasons remains to be seen. But no matter the outcome of the musical episode, one thing is certain: fans will definitely be left wanting more from these insanely talented casts once the curtain falls.

Maybe the producers can work something out for next season's still-in-the-works four-show crossover? We can always dream.

The Flash airs Tuesdays at 8/7c on The CW.

(Full disclosure: TVGuide.com is owned by CBS, one of The CW's parent companies.)