Lin-Manuel Miranda, wearing his heart on his fall sweater sleeve, pauses to admit a musical fear. He had penned seven songs for his newest movie, Disney’s “Encanto,” but still needed to create that staple of so many musicals: the lead character introducing a driving desire through tune.

“The song I’m always going to write last is our hero’s ‘I Want’ song, just because it’s intimidating to write that for Disney,” Miranda says during a recent Zoom call, beaming in front of a blue screen. “You know it’s going out there on a playlist with ‘Out There’ from ‘Hunchback [of Notre Dame]’ and ‘Reflection’ from ‘Mulan.’ It’s just a scary place to be.”

Yet “Encanto” director Jared Bush knows that if there were an “I Want” song about Miranda himself, the lyrics would reveal a central truth: “He wants to be challenged.”

How Miranda unlocked this lyrical puzzle for Mirabel, the lead teenager in the Colombian-set “Encanto” (opening Wednesday), involves cross-cultural perception and shared sense of invention — qualities that have made Miranda a continual go-to talent for Disney.

“He is hyper-collaborative — that is one of his greatest skill sets,” says Bush, a veteran of such Disney hits as “Zootopia.” “For someone as accomplished and acclaimed as Lin-Manuel is, he is a sponge for new ideas.”

Those skills allow Miranda to take to Disney Animation characters and songcraft like, well, a Donald Duck to water. “Writing for animated films is like writing for the theater on steroids,” he says. “Your collaborators include hundreds of animators. That give-and-take between my music and their visuals is really thrilling.”

Miranda’s creativity also thrives on having multiple projects at once, including his new Netflix directorial debut, “Tick, Tick … Boom!” But he’s been an especially big presence on Disney-banner titles in recent years, including performing in “Mary Poppins Returns” and contributing music for the Star Wars universe. Disney produced the 2020 filmed version of his Broadway smash “Hamilton,” and Miranda is teaming with Disney legend Alan Menken for the music on the live-action “The Little Mermaid” due out in 2023.

But it was while working together on Disney’s 2016 animated hit “Moana” — which yielded Miranda’s Oscar-nominated “How Far I’ll Go” — that the composer vocalized an “I Want” wish to screenwriter Bush, who recalls: “He told me he wanted to write the definitive Latin American Disney musical.”

Soon the two were talking with Bush’s “Zootopia” collaborator and fellow brass musician Byron Howard, who would also become a writer-director on “Encanto” (as would Charise Castro Smith). They shared the experience of coming from large extended families. Out of that grew an “Encanto” story that spotlights a dozen main characters — “unheard of in Disney animation,” says Bush.

Miranda knew the deal with Disney: Putting forth such a sprawling familia put some of the characters in narrative peril. “The storytelling process isn’t kind to families,” Miranda says with a laugh. Exhibit A: The title heroine in “Moana” originally had eight brothers — but as her narrative necessitated streamlining, “those brothers went away.”

Early on during “Encanto,” the filmmakers internally screened some footage before it had music. The studio feedback came in: This could be tough to pull off. Were the filmmakers sure they didn’t want to trim the tale to, say, five main characters? Instead, “Lin said, ‘I think it’s 12, and here’s the opening song to prove how that’s possible,' ” Bush recalls.

Miranda notes that he wrote that opener, “The Family Madrigal,” even before “Encanto” had a second or third act. At the center of that song is Mirabel, a girl searching for her purpose in a home brimming with magical realism. Miranda, deeply steeped in the Disney songbook, looked to a musical of his youth: “I was really inspired by Belle from ‘Beauty and the Beast,’ with that opening number that just lays out the town.”

The upbeat number introduces each member of the Madrigals largely through Mirabel’s eyes, underscoring how family dynamics play out. “In so many ways, that’s really what the movie is about: Being able to see your family more fully and allowing your family to grow and change — not freezing them in the roles you think they ought to play.”

The composer also drew inspiration from Team “Encanto’s” research trip to Colombia several years earlier — an early step that Bush calls “rare” for a Disney songwriter.

One day, Miranda, his father and his fellow filmmakers gathered in the Andes and reveled in the rhythms of a mini-concert. Colombian performers serenaded them with regional songs. The visitors’ enchantment — their sense of encanto — was complete.

About two years later, Miranda was trying to write that crucial tune for Mirabel, who is voiced by Stephanie Beatriz. Her “want” is to have a power like everyone else in her gifted familia. But how to underscore that message through melody? The filmmakers reflected on how those musicians in the small mountain town of Barichara strummed guitars and the region’s 12-string tiple in a waltz time signature. What if Miranda wrote Mirabel’s big number, “Waiting on a Miracle,” in that same time — unlike his seven other “Encanto” songs?

“She’s in a different rhythmic universe than the rest of her family, and that was really from the Colombian music we were hearing,” Miranda says. “That let me go to a 3/4 space and then I wrote it very quickly — so honestly, the research specificity is what takes it to the next level.”

Other “Encanto” songs spotlight Mirabel’s siblings: “What Else Can I Do?” tells the story of sister Isabela (Diane Guerrero) and her power with blooming flora; “Surface Pressure” shows how for sister Luisa (Jessica Darrow), possessing immense strength can be a burden.

Miranda cannot help but infuse such numbers with personal connections. For the former, his wife reminded him that he had a resident expert in his life: a former neighbor who specializes in Latin American botany. For the latter, he acknowledges a sibling who is 6 years older: “She takes on way more responsibility than I do — I was very aware that I was the baby brother who got away with everything — so ‘Surface Pressure’ is very much a love letter to my sister.”

Miranda also picked up on the film’s motif of butterflies and transformation to create the folk-like “Dos Oruguitas” (sung by Sebastián Yatra) — the first tune he has ever written beginning to end in Spanish. “The goal was: Write a song that feels like it’s always existed,” says Miranda, noting: “It’s my wife’s favorite song I’ve ever written.”

Miranda says he reveled in his deep dive into Colombian music, which “for someone who has roots in Puerto Rico and Mexico,” he says, “is like going to your cousin’s house.”

Bush appreciates why Disney continues to bring Miranda aboard its projects. “He writes songs that you just want to keep listening to,” says the director, adding: “He can create an earworm that somehow isn’t annoying.” And the more you listen to lyrics, the more you appreciate their layered meanings.

How best to describe Miranda then? Bush considers it: “He’s a unicorn.”

Read more: