“If you’re gonna tell a story, come with some attitude, man,” chides Don Cheadle’s Miles Davis at the outset of this offbeat biopic of the jazz legend.

A labour of love for Cheadle, director and co-writer as well as star, Miles Ahead has attitude to burn, but the riffs it plays on the trumpeter’s life prove as frustrating as they are fascinating.

The film’s conceit is that Ewan McGregor’s Rolling Stone journalist Dave Braden – an invented character – is trying to hustle an interview with the notoriously pugnacious musician in 1979. At that time, Davis has been living for five years in drug-addled seclusion, holed up in his Upper West Side apartment and creatively spent.

This is the jumping off point for Cheadle and co-writer Steven Baigelman to spin a surreal tale that sees Davis and Braden dashing around New York trying to retrieve a stolen session tape, a giddy enterprise involving sundry car chases, shoot outs and punch ups. Flashbacks to the late-1950s and 1960s provide a more restrained counterpoint to this fantasy narrative and chronicle Davis’s turbulent marriage to dancer Frances Taylor (Emayatzy Corinealdi).

In these scenes, Cheadle doesn’t shrink from exposing Davis’s violent, misogynistic side, but he falls short elsewhere when it comes to conveying Davis’s genius.

Tate Taylor’s 2014 James Brown biopic Get On Up took even more liberties in telling the life of its equally tempestuous subject but proved more engagingly cinematic and much more revelatory. Cheadle offers glimpses of Davis’s personal demons, but he doesn’t show us his audacious creativity.

Certificate 15. Runtime 100 mins. Director Don Cheadle