After Don Cheadle settled down at Andy’s Jazz Club on East Hubbard Street to talk about his new film, “Miles Ahead,” the actor and filmmaker smiled as he remembered the enormous challenges of co-writing and playing the lead in this movie about the iconic, troubled musical genius Miles Davis —  as well as making it his feature film directorial debut.

“One thing I learned in this process was there is no limit to my neuroses!” said the Academy Award nominee. “My wife visited me halfway through the filming. She had been there at the beginning, but then she left and came back, and when she did she said, ‘You cannot do this ever again.’ . … I was so stressed out. I was a bundle of frayed nerves the entire time.” Cheadle spoke in a way that seemed to indicate he’d love to do it all over again — if another equally challenging but rewarding project came his way.

“Miles Ahead” (opening Friday) was a challenge for Cheadle mainly because he was “wearing all the hats. Making a movie for anyone, at anytime, is like herding cats. It’s an explosion that starts when you say ‘We’re going. Action!’ and you just try to keep all the pieces in place.

“On top of that, having to play such an iconic figure and really wanting to make sure you don’t mess it up, while at the same time being captain of a ship — it was challenging.”

Cheadle also confirmed a widely circulated story that his portraying the jazz legend was tipped by Davis’ nephew Vince Wilburn Jr. — a decade ago, at the time Davis was posthumously inducted into the Rock and Roll Hall of Fame.

The idea was a surprise to Cheadle, who was unaware about the concept until he read it in the press.

“Apparently, when Vince saw me in ‘Devil in a Blue Dress,’ he told people, ‘I thought of my uncle. That’s Chief [his nickname for Davis]. Since then, he’s been tracking me and my career,” said Cheadle.

“Then came the proclamation that made that idea into reality.”

The film focuses on a critical period in Davis’ life and career, a time in the late 1970s when he did not release any new music and when he was in a perpetual funk, further complicated by rampant drug use and angst over the collapse of his marriage to dancer Frances Taylor. It is at this point when a pushy freelance reporter named Dave Braden (Ewan McGregor) forces himself into Davis’ world — desperate to document the background of those lost Miles years.

If Cheadle could have had the chance to meet Davis, the actor said he simply would have asked him one question: “What is next? That’s because there was always something ‘next’ for him. Miles was indefatigable in constant pursuit of the next expression of his art form.

“Right before he died, he was working with Prince. If he was alive today, I would imagine he likely would be working with the likes of Kendrick Lamar or Imagine Dragons or Alabama Shakes. … It would be whoever he thought was dealing with the sonics of today. He would be trying to figure out the next big thing, and what would be pushing his buttons artistically.”

Noting that Miles Davis clearly had a dark side, with wild swings in temperament and frequent, heavy use of drugs, Cheadle agreed that sadly that is often the case with wildly artistic people.

“It is a tragedy, but we see it so often. There’s something that goes hand-in-hand with that. Listen, today, if you put Picasso on the couch, a therapist might diagnose him as being bipolar.

“There’s something we see with these artists over and over. They live their lives at the extremities of their emotions. They consume all of that to create the music or whatever art they can make.”

To play Davis on screen, Cheadle learned to play the trumpet in the way Davis did. While he had played the saxophone in high school — and also plays the piano — the trumpet was a new challenge.

“I wanted to understand the trumpet from the inside out,” said Cheadle. “It’s a pet peeve of mine when I see actors in movies playing musicians, and they clearly have no connection with the action of playing.

“I absolutely was not going to do that with Miles,” added the actor, who quipped, “At some point Miles was as bad as I am now, but of course, he was maybe 8 or 9 years old!”

That said, Cheadle stressed he worked hard to learn to play the Davis solos seen in “Miles Ahead.” While the music we hear was Davis’ recordings, the actor felt his actual playing of those same notes added important authenticity to the film.

One surprise? “I didn’t anticipate I would carry this thing forward, but I have. I still play every day usually.”

Given that “Miles Ahead” is being released as debate intensifies about the lack of diversity in the films produced by Hollywood, Cheadle admitted his movie – focused on such an iconic African-American — is coming out at a good time.

“But while the timing, I’m hopeful, is fortuitous, I hope the film is accepted and enjoyed on its own merits. I want people to be engaged and entertained and learn about this man who was clearly a complicated musical genius. I also hope this is the kind of film that is an example of something the industry can support and get behind.”