Music is at the heart of director Sergio Navarretta’s “The Cuban,” set for a limited theatrical release July 31. In the movie, pre-med student Mina, played by Ana Golja (“Degrassi”), is tasked with caring for Luis, portrayed by Louis Gossett Jr., who is struggling with Alzheimer’s and  has retreated into himself. As she feeds him, she tells him of her dreams of being a musician and hums tunes from her childhood in Afghanistan. Luis sparks to the songs, and begins to come out of his shell. 

Navarretta points to “The Mambo Kings” as an inspiration for his film, saying he was so moved by the music in that 1992 movie, about a pair of brothers who flee Havana for New York in the ’50s, that he wanted to make a picture with music as its focal point. His choice to create that sound was Grammy Award-nominated Cuban jazz artist Hilario Durán.

The 67-year-old Durán, who emigrated to Canada in 1998, grew up in Havana and began his musical career at an early age as part of a musical family. In the ’70, Chucho Valdés tapped him to be his successor in the Orquesta Cubana de Música Moderna. Later, he was the pianist and keyboard player for Arturo Sandoval’s band, as well as the arranger and musical director. Durán says he immediately connected with writer-producer Alessandra Piccione’s script, and drew on his familiarity with the ’50s Cuban jazz scene to help tell Luis’ tale. “I could create a groove that was specific to Luis,” he says. “I could bring the passion that’s found in the music.”

Durán served as both composer and songwriter, working alongside Navarretta to give the film its heartbeat. Over time as Luis reminisces, he reveals to Mina that he was once a famed Cuban musician and bandleader. Durán delivered the score as well as five new songs and arrangements for a number of iconic standards that together form a virtual history of Luis’ life. (The soundtrack is available from Alma Records.)

The composer says that his biggest challenge was in finding the story’s incidental music for sequences like the one in which Mina’s approach to caring for Luis is countermanded by authorities at the nursing home. “The scenes with tension were the hardest,” he says, adding that Navarretta’s meticulous notes concerning mood were essential.  

Durán worked with Toronto-based musicians, including trumpet player Alexis Baró and singer Alberto Alberto, as well as Golja, who was also a producer on the film. “We recorded [the songs] ‘En un Beso’ and ‘El Milagro’ together,” Durán says. “The process felt less like I was recording a soundtrack and more like I was recording an album.”

Music supervisors Michael Perlmutter and Dondrea Erauw helped Durán lay down the entire soundtrack prior to production, which meant that the music drove the filmmaking process. During the shoot — in Ontario and Havana — and in post-production, it sparked the entire crew. 

“Everyone could experience the power of Hilario’s music,” Navarretta says. Audiences get to experience the full measure of Durán’s work, since he appears onstage in the jazz club scenes near the end of the film.

Editor Jane MacRae, who collaborated with Navarretta on his 2015 comedy “The Colossal Failure of the Modern Relationship,” helped find the balance between score and song, teasing out Luis’ history as the film progresses. 

“In the beginning, the music is subtle,” Navarretta says. “We start with traditional Afghan cues, and that brings us into Mina’s world. But the music starts to get bigger through instrumentation and volume. By the time we reach the climax, I want people jumping out of their seats.” 

It’s a sentiment Durán echoes: “Music has the power to trigger memory and awaken long-forgotten emotions,” says the composer. “I want people to feel the film’s music in their bones.”