Unlike a lot of kids, Lin-Manuel Miranda says he never dreamed of becoming president. “I was never that kid. I fell in love with musical storytelling because of ‘The Little Mermaid’” — he has the VHS on hand — “and wanted to know how those songs got written.”

The “Hamilton” creator got his taste of Disney musical storytelling when he crafted songs for “Moana,” but with the Mouse House’s 60th animated feature, “Encanto,” he came into the process early in helping blend the story of the Madrigal family, magical realism and Colombian culture through the eight songs that he wrote for the film.

What’s the recipe for writing songs that serve and advance the story and crafting that into the storytelling?

On “Encanto,” we talked about what music should do and what music shouldn’t do. It was really exciting when you have a song like “We Don’t Talk About Bruno,” and we get to know different characters musically.

How did you crack the earworm, “We Don’t Talk About Bruno,” which is such a turning point for the family?

I pitched that because we are putting our arms around this whole family and we’re trying to bring them all to the screen. I thought we needed to have a gossip number because there are things you talk about at dinner, in the kitchen after people have left, and there are things you don’t talk about in front of Abuela because she doesn’t know these two people are dating. I pitched that tune, and it allowed me to create musical themes for characters who do not necessarily get their solo.

The first verse is with Tia Pepa and Felix, and it’s about who was telling the story — that’s my parents, that is my dad, Luis Miranda, on screen.

What was the hardest song to write?

The “I want” song is always hard. You have to make the whole movie to understand the journey that Mirabel’s got to go on and what the question is going to be, so you have to go at it backwards.

Disney has such an insane legacy of good songs that you have to put that out of your head. What finally unlocked “Waiting on a Miracle” was going back to listening to the music we recorded when we were on that research trip. There were so many Colombian waltzes that were in three-quarter time. In my head, I had to write a big Disney pop anthem. But once I committed to the three-quarter time, the song wrote itself.

Talk about that and writing “Dos Oruguitas” in Spanish. What were the pressures of this, your first Spanish song?

Inspired by the butterfly metaphor, I wrote the song about these two caterpillars who are in love and don’t want to let each other go, but of course, they have to let each other go, because how on earth will the miracle come if they don’t make room and make space for that? That to me felt like a delicious metaphor for what the entire family is going through. I was very far outside my comfort zone, and I had my thesaurus with me at all times. Even after I’d written my first draft, I asked myself if the Spanish that I’m using would translate and be at home in Colombia and Puerto Rico.

And how did you break into Luisa’s song? What was the story behind that?

I’m the baby of the family. I have a sister who’s six years older, and she got a raw deal. That song is my love letter and apology to my sister for having it easier. I watched my sister deal with the pressure of being the oldest and carrying burdens I never had to carry. I remember my parents woke my sister up to put together a He-Man playset for Christmas before I woke up. They wanted it to be fully assembled when I woke up on Christmas morning. I put all of that angst and all of those moments into Luisa.