New songs, covers of old songs, chart-topping singers, Broadway tunesmiths: musically speaking, this year’s crop of animated movies has a little of everything. Both “Trolls” and “Sing” feature lavishly produced covers of classic songs. “Sing” features no fewer than 65 tunes, of which just 20 are the original master recordings; the other 45 not only needed to be cleared but arranged, performed, and animated.

It was a two-year process, says executive music producer Harvey Mason Jr., a Grammy-winning songwriter and producer whose resume includes everyone from Justin Bieber to Beyonce. “It was the craziest job ever,” he says. “We did some of the songs eight or nine different times in different ways.”

Because “Sing” is about a vocal competition, the settings ranged from auditions to a singing, dancing finale. Characters include a punk-rock porcupine (Scarlett Johansson), a Sinatra-esque mouse (Seth MacFarlane), a soulful gorilla (Taron Egerton), a shy elephant (Tori Kelly), and a pop-singing pig (Reese Witherspoon).

“My job as music producer was to figure out how to make each one of these songs special,” says Mason. “Should I do a replication of the song? Should I flip the version on its head? What story beats do we need to hit? What do we want the audience to feel at this point in the movie?”

Each song was meticulously conceived. The old Stevie Wonder classic “Don’t You Worry ‘Bout a Thing,” for example, sung by Kelly, “went through probably 30 revisions,” Mason reports.

The Elton John song “I’m Still Standing” was “down to the 11th hour,” Universal film-music president Mike Knobloch adds, “with different drummers, different grooves,” searching for just the right sound.

Universal won’t say what all this cost, although some estimates put the music budget in the $10 million range. Just licensing the Beatles’ “Golden Slumbers/Carry That Weight” would have been expensive but, as Knobloch points out, Jennifer Hudson’s rendition of that song “becomes the soul of the movie.”

Capping the film is a new song, “Faith,” sung by Stevie Wonder and Ariana Grande. Producer and co-writer Ryan Tedder says he conceived the song as a duet between the gorilla and elephant characters without being too obvious. “If you’re too on the nose with lyrics, it can be cheesy and disingenuous,” he says.

In the case of DreamWorks’ “Trolls,” new songs are sprinkled into the mix of covers including Paul Simon’s “The Sound of Silence,” Lionel Richie’s “Hello,” and the Cyndi Lauper standard “True Colors.”

Justin Timberlake, who co-wrote the new songs, also served as the film’s executive music producer (and voiced one of the main characters). “It was something for the parents, to have these classic songs in there too,” he tells Variety. “The mission with all the covers was just to make sure they sounded good, and close enough to what we were doing and vice versa, so the movie felt like it had its own musical DNA.”

Timberlake’s pop anthem “Can’t Stop the Feeling!,” written for “Trolls,” was released a full six months before the film. The early release paid off, as it not only promoted the film but has become the best-selling song of the year. It’s Timberlake’s fifth No. 1 single, and its accompanying video has been watched more than 300 million times on YouTube.

Watching the movie reminded him of the disco era. “I felt like I was tripping out watching an Abba video,” he quips. So he decided to convey “the idea of happiness, how we are all searching for it, it’s within all of us and we can access it whenever we want. It’s a great message for parents to share with their kids.”

Along with co-writers and producers Max Martin and mononym Shellback, “we thought, this has to be uptempo, upbeat, and uplifting,” Timberlake says. “I felt like we could make a modern disco record,” also referencing “Saturday Night Fever” — not only for its disco sounds but also for its then-innovative pattern of releasing the songs in advance of the movie they were written for.

For “Moana,” Disney turned to Broadway sensation Lin-Manuel Miranda even before “Hamilton” hit the boards, on the basis of his success with “In the Heights.” “There was something about it that embraced the culture of the place, and the wordplay of his songwriting,” Disney music executive VP Tom MacDougall says. “We pitched the story to Lin and he was immediately on board.”

They added Samoan-born Opetaia Foa’i for regional-music authenticity and veteran composer-songwriter Mark Mancina (who had done Disney’s “Tarzan” and “Brother Bear”) to co-write, arrange and produce the score.

Despite his massive, Tony-winning success with “Hamilton,” Miranda valued the experience on “Moana.” “I am here because a crab started singing calypso music in 1990 [a reference to “Under the Sea” from Disney’s “The Little Mermaid”] and I was never the same,” he says. “I spent the whole past two years both pinching myself and also being hyper-aware that these songs are going to be — hopefully, if we do our jobs — ones that a kid sees and freaks out about. When a kid loves your song, that’s it for life.”

The charming original songs in “The Little Prince” are the product of Hans Zimmer and French singer-songwriter Camille. Reached in Paris, Camille says: “Hans asked me to be the little girl’s voice. She doesn’t really express her feelings, so the songs are there to express her secret thoughts.

“There’s one jolly song when she meets the old man and starts to be a child again. There’s a sad song when she goes back to school, and there’s a humorous song in the old man’s car that evokes Old Europe.” Camille penned both English and French lyrics for the tunes.

The most outrageous contender may be “The Great Beyond,” the opening song of the raunchy “Sausage Party,” in which singing food items pine to leave the grocery store for a supposedly beautiful afterlife. For Disney veterans Alan Menken and Glenn Slater, “it was an opportunity to break out of that mold a little bit, do something a little risque, a little bit over the edge,” says Slater.
Producers Seth Rogen and Evan Goldberg wanted “to open the film as if in a typical Disney movie, written by guys who have done your standard Disney movie — and then it goes so very wrong,” Slater says with a laugh.