Edinburgh's master of tartan noir, Ian Rankin, revealed his favourite Rebus moments to an audience at the Edinburgh International Book Festival. Here are a few of his choices.

Favourite pub scene: Set In Darkness

Rankin's favourite Rebus pub scene takes place not in his usual haunt, the Oxford Bar, but in the Royal Oak. Rebus decides to nip down to the bathroom, which can be reached without entering the pub. A window looks into the bar and as Rebus glances in, he doubles back. There in the bar, singing a Burns song is his nemesis Cafferty, who Rebus believes is safely locked up in jail.

"Rebus' world is off kilter completely," says Rankin. "I don't always manage to surprise Rebus, but I like the fact that I did this time."

Favourite scene between Rebus and Siobhan: Set In Darkness

Sitting together in the car, Rebus reaches across Siobhan's legs to retrieve something from the glove compartment. She flinches, thinking he is making a pass at her, but neither of them wants a romantic relationship.

"Just that tiny little reaction of her flinching gives a richness to their relationship that a thousand words of trying to spell it out wouldn't do," says Rankin. "A relationship would completely destroy the working dynamic between them."

Favourite description of Scotland: Strip Jack

Rebus reminisces about his childhood as he pulls off the motorway at Kinross. He remembers the family picnics at Loch Leven, the community he grew up in and holidays in St Andrews. "Those are basically my memories," explains Rankin.

Favourite one liner: Mortal Causes

Rebus is asked if he has any enemies and replies: "I can think of half a dozen who would throw confetti at my funeral."

Favourite guest character: A Question of Blood

At a London charity auction, the winner of the chance to appear in a Rebus novel told Rankin "I don't mind what kind of character I am as long as my mate Wee Evil Bob can be mentioned as well". Rankin had such fun writing the character Peacock Johnson and his sidekick Wee Evil Bob into A Question of Blood that he tried to contact Johnson to ask if he could include them in other novels. The website and the email address he had been given didn't exist, and after doing some sleuthing of his own, Rankin discovered he was the target of a practical joke by Stuart David, the former bass player for the band Belle and Sebastian.

"I thought I'd taken a real man and made him fiction," says Rankin, "but I'd actually taken a fictional man and made him fictional."

Favourite book: Black and Blue

Rankin's breakthrough novel sold four times as many copies as his previous books and won the Crime Writer's Association Gold Dagger award. Rankin says that until that point, he had worried that he would never make it as a writer. "Suddenly I thought, I know what I'm doing. I'd written a book that was better and more complex than my previous work."

Favourite musical quotation: Let It Bleed

"After a drink he likes to listen to the Stones. Women, relationships and colleagues had come and gone but the Stones had always been there. He put the album on and poured himself a final drink. The guitar riff, one of easily half a dozen in Keith's tireless repertoire kicked the album off. 'I don't have much,' Rebus thought, 'but I have this'."

Rankin uses song lyrics for his titles: Let It Bleed is an album by the Rolling Stones. "I would rather be a rock star than a writer," he says.

Favourite description of Siobhan: Resurrection Men

Cafferty tells her: "You've got more balls than Tynecastle."

"She wouldn't be flattered by that remark," says Rankin, "because it implies she's put her womanness aside to become one of the boys. But it says a lot about her because she's a ballsy character."

Least favourite book: Knots and Crosses

Rankin says he wrote it as a postgraduate literature student, "and it reads like it was written when I was a postgraduate literature student. I wasn't inside Rebus' head; he was just a cipher to get me through the story."

Favourite opening: Let It Bleed

Rebus is pursuing some kids in a car chase through Edinburgh that ends with a crash, the car hanging precariously off the Forth Road Bridge. Rankin calls this his "Hollywood moment".

Favourite Edinburgh location: Oxford Bar

"It's more than just a pub, it represents something to Rebus, something unchanging in a changing world," says Rankin. "As Martin Amis said, 'without women, life is a pub'. There are very few consistent women in Rebus' life so he spends a lot of time in the pub, which is why he could never properly retire because he'd be dead within a year."

Favourite location in Scotland: The Black Isle

Rankin described his latest Rebus book as "a road movie set up and down the A9, Stirling to Perth, up to and past Inverness to the Black Isle".

"I love the Black Isle," he says, "a couple of good boozers, good restaurants, dolphin watching, you name it."

The perfect location for a cantankerous sleuth with a taste for alcohol, it seems.

 Ian Rankin's new Rebus novel, Standing in Another Man's Grave, is published in November.