The leading Scottish writer James Kelman has spoken of a formative trip to the US which inspired his latest acclaimed novel.

Speaking at the Edinburgh International Book Festival, Kelman said that Dirt Road was partially inspired by a visit to the country in 1963.

The Booker Prize-winning writer of books such as How Late It Was, How Late and Kieron Smith, Boy said: "We emigrated to America for a few months.

"Being 17 in America was difficult for me.

"I had left school and was doing an apprenticeship but it was not possible to work or go to school there.

"I ended up walking the streets of Los Angeles for three months looking for a job."

The book has a great amount of American music in it, but the writer said he did not know the southern states of Alabama and Mississippi personally and wrote from his memory of a road trip along Route 66, “working with a map all the time”.

Dirt Road is Kelman’s second novel set in the US and at the event, Kelman discussed music and its relationship with immigration, in particulr the Appalachian songs and bluegrass of Alabama and how Scottish settlers influenced Americana and blues from the 17th century onwards.

Jazz fanatics were particularly Scottish because “they have a Calvinist approach to music”, he said.

He disclosed a link to Dizzy Gillespie: “Both our grandfathers spoke Gaelic,” he said, “but neither of us do” and spoke about his love of Doc Watson, the country guitarist.

Recalling a game of pontoon in London in the 1960s, when his fellow player was unable to afford the £5 he owed him and gave him a Doc Watson album instead, he laughed, "it’s probably worth about £100 now… but then so is the fiver."

Kelman described Dirt Road as “a portrait of the artist novel”.

He spoke about the character Murdo’s talent for music and its power to connect him not just to Scotland but to his family and own inner life.

Kelman explained that Murdo and his father were grieving for his mother, who died a few months earlier, and his sister who died five years previously.

“They haven’t got over it,” he explained, "who could get over it?”