As a teenager in Argentina, Gustavo Santaolalla did what countless other teens have done since the 1950s; he read Jack Kerouac’s “On the Road.” Of course, he had no idea that one day he would score a film based on the iconic novel.

The two-time Oscar-winning composer is not the first musician one would think of for this assignment. He had never worked on a score with jazz, which courses through the bloodstream of Kerouac’s book with its references to the manic drive and mercurial lines of early bebop days.

“This particular generation was very influenced by music and I wanted to find a different approach,” Santaolalla says. “I didn’t want to make a bebop score — I thought there would be music from that era already in the score — but at the same time, I didn’t want to do something that wasn’t related to the period. I took my inspiration from other things.”

The “other things” turned out to be three avant-garde composers: street musician Moondog, hobo-instrument inventor Harry Partch, and the father of chance, John Cage. You can hear their influence in some of the cues, particularly the thunking of Cage’s prepared piano. “These guys really belonged to that generation, they experienced life on the road,” says Santaolalla.

Santaolalla also used jazz musicians including bassist Charlie Haden, pianist Mike Lang and drummers Brian Blade and Roy McCurdy on the soundtrack, which is bolstered by recordings from Billie Holiday, Dizzy Gillespie, Charlie Parker, Slim Gaillard, Ella Fitzgerald and, in an archival find from director Walter Salles, a tape of Kerouac himself murmuring a tune.

Did Santaolalla find Kerouac’s style has a rhythm that could be captured in sound? “I think his words and rhythms related a lot with percussion and dissonance and bursts of energy,” he says. “I wanted it to have a jazz attitude, almost like a mental jazzy thing and not translated into timbre. Also the thing of the unexpected, the sound of surprise. It came out different, but somehow expressing the feeling of that generation.”