I'm in Alexander McCall Smith's airy kitchen on a bright autumn morning, waiting for the master of the house to crank into life.

I am not referring to McCall Smith, one of the world's most popular and hard-working novelists. No, he is but a lackey in the presence of true greatness, namely his coffee-making machine.

"It's called, appropriately, the Magnifica," he says, standing guard over this sleek beast as it buzzes and slurps and finally produces a coffee worthy of a Florentine barista. "It tells you things like 'cappuccino-making under way'," he adds with delight.

Loading article content

Many things entertain this man. Cups in hand, we head upstairs to his study, lined ceiling to floor with bookcases and overlooking an affluent, leaf-blown street in Edinburgh's Bruntsfield. An irrepressible raconteur, McCall Smith fills the next hour and more with a stream of stories that make him laugh almost as much as me. His eye for a comic scene is probably unrivalled in literary circles and his giggle, the most infectious in Scotland, is almost as much a tonic for the blues as his warm-hearted and spirited novels. In fact it's impossible to picture him in his earlier incarnation as a professor of medical law, where there can't have been much to laugh about. How did he survive? The answer, perhaps, lies in his books, which he started writing while still in this serious-minded post before making the leap to full-time novelist.

One needs a head for figures when discussing McCall Smith's career. To date, his oeuvre consists of about 97 books, including academic works and more than 30 children's books. Only those who've been in hibernation this past decade will be unaware that the core of his fiction falls into several series, from his first runaway success, The No.1 Ladies' Detective Agency (which has sold more than 25 million copies in English), the Isabel Dalhousie novels and those works first written as serials – 44 Scotland Street and Corduroy Mansions – not to mention his impish jeux d'esprit, about the hapless Professor Von Igelfeld, and various libretti, radio plays and adaptations.

Today, however, he is discussing a stand-alone work, the simple but affecting novella Trains And Lovers, in which four strangers meet on a train between Edinburgh and London and share their stories of love and romance. "I didn't just want to do a collection of unrelated stories," explains McCall Smith, "so I used a device that goes back to the Decameron, if not further, of people on a journey together telling one another about their lives."

One is a young fine art expert making his career in London, another a reserved American whose reflections on his unrequited love for another man he shares only with the reader. There's a chap who fell for a woman he impetuously invited to dinner who was not all she appeared, and a middle-aged Australian whose story is that of her parents, who lived on a railway station in the remote outback half-a-century before.

There's an unusually elegiac tone to this work, perhaps because the most powerful of the tales draws on a recent and moving experience. Last year, McCall Smith and his wife made one of many visits to Australia. "We went to the Oodnadatta Track and the Birdsville Track, right in the middle of nowhere, and we visited some of these old sidings where the Ghan railway line had been, before they moved it. And because in the outback things don't really perish, because it's so dry, the station master's house, the bunkhouse where the railway people could stay if they were passing through, dotted with a few trees around it – very poignant – in this flat, flat landscape, with a warm wind blowing, was quite extraordinarily atmospheric...

"On the Birdsville Track, which goes for hundreds and hundreds of miles up to the Northern Territory, we stayed on a cattle property... I went for a walk along this dried-up river bed. I came to a grave under a tree. It was a small grave, with a little bit of metal railing around the side. It had obviously been tidied up a bit, and it was a seven-year-old boy. I asked the rancher, 'Do you know what the story was?' But he said no, it was a long time ago, it was probably somebody who worked there or it was close to the track so perhaps somebody had died on the way. But it was really poignant."

As another of the tales in Trains And Lovers shows, McCall Smith is very aware of the melancholy affairs of the heart can bring.

"Romance is what makes life bearable for many people," he reflects, from a fireside chair beneath a magnificent classical oil painting.

"For many it's the most exciting moment of their lives when they realise they are in love with somebody. It transforms people's worlds. It can make a very mean and limited world much rosier.

"And I think it has all sorts of disappointments. The notion of unrequited love is one of the great themes. I remember going to a wedding years back, and the former girlfriend of the groom was there. I was in conversation with her, and realised what she must be feeling, and I said, 'Are you okay?' And she said, 'Well, I feel as one might expect somebody would at the wedding of the only man I have ever loved or will ever love...'"

Has his own long marriage to Elizabeth, a doctor, with whom he has two daughters, influenced the way he writes?

"I've never thought about that," he replies, less comfortable talking about himself. "Possibly, yes. I suppose I've been very fortunate in that regard, and anybody who's in a happy marriage – not just a marriage, any happy relationship – will be helped to understand the companionship of that. It would be difficult, I would have thought, for a writer to write about that big area of human relations if they'd never experienced a long-term relationship with somebody, if one were something of a hermit or solitary."

One wonders, though, if a respite from other people might not sometimes tempt him, given his astonishing work load. Because the irony is that the Pickwickian cheerfulness of his literary style, and of his own personality, have created working conditions akin to those in a Victorian factory.

Asked how he has found the transition from academic life to internationally acclaimed bestseller, he sounds, for once, serious. "I think I probably wouldn't pretend it's been absolutely straightforward. It isn't, psychologically. There's quite a lot of pressure just in terms of time for things... One's time is entirely taken up with it. So that's quite demanding. I think I need to get a better balance, but it's terribly, terribly difficult to do it because the demands are such. I've got all these publishers. I've got almost 50 publishers throughout the world in various languages."

He shows me his itinerary. It stretches to the end of 2013, with tours in the UK, America, Canada, trips to South Africa and India. Between these and countless book festival events, he has at least four books a year to write. The demands of this level of productivity and publicity are so severe that one is reminded of Charles Dickens. The two couldn't be less alike in many ways, and yet their dedication to their writing and their readers is eerily similar. McCall Smith plainly thrives on meeting his fans, as did Dickens. Indeed, when asked if being a novelist is as satisfying as being a professor, it is this that seems to give him most joy.

"It's probably more satisfying. It's more varied. I'm going into a lot of different worlds. And I do enjoy the contact with the readers, that's actually really very nice. I get great pleasure out of that. We get wonderful letters. Yesterday, a reader in America sent me a fruit cake." He bounds out of his chair to find the cake box and show it to me.

"We get really moving letters," he continues. "Sometimes they're very poignant: people who have lost somebody and who have been helped by Mma Ramotswe. Quite a common letter we get is that they read the book together with a dying spouse. A lot of people write if they've been reading the books while they've been having chemo. That can take a couple of hours of the day, so my secretary Lesley and I have a session every morning and deal with all the correspondence."

The sense of responsibility these letters create is heavy. A question about his childhood, however, quickly changes the mood. Brother to two older sisters, the son of a Scottish father, he was born in 1948 and brought up in Rhodesia, where he was educated at St Patrick's College, an exclusive boys' school. He was always an avid reader, he says, "devouring" Enid Blyton and the Just William stories.

"I remember at the age of about 10, I won some money at a gymkhana. I'd won fifteen and sixpence, and I bought – for seven and sixpence, I think it was – Bertrand Russell's Common Sense And Nuclear Warfare. I knew it was an important book." He chortles.

"And then, of course, most of us as teenagers, if you have bookish interests, you become tremendously pompous about your books. I had a stack of back copies of The Listener, which I was so proud of. And I thought I was tremendously intellectual by reading that.

"At about the age of 16 I got hold of a copy of William Empson's Seven Types Of Ambiguity, which is a book of literary criticism. I thought this was a very important book as well. The father of a friend of my sister's – he was the headmaster of the school, he was interested in those matters – saw this and said he would swap me his copy of Wilbur Smith's When The Lion Feeds for Seven Types Of Ambiguity."

"Tell me you said no," I say.

"No, I said yes!" He can barely speak for laughter. "I was perfectly happy!" And thankfully, despite his punishing work schedule, so he continues to be.

Trains And Lovers is published by Polygon, £9.99