PARIS — “Youth,” the first feature film by Paolo Sorrentino since his Academy Award-winning ode to Rome, “The Great Beauty,” stars Michael Caine as Fred Ballinger, an aging composer passing time at an Alpine resort and reflecting on his life. Much of the drama hinges on whether he will conduct a concert of a work that made him famous, his “Simple Song #3,” inextricably linked in his mind to an irrecoverable past.
To score the film — and to write “Simple Song #3” — Mr. Sorrentino turned to David Lang, the celebrated new-music composer, based in New York, whose work has been described as post-Minimalist.
The director had first come across Mr. Lang’s compositions when he was looking for Minimalist sacred music for “The Great Beauty” and used one of his choral works for that film’s breathtaking opening scene, in which a women’s chorus sings inside the arched backdrop to one of Rome’s historic fountains.
When Mr. Sorrentino started on “Youth,” which opens in the United States on Friday, he immediately thought of Mr. Lang. “He’s able to create music that’s very complex, but also music that’s very accessible while remaining refined and intelligent,” Mr. Sorrentino said by phone. “He seemed the best contemporary composer to do the soundtrack.”
Usually, scores are written after the filming, when the editing is underway. For “Youth,” Mr. Lang, 58, had to finish before the filming began, since the refrains of melody are an important plot point. Fragments of “Simple Song” are played by different figures: a young boy practicing his violin, and the virtuoso violinist Viktoria Mullova and the soprano Sumi Jo, who perform the work with the BBC Concert Orchestra on screen and on the soundtrack.
“I had to try to figure out how to make it that the ‘Simple Song’ could carry all the emotional story for the Michael Caine character,” said Mr. Lang, interviewed by Skype from his home in New York. “Like in an opera, you plant motives throughout the movie so that when the song comes, it feels completely new, but something you’ve heard before.”
The song begins with a straightforward four-note refrain and builds to a sweeping climax. Mr. Lang had to compose “something that was probably more emotionally direct than I am used to in my music,” he said. In other words, a bit gushier.
For several months, he and Mr. Sorrentino were in long-distance communication. “I kept sending demos of the song to Paolo, things that I thought were emotionally devastating,” Mr. Lang said. “He would write back and he’d say, ‘I’m sorry, I am crying a little, but I need to cry a lot.’”
The breakthrough eventually came. “There’s this gigantic crescendo to a big explosion toward the end of ‘Simple Song,’ where the whole orchestra comes in and it’s really loud,” Mr. Lang said. “In my first version, the whole orchestra comes in, but it wasn’t really loud, because I just thought, I don’t want to be so demonstrative.”
“When I sent him the last demo,” Mr. Lang said, “all he said was, ‘David, now I am crying.’ And then I knew I had it.” He said he was grateful to Mr. Sorrentino for pushing him into new territory.
The director explained: “I’m not a musician. I’m not able to speak their language, but I must have told him that it had to be simple and moving and also very powerful, and spectacular in the high sense of the term.”
“Youth” also features another piece by Mr. Lang, “Just (After Song of Songs),” a haunting refrain performed by the Trio Mediaeval, a Norwegian choral group.
Mr. Lang has contributed to three other film scores, including an arrangement for the Kronos Quartet in Darren Aronofsky’s 2000 “Requiem for a Dream.” For “Youth,” he said he was inspired by Nino Rota’s scores for Fellini’s films, in particular “Amarcord.”
“So much about ‘Amarcord’ is about music and nostalgia, and using music as a way to mark the distance between where you’ve been and where you are,” he said.
While Mr. Lang’s composition becomes part of Ballinger’s emotional universe, the soundtrack also includes pop, like songs by Paloma Faith, who appears in the film as herself. “Youth” also stars Harvey Keitel as Mick Boyle, a filmmaker and Ballinger’s oldest friend. Rachel Weisz plays Ballinger’s daughter and assistant, Lena, and Paul Dano is Jimmy Tree, a soulful actor trying to move beyond being typecast in action movie roles. Jane Fonda appears in a memorable cameo.
Music has always been crucial to Mr. Sorrentino’s films. “Il Divo” (2008), his study of political power in Italy, was set to a rock soundtrack, and his first English-language film, “This Must Be the Place” (2012), took its title from a Talking Heads song and stars Sean Penn as a retired heavy-metal rocker in search of a former Nazi camp guard. In creating the Ballinger character, Mr. Sorrentino said he read about the life of Igor Stravinsky. “I’m fascinated by things I don’t understand,” he said. “I like music, but I’m not able to understand the work of a composer.”
Mr. Lang never met Mr. Caine during the filming but advised Mr. Sorrentino on how a composer and conductor might behave. In one scene, Ballinger stands in a field of cows and conducts “The Wood Symphony,” a whimsical piece with cowbells composed by Mr. Lang.
A conductor “has the power to make people stop playing,” Mr. Lang said, “and it would show much more of the conductor’s power to show him telling the cows to be quiet.”
Correction: December 1, 2015
An earlier version of this article referred incorrectly to Mr. Lang’s “Just (After Song of Songs).” While used in the film, it was written and recorded before it; the piece was not composed for the film.