J. Ralph confesses to having a major cultural flashback experience while working with the stellar musical lineup he assembled to record songs for a new documentary about autism, “Wretches and Jabberers: And Stories From the Road.”

They all signed on to be part of producer-director Gerardine Wurzberg’s film centering on a road trip undertaken by two autistic adult men.

“It was the craziest thing,” said Ralph, the New York singer and songwriter who composed scores for two previous Academy Award-winning documentaries, James Marsh’s “Man on Wire” in 2008 and Louis Psihoyos “The Cove” from last year. Ralph’s work on those projects prompted Wurzberg to seek him out to supply music for her exploration of the isolation and alienation that often accompanies autism.

“Nobody asked about money, nobody asked about contracts or managers,” he said this week from his studio in Manhattan. “It was like something out of the 1960s, like Max Yasgur’s farm — people just said, ‘When can I come over?’ ‘How many guitars can I bring?’ ‘Should I bring my friend? He plays drums.’ Bob Weir said, ‘You can stay at my house.’ There was not one roadblock through the whole thing.”

“’Wretches and Jabberers” currently is making its way through the indie film festival circuit. The soundtrack is scheduled for release on Jan. 11 — after the fourth quarter period in which all attention in the music business is focused on bestselling albums by superstar performers.

Part of the altruistic motivation for all concerned is that the album will first be available, a month ahead of its general release in February, in conjunction with a charity promotion benefiting the Autism Society of America and the Wretches & Jabberers Fund of the Institute on Communication and Inclusion at Syracuse University in New York.

Ralph wrote most of the songs himself, and collaborated with some of the participants on others.

“I had this idea to write some songs for the film and to get some iconic voices to sing them. Because these people [in the film] are at the threshold of finding their own voice, I wanted to kind of honor them, meditate on some of the film’s themes that I experienced watching it. Then I just put together this great group of people to help write and sing the songs. It happened very organically.”

Johansson, who applies her breathy jazz phrasing to Ralph’s bluesy “One Whole Hour,” said: “We’ve been friends for years and I’ve always been a fan of his sound and aesthetic. … What struck me very much about the film was not only the courage and perseverance of the film’s protagonists, but by the effect that Josh’s music had on the project as a conceptual whole.”

One of the ideas that resonated deepest with Johansson was a comment by one of the men who says, “I know what it’s like to wait for a voice inside.” The actress and singer said, “We built the song around that idea: what it must feel like to be a fully conscious and self-aware individual with no means of expressing oneself. A mind trapped inside a body.”

It’s a theme also particularly relevant to the guest with perhaps the most extraordinary back story on the album: British folk guitarist and songwriter Nic Jones. He was one of the leading lights of late-’60s and ’70s Celtic folk. His musical career ended in the early ’80s when he was involved in traffic accident that left him with catastrophic injuries.

Ralph had been a fan and passionately persuaded Jones, through his wife, to step into a recording studio for the first time in nearly 30 years to sing “Pretty Words Lie.”

“His wife said, ‘Kid, you’ve got a lot of hope and spirit, but if he doesn’t like something, he’ll tell you it sucks,’ ” Ralph said. “He doesn’t mince words.”

Ralph followed his instinct that Jones would rise to the occasion. “I hear the heart in his records, and that does not die,” Ralph said. “Maybe the singer changes, his voice changes, but the heart that connects does not die.”

He felt Jones’ situation mirrored in some way the film’s portrait of its autistic focal points, Larry Bissonnette and Tracy Thresher.

“I couldn’t help but notice the parallel,” Ralph said, “of him wanting to try and record and find his voice again — having been such a luminary of folk music, and then losing it — and these guys [in the film] never having it, but trying to find a voice.”

Paul Brady, a contemporary of Jones’ who also appears on the soundtrack, said, “I got an e-mail from Josh. I didn’t know that he knew my music, but he’s been into stuff I’ve done for years. Obviously for the film’s music he’s turned to artists whose work he likes and was inspired by. When someone comes to you like that, that’s the kind of thing I respond to. … I was intrigued by what would come out of it.”

The song Brady sings, “Hello for the First Time,” centers on how “even a simple thing, like saying hello to someone, becomes a monumentally important occurrence.”

Said Johansson, “I think all of the songs on this soundtrack are so personal to each artist, both musically and lyrically, because they represent the effects the film’s heroes, heroines and subject matter had on each one of us.”