NEW York, 1966: American writer Truman Capote throws the party of the century.

As 500 guests gather for his Black and White Ball at the Plaza Hotel, Capote retreats to his suite to drink Martinis – a cocktail Andrew O’Hagan is also a fan of.

With his play The Ballad of Truman Capote, which is on at theSpace at Niddry Street as part of the Edinburgh Festival Fringe, the Scottish writer and director invites audiences to spend time with the man who penned In Cold Blood.

“I’ve been interested in Truman Capote as a writer, probably all my adult life,” says O’Hagan before taking a drag on his vape. “I’ve always been interested in the way he merged fiction and non-fiction. He was both a reporter and a novelist, he combined the two forces in a very brilliant way. He had such a dramatic and difficult life.”

When he was 18, O’Hagan went to Monroeville in Alabama, the town of childhood friends Truman Capote and Harper Lee. Since then, he has been thinking about Capote’s story.

“The friendship interested me, his childhood and the journey towards adult celebrity and becoming possibly the most interesting reporter of his generation and a very, very memorable novelist too.”

Over the years, O’Hagan met people who attended Capote’s infamous ball.

He says: “I used to meet writers, editors, public figures who had been to that ball and I started collecting information about it. The most important piece of information from a dramatic point of view was that Truman, just before the 500 guests came, went to his suite for an hour and locked the door.”

It’s an hour O’Hagan wanted to see come alive on stage. He says: “I could hear the play as soon as I had that information. Downstairs: Norman Mailer, Diana Vreeland, Frank Sinatra and Mia Farrow were all gathering in this hall, and he was upstairs drinking Martinis and thinking about his life. I found myself hearing his voice very distinctly, it became a pleasure to write that play.”

The National:

After Capote whispered into his ear, O’Hagan started thinking about the life of a creative writer – and the toll it can take on one’s life.

He explains: “What does it mean to examine the world with a view to making something permanent out of it? It seemed to me a really lovely opportunity to just investigate what it means to invest so much of your life in memory and examine what a society is and what the dark forces in life might be.”

Much like the writer at the centre of his play, O’Hagan flirts between fiction and non-fiction. His latest book, the autobiographical Mayflies, was adapted for television last year. He believes acting and writing are the two “principal art forms that are most like each other”.

He never had ambitions to be an actor. Although, he did make a cameo in the Mayflies series, where he walked a bride down the aisle.

O’Hagan grins, “I was very happy to be asked to accompany the wonderful Ashley Jensen as she was marrying Tully, it was a distinct pleasure. I felt so involved in the making of the series. So when they asked me to appear, I had what we could call a Hitchcock moment, but I felt ‘yes, this seems right’, I can make an actual physical appearance in the film, almost as if I was the film’s mascot.”

The National:

An elegy to male friendship set in 1986, Mayflies revisits fragments of O’Hagan’s past.

The series is a brilliant adaptation of the book, which portrays a friendship like no other. How was it to see some of his most cherished memories adapted on TV?

“It was just beautiful,” he says. “These things can be hazardous. I’m often approached by filmmakers and playwrights wishing to adapt work of mine, and several of them have been adapted before. But I was very struck by the quality of vision of the adapters, they had a complete vision of how to animate and bring to life these characters in a Scottish setting.

“It really mattered to me that they understood the weather, the culture, the language, some of the moral and ethical difficulties at the centre of the drama.”

According to O’Hagan, seeing audiences touched by the series was one of his proudest moments: “This film really had an impact showing between Christmas and New Year, a time of year when people really reach out to those who matter to them. I think that this particular drama, a drama of love and loss, connected at the deepest level with Scottish viewers. Their heart went out to it in a way that was completely beautiful to see.”

READ MORE: Scottish literature: What is it and who needs it?

The writer and producer instantly became friends with the actors while on set. O’Hagan says the young actors were especially interested in knowing more about what his life was like in the 80s.

“They were like, what was it like in nightclubs where everybody smoked? And I would describe this thick smog of cigarette smoke that used to exist in the clubs of Manchester, Glasgow, London and everywhere in those days. At one point, Rian Gordon, the actor playing Jimmy, asked me how the character would sit in the bar. Would he kind of ‘man spread’ the way some awful guys do on the tube, or would he cross his legs? He was really interested in that kind of detail.”

The author is now in his 50s but he says his 20s don’t seem like “ancient history”.

O’Hagan says: “It seems like the day before yesterday. My recall of those times is quite sharp. I’ve just always been a guy for memory, and memories played so importantly into everything I’ve tried to write.”

Is there something he used to do in his 20s that he would never do today? It only takes a second for him to share an answer. “There’s probably drugs I took in my 20s that I wouldn’t take now. I wouldn’t take acid now, I wouldn’t enjoy the lack of control. Not that we were hugely druggy, we were probably quite moderate in some ways.”

After a pause, he ponders: “What else, though?”

He wouldn’t take some reporting jobs as enthusiastically as he might have done at the age of 22, like when he begged on the streets of London for weeks.

“I remember a newspaper asked me to go begging on the streets of London, and I enthusiastically threw myself in a kind of Orwellian rush of energy into this crazy, dangerous nighttime world of sleeping rough in London. Guys were desperate and on drugs, often alcoholic and living a miserable existence begging in the streets of the capital.

“And I was there and staying in the overnight hostels with them and drinking with them. I stayed for weeks and weeks and weeks, and then I wrote a huge piece for the London Review of Books. I don’t think I’d get away with it now. They’d be like, who’s that middle-aged guy sitting on the pavement?”

With quite the knack for investigative journalism, O’Hagan has delved deeply into stories. He assisted rescuers during the costliest hurricane to ever hit the United States, spent time with child soldiers in Kandahar, and has been among fraternal orders during an Orange March in Scotland.

First and foremost, O’Hagan believes journalists should be a friend to the reader.

“Wherever they are on the political spectrum, people have versions of news stories that they would like them to be. And I think that sometimes it’s our job to put ourselves in a position of being a friend to the reader rather than a friend to the subjects of the piece.

“Trying to bring them true perceptions and depth, that’s sometimes quite hard, especially in a world dominated by culture wars and by public relations and very fierce notions of what is sayable and what is not sayable,” he states.

As some journalists are starting to resort to artificial intelligence for work purposes, he doesn’t believe AI will ever be able to do what journalists do. “You’re looking somebody in the eye and you’re asking questions. We take it for granted.”

After all, a robot would lack what is the essence of journalism – human connection.

That’s according to O’Hagan, who gives the example of a snowy Christmas Eve where he listened to one man’s heartbreaking story.

READ MORE: How ‘banal nationalism’ helps win hearts and minds 

“The Grenfell story,” he pauses. “I had to go and find a man whose wife and children died on the 21st floor. It was Christmas and it was snowing outside. I had made contact with him, and he wanted to meet for a drink.”

The pair met in a hotel in the centre of London. His voice softens as he recalls a meeting he’ll never forget. “Something about the light outside and the tears in that man’s face, and what he was saying about the last phone call he had with his wife. For me, it was the essence of journalism and human connection.

"Because great journalism, I think, is based on human curiosity and human connection and that man poured his soul out,” he says. “We manufactured a situation of empathy, and I don’t believe that any form of artificial intelligence will ever be able to do that.”

He notes that they don’t have the human capacity to be creative – or sexy.

“I know how difficult it would be to make that the case, that you fell in love with an artificial being who was just spouting learned nonsense at you. I mean, it’s a bit like the guys you avoid. You have a drink with a guy and he’s talking shit to you. Cliché after cliché, you can spot it immediately and you’ll never take a second date, surely.”

Speaking of, what’s the worst date he has ever been on?

“I may have to have a few puffs on my vape and walk around the room. There’s quite a few to choose from, I have to tell you,” he laughs.

“I was at one of those schools where people were dating all the time, but it wasn’t really dating. You’d have a girlfriend for the afternoon and nothing would happen except you got to call them your girlfriend, or they got to call you their boyfriend.”

He takes a trip down memory lane – down to the dreaded school discos. “There was a particularly lovely person at my school. I had a date at the disco with this girl who I thought was excellent.

And when I got there, she was snogging on the dance floor with the chief footballer guy, like the handsomest dude in the school had just taken my girlfriend, and she didn’t even acknowledge me.”

As he takes yet another pull on his vape, I wonder which flavour he goes for. “Menthol, the worst one,” he admits. “It’s a kind of holiday pastime. I stopped smoking some time ago. Sometimes when I’m away from home, I just buy one of these.”

Even though he has been “rained on constantly” since he made it back to Edinburgh, O’Hagan is delighted to be staying on “one of the most beautiful streets” in the New Town.

READ MORE: Scot goes to 'the most ­Scottish town in Italy' by Vespa 

Glancing through a window, he says: “It’s one of those evenings in Edinburgh where everything seems possible. People are out on the street heading towards comedy shows. It’s just a lovely time to be in Scotland, I can’t think of anywhere in the world that is more full of belief and joy than Edinburgh at this time.”

As our conversation comes to an end, he admits the past year has been the busiest of his life. Between rehearsals for The Ballad of Truman Capote, a new podcast for the London Review of Books, and finishing a book he had been working on for years, life has been hectic.

Speaking of the latter, he says: “It felt like sending your firstborn child to university, waving them off from the window, the tear in your eyes saying thank you.”

To conclude, he refers back to Truman Capote and what he once replied when asked what it was like to finish a novel. “He said it was like taking a child out on to the lawn and shooting him through the head, which is a really extreme and perverse thing to say, but you kind of know what he means.”

The Ballad of Truman Capote is on at theSpace on Niddry Street until Saturday. See