'What's your book about?"

'What's your book about?"

I remember being in the audience for an AL Kennedy event at the Edinburgh International Book Festival years ago. I was not a published author back then, but I was definitely writing, plugging away at a hapless novel in my spare time, trying to work out what the hell I was doing. I was there, most likely, to steal some of Kennedy's writing mojo, which is how I spent several years at book festivals, hoping to absorb writing talent by osmosis.

It was pretty early in the morning and there was a subdued atmosphere in the Spiegeltent. Anyone who has seen Kennedy in action knows she does not suffer fools gladly, and so it was on this particular morning. When the poor misguided chairwoman of the event (I can't for the life of me remember who it was, probably just as well) asked Kennedy if she could sum up her latest novel in one sentence, the author fixed her interlocutor with a deathly stare.

"Of course I can't," she said through her teeth, "that's why I wrote a whole bloody book." That scene flashes into my mind whenever anyone asks me what my books are about. Part of me always wants to scream, "I don't know, read the bloody book and find out!" But that's just me being a miserable misanthropist, and part of the game for writers in the 21st century is discussing their ideas, method, craft, all that jazz.

There is a running joke among authors about the question we get asked most often: "Where do you get your ideas from?" The late, great Iain Banks used to answer in a deadpan voice: "There's a website called ­ideasforauthors.com, I just go there."

I think, partly, we joke about it ­precisely because it is a difficult question to answer. You don't want to start banging on about moments of epiphany, consulting your muse or hearing a character's voice in your head telling you things - that kind of pretentious stuff serves only to alienate you from readers and make you sound like a complete ass.

On the other hand you do not want to get too much into the nitty-gritty, the endless scribbling and scoring out of all the dreadful ideas, the linking of tenuous elements then shaping and moulding them together until they become something that maybe just might work if you throw in another dead body, or an evil twin, or a roller derby, or set the whole thing in 19th-century Peru or whatever.

That prosaic, workmanlike element of writing is not really what audiences at book festivals want to hear about either; it makes writing books sound like an ordinary desk job. Of course, writing books is mostly an ordinary desk job, but people read books to escape, to think, to have adventures, to feel, to cry, hopefully to experience something just a tiny wee bit profound, and readers do not want to know about how that sliver of magic came from nine months of boring slog on your part.

So anyway here I am, like it or not, writing about the inspiration behind my sixth novel, The Dead Beat. In fact, obsession is a more apt word than inspiration. Inspiration suggests a one-off flash of an idea, whereas for me at least, writing a novel is all about trying to wrangle with something you are obsessed with.

The way I see it, you have to be obsessed to write a novel. You are going to be doing it every day for months, maybe years, it is going to gnaw away at the back of your mind while you make the kids' tea or walk the dog or empty the dishwasher, so it might as well be something you can't stop thinking about, a psychological scab you can't help picking at.

So what is The Dead Beat all about? Well, if I had to sum it up in one sentence ... no, I'm not going there. On the nuts-and-bolts level, it is a thriller set in modern-day Edinburgh, and the story focuses on Martha, a young trainee journalist who gets thrown on to the obituary desk at an ailing national newspaper. On her first day, she takes a call from another employee of the paper who reads his own obituary down the phone to her then apparently shoots himself while still on the line.

But what is it really about? Well, several of my current obsessions, hopefully intertwined in a way that makes for both a decent page-turner and a book that takes the reader on an emotional journey. That is the aim, anyway.

It is about death, in a number of ways. For quite a while, I was mildly obsessed with obituaries, those little oases of melancholic yet uplifting writing in among the terrors and tribulations of everyday news. I would start each day reading all the obits in all the papers, then I would sift through the death announcements in my local paper, trying to get a feel for the lives lived. In a way I enjoyed the local death notices more - there was a lot more life to fill in, a lot more room for a writer's imagination to play in. Also, these were ordinary people, not the great and the good, the lords and ladies, the captains of industry or famous politicians.

(As a short aside, in an earlier draft of The Dead Beat I named a couple of the pre-prepared obits that newspapers have on file - Margaret Thatcher and Nelson Mandela. Both then died. In the published version I have replaced them with Prince Philip and Sir Bruce Forsyth. Now, I am not saying the book is cursed or anything, but, you know, watch the headlines. Just saying.)

Anyway, I have never been interested in writing about famous or rich or successful people. That is one of those elements that mysteriously emerge from your own writing after a few books, and only then do you realise it is an inherent belief or trope. I do not think I could ever write about international spies or rich bankers or politicians or rock stars - not because I could not imagine their lives but just because I do not find those kinds of lives interesting enough.

At heart, I think, I have always wanted to write about you, about me, about normal people like us and the s*** we have to deal with every day just to get by. Speaking of which, Martha in The Dead Beat encapsulates another of my current obsessions - mental health issues. She suffers from severe depression and deals with it and all her other troubles through self-medication and courses of electroconvulsive therapy at her local hospital. She does not have her troubles to seek, and her father has recently committed suicide just before the book starts.

Which leads to my final obsession in The Dead Beat. I wanted to look at the gaps and links between generations. Does Martha's mental illness come from her genes, is it an inescapable destiny she has inherited, or is there some way she can break free? The key to what happens in the novel lies in her parents' generation, and there are a number of flashback chapters set in the grunge and indie rock scene of Scotland in the early 1990s.

On one level that was an in-joke with friends the same age as me (I am 43), to make us all feel old because grunge was more than 20 years ago, and we are now old enough to have grown-up children. But on a more serious level I wanted to look at the difference in attitudes between Generation X and whatever it is they are calling kids these days - how we engage with culture and the media, and what that says about us. It is no mistake that Martha is a print journalist, because I also wanted to look at how that industry is being affected by the digital age, and what that might mean for the future.

So that is everything that was thrown into The Dead Beat. Am I happy with the end result? I am reminded of something else AL Kennedy said at that fractious event when asked the same thing. "It's not my job to like what I write," she said, sighing.

I know how that feels. I go through phases where I can't stand to look at what I have written, but then at other times a little glimmer of happiness creeps in, an unsettling feeling that I got close to what I set out to do. Hope you like it.

The Dead Beat by Doug Johnstone is published by Faber & Faber on Thursday, priced £12.99