Marcus Miller is reflecting on the bittersweet experience of writing his latest album, Afrodeezia. When the bass guitarist best known in jazz circles for his association with Miles Davis – he not only played in Davis’s band but became the trumpeter’s producer and composer in his final years – visited the island of Gorée off the coast of Senegal a few years ago, he came face to face with one of the most shameful periods in history.

Gorée was effectively a slave warehouse, a small island of extremes that accommodated both the lavish homes of the slave traders and the slave houses where Africans were held – shackled and stacked essentially – before being transported to the Americas. Standing at the door the slaves passed through on their way to the waiting ships, Miller became aware that this was the point where their lives as Africans ended and he became consumed by emotions.

“I’d heard about Gorée, many African-Americans have,” says Miller. “But it’s one thing hearing about it and another thing entirely seeing and feeling what it must have been like for these people. I wrote a piece of music, Gorée, for my previous album, Renaissance, and people felt the emotion in it, not just African-Americans, everybody.

"But with Afrodeezia, I didn’t want it just to be about my immediate response to that visit – it made me really mad and resentful – I wanted to create a celebration of us being able to endure that period of history and to come through it with our dignity and humanity intact. That was the sweet part.”

For Miller, as for many musicians before him, the story of slavery has been told in the rhythms that were carried over to South America, the Caribbean and New Orleans and the tour that brings him back to Scotland for the first time in 15 years is not just about promoting Afrodeezia but to share the kaleidoscope of rhythms and grooves that inspired its creation.

It was, he says, quite an undertaking but his experience in recording studio work in general and creating film scores in particular – he’s worked on over 30 soundtracks since contributing to the 1981 Richard Pryor and Cicely Tyson vehicle, Bustin’ Loose - has prepared him for any eventuality.

“I never had any ambition of working in film but it’s been a boon in that I’m not afraid to explore any instrumentation,” he says. “If something calls for a bassoon, I can write for a bassoon. Or if there’s some exotic percussion involved, that’s no problem. So I wasn’t intimated by all the elements that needed to be brought out in Afrodeezia.”

Indeed, the laid-back and chatty Miller seems unlikely to be intimated by any musical situation. Originally a clarinettist – he still features bass clarinet regularly on record and on tour – he fell in love with a friend’s bass guitar at the age of 12 and within three or four years he was so proficient that a neighbour, the great drummer Lenny White commandeered Miller and his drumming friend, Omar Hakim for a recording session. Miller, the prolific session man, had arrived.

There were already several musicians in the family. Miller’s father played classical piano and pipe organ and a cousin, Wynton Kelly, played piano with Miles Davis from 1959 to 1963, a detail that made Miller’s family proud but “not all that impressed” when Miller joined Davis’s band in 1980 at the age of 21.

“One of the first things I told Miles was that Wynton was my cousin,” says Miller. “And Miles’ response was interesting. Most people say, Ah, Wynton, he swung his ass off. But Miles said, He had a nice touch. I was only about 11 when Wynton died but I remember sitting on his knee and adding my notes – probably all unrelated - to what he was playing on piano. I didn’t know about touch then but one of the million lessons I learned from Miles was the advice he always gave: be yourself. In other words, develop your own touch. That’s what Miles did once he got past trying to play high and fast like Dizzy Gillespie and Fats Navarro. He was a genius at being himself.”

To many, Miller already had his own touch when he appeared on Davis’s The Man with the Horn album in 1981. It’s a touch that has now featured on more than 500 recordings including albums by Aretha Franklin, Paul Simon, country singer Toby Keith and one of Miller’s own favourites, singer Lalah Hathaway. Miller has always maintained a gigging schedule in tandem with his studio work, though, and feels that both aspects of the musician’s life are necessary.

“Playing live is about connecting with an audience and studio work is about connecting with other musicians and paying attention to detail,” he says. “If you only play live, you can get sloppy because the detail can get lost in these big venues. And if you only play in studios, you can lose the ability to reach an audience. So ideally you want to keep the detail and communicate.”

The Marcus Miller Band plays Usher Hall, Edinburgh on Thursday, October 22.