The Soloist is not a film in which you anticipate Robert Downey Jr. will be twice doused in urine — first his own, then a coyote’s. Such are the territorial markings of Joe Wright, whose directorial quirkiness undermines moving moments in this musical biopic.

Perhaps the herculean task of finding fresh heart and angles in the umpteenth retelling of Pride and Prejudice (2005) — his first film — took too much out of Wright. Atonement was a messy adaptation of a romantic epic by way of an M. Night Shyamalan twist.

Now, The Soloist pretentiously perverts the populist approach of Robert Zemeckis — welding a message about America’s homelessness problem onto what works best as a tale of rekindled occupational passions and slow social rehabilitation.

Wright doesn’t squash out all the sublime moments of The Soloist, though, thanks to affecting performances and chemistry from Downey and Jamie Foxx.

Steve Lopez (Downey) is an L.A. Times columnist who’s observant even when he’s out of it — scrawling notes in the emergency room after a vicious bike accident. (Lopez casually characterizes his wound as “nothing more than a bump on the head” when it looks like an earthmover edged slowly over his face.)

Lopez is a master for detail, but he’s not invested in going outside his journalistic comfort zone to embrace life’s entirety over its slices. Unfortunately, that entirety includes a newsroom dwindling in bodies — a real-life snapshot captured poignantly and truly in Susannah Grant’s screenplay (adapted from Lopez’s book).

One day, Lopez meets Nathaniel Ayers Jr. (Foxx) — a homeless, mentally ill violin player with a racing mind and mouth that slows down only for classical melodies. After Ayers’ long, rambling introduction Lopez, it seems as if there is such a thing as too crazy – even for a columnist. But once Lopez hears a topic — Ayers is “searching for Mr. Beethoven, but he’s slipping away” — the musician is instant column fodder.

Eventually, Lopez learns Ayers once attended Juilliard on a scholarship to play his original love — the cello. Through a kindly reader, Ayers again gets his hands on a cello, but with one condition from Lopez: He must live at Lamp — a nonprofit organization aiming to end homelessness.

But Ayers has tried that before, and his mental demons won’t offer him peace. Just as challenging for Lopez — a divorced absentee father — will be acclimating himself to what it means to be responsible for someone other than himself.

Foxx persuasively conveys Ayers’ apprehension at playing, or even existing, within any sort of socially traditional structure. His concerns go beyond nerves and into his nervous system, and it’s fully committed beyond a series of tics. Likewise, Downey gamely runs Lopez across a gamut from opportunistic fame to altruistic friendship.

However, Grant’s screenplay is disjointed, awkwardly splitting time between Ayers’ past, possibilities for Lopez’s redemption and the present problem of homelessness and urban sprawl. That said, there are lovely details in each: Ayers drawing cello fingerings on his forearms as a child; Lopez lingering in a hospital to find a missing Ayers; and Ayers’ cello solo bounce off concrete tunnels as beauty amid the bustle.

When Wright wrestles with personifying the uplift of music onscreen, the results feel like non-special effects — one scene resembling 2001: A Space Odyssey’s light show and another following two soaring birds through L.A. are most egregious.

It’s all a little too on the nose, as is one non-sequitur get-up Ayers wears that makes him look like a tattered Uncle Sam in grease paint. Clearly, it’s a flashy way to suggest America’s blight and beauty are one and the same — as fellow Brit director Sam Mendes has done with much of his work.

But where Mendes, with his stage training, lets actors evoke that idea through emotion and motivation, Wright simply is showing off with overcooked visual metaphors. Too often, his work as a visual soloist overwhelms a talented ensemble.