Foxx will play a brilliant but mentally troubled musician in a movie based on the true-life friendship between Skid Row prodigy Nathaniel Anthony Ayers and Los Angeles Times columnist Steve Lopez.
The DreamWorks SKG movie, directed by Joe Wright, is scheduled to begin filming in January.
"Erin Brockovich" writer Susannah Grant has completed the screenplay, said Gary Foster, who is producing the movie with Russ Krasnoff. Lopez's role hasn't been cast yet.
Ayers was attending New York's famed Juilliard School on a music scholarship when he suffered a mental breakdown at age 20. A schizophrenic, he lived on the streets of Cleveland and Los Angeles for 35 years until Lopez saw him playing the violin one day near a statue of his musical idol, Ludwig van Beethoven.
Lopez did a series of columns on Ayers, and readers immediately responded, giving him musical instruments and inviting him to the Walt Disney Concert Hall to see the Los Angeles Philharmonic.
"A couple members of the orchestra started hanging out with him," Lopez said.
The columnist, meanwhile, helped Ayers secure a modest downtown apartment where he now has a music studio.
Lopez's book about their friendship, tentatively titled "The Soloist," is expected to be published next spring.