Ryan Gosling is worried about Emma Stone’s Red Bull intake.

“I get one per day!” Stone protests.

“You’ve already had one,” Gosling counters. “Trust me, this affects all of us.”

If Stone requires an energy boost, it’s understandable. It’s Sept. 12, the morning after the Toronto Film Festival premiere of “La La Land,” the melancholy, candy-colored musical from “Whiplash” director Damien Chazelle, and the response has been rhapsodic. The film manages to pay homage to old MGM musicals yet also feel immediately modern, opening with an elaborately staged number set on an L.A. freeway. In a few days, the movie will go on to land the prestigious audience award from the fest, a strong precursor to Oscar glory. The accolade is not a surprise; every pundit and critic has been swooning since the film’s worldwide bow in Venice a week earlier — with Stone present at the back-to-back festivals to help promote the picture.

Jake Chessum for Variety

While those involved with “La La Land” suspected they had something special on their hands, there was no way to be sure. Movie musicals have an unpredictable history at the box office; for every “Chicago,” which won the best picture Oscar and took in $170 million domestically, there’s a “Nine,” which made less than $20 million in the U.S. At the same time “Into the Woods” was crossing the $128 million mark in 2015, “The Last 5 Years” was topping out at less than $150,000 for its theatrical run. Even a Broadway hit doesn’t guarantee a film will succeed, as evidenced by such duds as “Rock of Ages” and “Jersey Boys.”

And unlike those pictures, or, say, “Moulin Rouge!” which consisted of songs that audiences were already familiar with, “La La Land” is a completely original musical, with the numbers written primarily by Chazelle’s friend Justin Hurwitz.

“I didn’t have Jay Z and Lady Gaga writing the songs, which could help soften the blow,” says Chazelle. “I had my college roommate, who had done two film scores with me before writing all the music.”

Hurwitz had previously composed the scores for “Whiplash” and Chazelle’s little-seen feature debut, “Guy and Madeline on a Park Bench,” a black-and-white musical that served as his Harvard senior thesis film.

Though “La La Land” certainly has achieved a good amount of critical acclaim on the festival circuit, the jury is still out on whether Lionsgate’s forthcoming Dec. 9 release will be able to attract the kind of crowds it hopes to.

By all accounts, “La La Land” almost didn’t come to fruition. From enduring the film being put in turnaround, to actors rotating in and out, to an editing process where he literally made himself sick from stress, Chazelle worked tirelessly with his team to craft his passion project. He credits a great deal of the success to his lead actors, whose involvement brought about several changes to the script, and whose collaborative nature and pre-existing friendship helped keep the filmmaker on track.

Today, Gosling and Stone are ensconced in a Toronto hotel to talk about their latest theatrical endeavor. Just two days prior, Stone was named best actress at the Venice Film Festival for her performance as Mia, a struggling actress who falls for jazz pianist Sebastian (Gosling) in the City of Dreams. And while she loved unveiling the film in Venice, this was the first time her friend and co-star was by her side; Gosling has been busy shooting “Blade Runner 2049” in Budapest.

“It was weird being in Venice without him,” Stone says. “So last night felt like the real premiere.”

In person, the two share an easy banter, prone to teasing each other, as when Stone groans after Gosling indulges in a bad pun. (“I like a pun. It’s pun sometimes.”) And yes, it’s true, they often finish each other’s sentences. They have a lot in common; both began their careers at a young age — Gosling on “The All New Mickey Mouse Club” and Stone as a teenager in TV and films like “Superbad.” Both have balanced box office hits with smaller, acclaimed indies: Gosling was an Oscar nominee for “Half Nelson,” while Stone landed her first nod for “Birdman.” And both have managed to navigate the tricky waters of fame with a surprising degree of privacy.

Jake Chessum for Variety

“La La Land” marks their third collaboration, after playing lovers in 2011’s “Crazy, Stupid, Love” and 2013’s “Gangster Squad.” Chazelle says the two established a strong tone for the entire set.

“They tease each other, they tease themselves, but they’re also the hardest workers, and they push each other,” he says. “You could always sense each was rooting for the other. They’d run lines off camera and really go at it and try new things to inspire the person on camera. They’re a true duo.”

But neither wants to overthink their chemistry. “I’d love to say we knew right away when we met: ‘This is a three-picture deal!’” Stone jokes. “But that’s not how it happened.”

In fact, Stone isn’t even sure Gosling knew who she was when she auditioned for “Crazy, Stupid, Love.” He was already cast as a slick womanizer, and she was brought in to improvise scenes with him. “That created this different dynamic when you’re just reading dialogue — a different connection,” recalls Gosling. “And now we have the luxury of hitting the ground running, which, for something like this, is a huge benefit. You can spend a lot of time being polite and respectful of what you perceive the other person’s process to be.”

“Right,” agrees Stone. “And he’s not polite at all.”

The pair both signed on to “La La Land” at about the same time, after Chazelle had spent years developing the project with producers Fred Berger and Jordan Horowitz. He wrote the script in 2010, before “Whiplash,” and it was optioned in 2011 by Focus Features, then put in turnaround.

Chazelle went on to make “Whiplash,” but even with the success of that film, people were wary of a modern-day musical with original songs.

High Notes: Ryan Gosling plays a struggling jazz pianist in Damien Chazell’s original musical. Courtesy of Summit Entertainment

“People would ask what my next thing was, and I’d say a musical,” Chazelle recalls. “They would say, ‘Huh. Interesting.’ There was this reaction of: ‘Well, that’s a career that will end.’”

Over the years, Chazelle continued to hone the script and woo actors. At one time, “Whiplash” star Miles Teller and Emma Watson were set to play the leads; Chazelle also spoke to Michael B. Jordan for the role of Sebastian. Teller has publicly stated he was replaced, and he denied rumors that it was because he was holding out for more money. Chazelle, too, dismisses the money rumors. “I’m not privy to everything, but from my end, it really was that schedules didn’t line up,” he says.

Ultimately, Chazelle found the perfect combination with the two actors he said he had in mind while writing the script all those years ago. “I’m so grateful it worked out with Ryan and Emma,” Chazelle says. “I thought I would be 80 years old, still talking about the day I would get to make my musical.”

It was the folks at Lionsgate that eventually stepped up to finance the movie, which cost an estimated $30 million, after seeing “Whiplash” at the 2014 Sundance Film Festival but before that film started piling up accolades. “That was the one place willing to take a gamble for the budget we needed,” says Chazelle. “Every big studio in town passed on it.”

Another person who didn’t pass was producer Marc Platt, who had shepherded such musicals as “Into the Woods” and “Nine” to the big screen and won an Emmy for producing “Grease Live!” on Fox. Platt signed on to produce the film with Berger and Horowitz.

“I instantly recognized the creative ambition of this particular piece. The desire to be retro but contemporary; to be an homage yet have original music in it; the desire to be non-cynical and non-ironic,” says Platt. “But from the first time we sat down, Damien was able to vividly and specifically pitch to me the movie in his head. It came alive to me, and the combination of his humility and confidence in his point of view told me this could be a very special journey and a special film.”

Jake Chessum for Variety

Apparently Chazelle’s vision was the key factor in winning over Lionsgate as well. Tim Palen, the studio’s worldwide marketing president, recalls how Chazelle also acted out the movie in Lionsgate’s conference room.

“After the presentation, [CEO] Jon Feltheimer said to us, ‘This is exactly the kind of movie we should be making,’” Palen says.

With financing in place, Chazelle and his actors launched into a three-month rehearsal process to develop Mia and Sebastian into living, breathing beings. One of the first adjustments Chazelle made was to age the characters.

“It was written for much younger people,” notes Gosling. “It was more about people just moving to L.A. with their dreams. There was a nice naiveté to the original, but it wasn’t going to work with us.”

Sebastian went from an optimistic pianist looking to break in, to a jaded musician trying not to grow bitter. Mia went from fresh off the bus to an actress struggling for six years. And bigger backstories were built; they developed Sebastian’s up-and-down career and fleshed out a history between Mia and her aunt, also an actress.

“As we shaped them, the pasts started taking on bigger roles,” says Chazelle. “They’re each incredibly smart with a deep understanding of character, and they pushed me to go deeper and flesh things out.”

Gosling was impressed by Chazelle’s openness. “He was willing to change things on the fly in order to accommodate what was happening in front of him,” he says. “It takes a lot of filmmakers a lot of films to get to that place. It took him two.”

Echoes Stone, “To have planned this for so long, then hire two people who changed it so dramatically shows how open he was.”

Hearing this, Chazelle chuckles. “That’s nice of her to say, but the truth is, I was open to good changes. I would have been foolish to not take advantage of their input.”

Stone and Gosling also added personal touches; many of the painful auditions seen in the film come from the actors’ real lives. Stone can recall one casting director yelling at her, but even worse were the ones who said nothing. “People would look up at me and look back at their paper and not look at me again,” she recalls. “I remember feeling very insignificant. I would almost rather you yell at me.”

Gosling’s worst audition story is actually in the movie; after telling Chazelle about performing an emotional scene that caused him to work up tears — only for the casting director to take a phone call — the director put it in the script.

Work Song: Damien Chazelle and Emma Stone confer on the set of “La La Land.”

Courtesy of Summit Entertainment

“It’s wonderfully realized by Emma,” praises Gosling. “It was actually wonderfully cathartic to see up there.”

While many actors might have been intimidated by the singing and dancing, Gosling and Stone came well-equipped. Stone did a grueling run as Sally Bowles on Broadway two years ago, while Gosling sings and plays in the band Dead Man’s Bones. Gosling also had the experience of having sung and danced alongside Justin Timberlake and Britney Spears on “Mickey Mouse,” not to mention those viral videos of him that have circulated on YouTube from the early ’90s that show a preteen Gosling performing at talent shows.

In the end, the biggest challenge for the trio was finding the right tone in a genre that hasn’t been seen on film in some time. Chazelle was inspired not only by his love for American classics like “Singin’ in the Rain” but by the French New Wave films of Jacques Demy, particularly “The Umbrellas of Cherbourg.” Like that movie, Chazelle wanted to paint a beautiful canvas with elements of magical realism, yet find a way to keep every moment grounded.

As it turned out, the answer was in the characters. “You have to rely on these two people we’ve grown to love,” says Chazelle. “Once you lose that connection, the whole thing becomes meaningless.”

Gosling agrees. “The film straddles two lines — sort of a kitchen-sink drama and a romanticized musical,” he says. “I felt like if we could get the relationships and the characters right, we would be OK, because the music was always there and always beautiful.”

But even after filming wrapped in October 2015, there were challenges, Chazelle admits. He spent a lengthy time with editor Tom Cross, who won an Oscar for “Whiplash,” agonizing over cuts. “We were beating our heads against the wall trying to figure out the tone and if it was working,” concedes Chazelle. “We’d screen it and I’d say it’s the greatest thing ever. The next week I’d say, ‘Tom, this is an utter debacle. This is embarrassing.’ He’d always have to talk me off the ledge.”

The major change was the first 15 minutes; originally, the film opened with an old-fashioned overture featuring ornate titles and a three-minute piece of music. At the first test screening in February, the movie didn’t feature the iconic opening freeway number called “Traffic.” Despite that being the most intricate scene in the movie, with the production shutting down a freeway ramp for an entire weekend so performers could sing and dance in 100-degree heat, Chazelle left it out. Instead, the movie went from the overture to the number “Someone in the Crowd,” featuring Mia and her roommates. And though the first screening had what the director calls an “above average” approval rating, he was distraught. “I’m a neurotic person, so even the most effusive screening I felt was a train wreck,” he admits.

The second test screening included “Traffic” after the overture, opening with Sebastian and Mia briefly interacting on the freeway. It still wasn’t landing quite right. “We had too many overtures between the opening, ‘Traffic,’ and ‘Someone in the Crowd,’ ” Chazelle recalls.

Ultimately, they tossed out the overture and went straight to “Traffic,” but recut the scene so that Sebastian and Mia don’t see each other until the end of the number. Then they pared down “Someone in the Crowd” so as not to weigh down the start of the picture with too much music.

Though there were only two official test screenings, Chazelle says he was having private screenings every week for small groups of friends and peers. He estimates he showed 30 different cuts. “There is no musical number in the movie that wasn’t cut at some point,” he reveals. “Ultimately every number has earned its right to be there because each one was excised at some point.”

Jake Chessum for Variety

Near the end of editing, he and Cross were working seven day weeks, often into the late hours of the morning.

“Tom, the assistant editor, and I would be in and out of doctor’s offices because one person gets sick and you’re living with each other in tight quarters with no ventilation and trading this one virus for weeks,” he says. Asked if it was the work that made him sick, he responds, “It was the stress, the hours. Plus no sunlight, no sleep — all those things that doctors recommend.”

The risks and the ills seem to have paid off, with “La La Land” one of the most highly anticipated films of the season, though the real test will be seeing how it fares when it opens — just days away from blockbusters-to-be like “Rogue One: A Star Wars Story.”

Lionsgate says it plans to stay true to what the film is when it comes to marketing. “That the movie is so singularly original — the score, the songs, the storytelling — this is such a gift to the marketing team,” says Palen. Asked how to sell a modern-day musical to people who might not think they like the genre, Palen says: “Candidly, the movie is doing all the heavy lifting for us, and we are screening it as much as we can in advance of opening. It charms and moves people in ways that can’t be denied. And that will help us take ‘La La Land’ to a wider audience than might be traditionally expected.”

No matter the outcome, Stone says, what really matters is the experience they all took on together.

“To dive into something so challenging for months has been amazing,” she says. “The prospect of failure is much less scary to me because the process was so much fun.”

And while Chazelle says he couldn’t have predicted the response the film would receive thus far, Platt says there were signs early on that boosted their confidence.

“We had mockups of the songs months before the movie was shot,” he recalls. “I was in a parking lot and the love theme was blasting in my car. Two different people came up and knocked on my window and said, ‘What is that music? It’s beautiful!’”

Platt adds that “La La Land” is built on emotions, and happens to be coming at a time when audiences are ready for the format. “I think people are prepared for a film like this,” he notes. “From the inception of music videos to a show like ‘Glee,’ it’s no longer an alien idea to burst into song. That bodes well for the future.”

Asked why they think the film has elicited such a passionate response from audiences, the actors again demonstrate their teamwork; Gosling urges Stone to answer, saying she has a good response.

“I feel these have been a really rough times,” Stone remarks. “To have something so transporting that brings you joy and nostalgia and hope and heartbreak for two hours is something that’s really special and needed right now. They also created a world that’s so beautiful and would be vibrant and exciting at any time, but right now it’s nice to be part of something that has this kind of joy in it.”

As she finishes her thought, Gosling leans over. Barely audible, he whispers in her ear: “Nailed it.”