The Soloist - a new film starring Jamie Foxx and Robert Downey Jr. - is based on the true story of Los Angeles Times newspaper columnist Steve Lopez and a homeless musician he met on the street.

Lopez was walking through downtown Los Angeles three years ago when he came upon a man playing a violin.

"And there was something very interesting about this picture," he says. "Number one, the violin had only two strings instead of four. Number two, he appeared to be living out of a shopping cart, with all of his belongings in it. Number three, the music sounded really good, particularly for somebody playing a violin that was missing two strings."

Over the following weeks, Lopez kept returning to that street corner to listen to the music and learn more about the man who made it.

"Each time that I returned, he was a little more comfortable with me. He would tell me things," he says. "Like for instance, I said, 'Why do you play right here?' And he pointed over and said, 'Because there is a Beethoven statue here, and I play for inspiration.'

"On another visit, I noticed he had written some names on the sidewalk in chalk. And I asked who those people were, and he said those were his classmates at Juilliard, the school for the performing arts in New York, which of course is one of the elite music schools in the world."

How did a Juilliard student end up a homeless musician?

Those visits resulted in a series of newspaper columns in which Lopez introduced the homeless musician to his readers.

"His name is Nathaniel Anthony Ayers. He was a little over 50 years old when I met him," he says. "He grew up in Cleveland and got interested in music through the public school system back then in the 1960s. Mr. Ayers, after high school, went to Ohio University to study upright bass and later got a scholarship to Juilliard, which was quite rare. He was one of the few - if not the only - African-American students at Juilliard in the late 1960s.

Around his second year at Juilliard, Lopez told his readers, Ayers began having problems. Although his musicianship was outstanding, he had trouble focusing in class. At the beginning of his junior year, he had a mental breakdown and was diagnosed with schizophrenia. He left Juilliard and ended up on the streets of Los Angeles.

Lopez says the response to his articles was overwhelming.

"When I wrote my first column about him, readers donated instruments," he says. "That little beat-up violin that he had with only two strings was replaced with six violins and two cellos. And somebody donated a piano, and somebody later got him other instruments. When I wrote that column [about the donations], we got an invitation to Disney Hall to watch the Los Angeles Philharmonic. That opened a new door because members of the Philharmonic - this world-class orchestra - took an interest in Mr. Ayers and offered lessons and began giving him lessons."

Ayers meets Juilliard classmate Yo-Yo Ma

Ayers, Lopez says, also got a chance to meet an old classmate from Juilliard, cellist Yo-Yo Ma.

"That was quite an afternoon for Mr. Ayers," he says. "I watched the two of them talking, and Yo-Yo Ma was quite gracious. He hugged my friend Nathaniel and told him, 'We are brothers. Anybody who loves music as much as you do is a brother, so we are brothers in music.'"

That's what friendship means

Today, Ayers is getting treatment for his illness, and while his recovery is far from complete, he now has a lot of people looking out for him. Lopez also has been changed by the friendship the two men developed.

"I was so inspired," he says. "He sort of reintroduced me to my own sense of happiness and fulfillment and passion. And in that respect, he's just been more than a friend. He's transformed me in many ways.

"I looked at my own life, and I would be struggling with the column I was working on, or rushing home because I was running late and needed to put my daughter to bed, or hassling with the health insurance company about a claim that they denied, and all these things that occupy your life and consume your life. I'd be driving home, and I'd pass Mr. Ayers on the street, and he would be playing the cello with his eyes closed, his head back and sawing away, as he calls it, in ecstasy.

"And I thought, 'OK, who is the success here among the two of us? Who is the happy one?'"

Dealing with homelessness and mental illness together

Ayers also introduced Lopez to the reality of the link between homelessness and mental illness.

"This is a few thousand people living on the streets, bedding down on pavement and in gutters," he says. "I'm talking about veterans who are in wheelchairs and people who have gone months and years without any treatment and [are] living in a place that was sort of a human landfill. It's quite amazing. All of this existed just a few blocks from Los Angeles City Hall, just a few blocks from a spectacular, glittering skyline."

Lopez says at that point, his goal was to help his friend get the assistance he needed. As he began to investigate the possibilities and learn what other communities were doing, he discovered that dealing with the mentally ill homeless population takes time, trust and a comprehensive approach.

"New York City realized that what works best with chronic resistant people living on the streets is something called permanent supportive housing," he says. "So it's not just a place to live, but it's where you [can help them deal with all their issues]. And when you draw somebody in, as they have with my friend, they don't just move into an apartment on their own. They move into a place that has all of the supportive services that they need.

"It's mental health counseling if that is what they need. It's job training. It's essentially room and board, with all the necessary social services. Around the world, Western Europe, Australia, some Scandinavian countries, have been far more progressive in their public education campaigns. In the United States, there is still this stigma associated with mental illness. It's something that people don't want to talk about."

But Lopez is talking about it and fighting to remove that stigma, first through his series of newspaper columns, then his book, The Soloist. He hopes the new movie based on the book will get his message out to a wider audience and help inspire solutions to the related problems of homelessness and mental illness.