By Marc Snetiker
Updated January 02, 2015 at 07:00 PM EST

ABC is galloping into the unknown with its half-hour medieval musical comedy Galavant, premiering January 4 at 8 p.m. for four consecutive double-episode weeks. Starring Joshua Sasse as the tuneful hero (with guest appearances by the likes of Ricky Gervais as a potion peddler and John Stamos as a medieval John Stamos), the show features adventure, chivalry, and magic—not to mention musical numbers by Disney legend Alan Menken (The Little Mermaid, Aladdin, everything else from your childhood). We took a look at how Galavant‘s Broadway-style songs get the royal treatment, from start to finish.


Led by creator Dan Fogelman (The Neighbors), the Galavant writing staff maps out the beats of where three or four songs will fit into each installment in the eight-episode season before composer Menken and lyricist Glenn Slater—who collaborated with Fogelman on 2010’s Tangled—offer their input. “The songs have to move the story forward, they have to be entertaining, and they have to have a tinge of humor,” explains Menken. “It’s a full 22-minute musical each week.” Menken writes a first draft with Slater and records a demo with just his voice over the piano. Next, they’ll tango with Fogelman to refine the lyrics, tone, plot, and punchlines of each song.


Next, the roughly completed song goes to Menken’s right-hand man, musical director Michael Kosarin, who meets with the cast to work out appropriate keys and harmonies for the initial recordings. (At this point, the singers have already received Menken’s demo and sheet music to study.) The singers record over Menken’s piano track, replacing his vocals. At the same time, Fogelman and director-EP Chris Koch storyboard the songs’ visuals and gags with the production schedule and budget in mind, often discovering whether they’ll need to trim a song to save time or money. “We’ll find we have too many castles or action sequences, so we’ll cut 20 seconds of a song which would otherwise take us four hours to shoot,” says Fogelman. “Sometimes our eyes are bigger than our stomachs.”


In a warehouse—with tape on the floor to outline the dimensions of the set—choreographer Ashley Wallen teaches the musical staging to the cast and dancers. For the first time, the actors rehearse to their own vocal tracks, compiled from their best takes in the studio. Since on-location shoots can throw natural curveballs (see: British weather), the rehearsal time is key to honoring the rigorous production schedule. “There’s no time to mess around,” insists Fogelman. “We shoot a page and a half in a day, which doesn’t fit the half-hour comedy schedule, and that alone is what makes the show so challenging.”


Each musical number requires an entire day of shooting to produce just a few minutes of footage. Fogelman strongly opposes lip-synching on set, so the actors sing live with the music playing in a small earpiece. “It becomes harder when you’re riding a horse and sword-fighting and singing at the same time,” laughs star Sasse, who plays the titular feudal Fosse. “At the end of a 16-hour day, it takes an immense amount of concentration.”


In the editing bay, the music and show editors work closely to meld song and scene. “It’s a tango—give me three frames here, time-stretch this—all about that crazy manipulation that happens,” explains music SVP Dawn Soler. “Once we get it beautiful, we take it into a recording studio and rerecord with a 40-piece orchestra.” ABC records eight shows (like Nashville and Once Upon a Time) with a full orchestra, but Galavant did it all in two giant sessions. For the vocals, the editors use a blend of the pre-recorded tracks and the live performances from the set.


When each number goes to the studio and network, the suits can tweak lyrics, or even cut a song altogether. But Fogelman says pushback has been minimal, mostly because Galavant is too unusual to be held up to any yardstick. “If Alan Menken has written a Queen-esque rock-opera ballad with Ricky Gervais singing it as a medieval wizard, what note are you going to give there?”

For more on this winter’s most promising TV programming, pick up this week’s issue of EW.