At more than 500 pages, Jonathan Lethem's 2003 novel, "The Fortress of Solitude," may not seem like the easiest subject for a musical adaptation.

But it's not an unsuitable choice, rife, as it is, with the sounds of funk, R&B, hip-hop and punk, and a plot that in part concerns a fading soul singer and his troubled son.

Still, telling the story of Dylan and Mingus -- two superhero-obsessed boys coming of age in Gowanus in the midst of neighborhood change in the 1970s, '80s and '90s -- was full of challenges for book writer Itamar Moses and composer/lyricist Michael Friedman, not least of which was bridging the gap between novelistic and dramatic storytelling.

"In a dense 500-page novel like 'Fortress,' Lethem can really stretch out and create this gradually flowing tapestry of time and place and incidents and character," Moses said. "I thought, 'How do I on the one hand maintain that feeling of covering a lot of time and creating a rich world, and at the same time distill it down to distinct dramatic moments we can experience on stage?'"

Before much music was written, Moses wrote a nearly 200-page version of the script, knowing that the "endless, weirdly-structured mess" would not be used in the end. Still, Moses said, it was instructive, as it helped him with the "heartbreaking process of deciding what to simply leave out."

What remains is an ode to a time and place, but not a sugarcoated one: "Fortress" is a tale of loss, artistic frustration and betrayal, colored by rifts in culture and race.

"When I read 'Fortress,' it just had an incredibly powerful effect on me. I felt changed by it in a way I couldn't completely explain," said Daniel Aukin, who conceived and directed the show.

Aukin got the idea to adapt Lethem's novel while serving as artistic director of Soho Rep. After securing the stage rights to the material, he enlisted Moses and Friedman to write the show, which debuted in Dallas this March.

Moses found the task daunting, but, he said, "the opportunity to work with that source material was something you don't say no to."

Fans of Lethem's will be eager to draw comparisons between his book and the musical, which plays at the Public Theater until Nov. 2, but Aukin wants the show to stand as its own artistic statement.

"We wanted the musical to exist in its own right independent of any knowledge or experience of the novel," Aukin said. "That was very important to us from the beginning, but it took a long time to get to that place."