Stuart David is meeting me in a cafe in Kilmarnock.

Such a small thing, you'd think. Such a huge thing, he says. He has travelled some 25 miles north from his home to be here. That's a long way when you haven't really been anywhere for a long time. "This is the first thing I've done that isn't to see family or the dentist," he says. "This is a big event really."

"I feel honoured," I tell him. He smiles. His eyes are watery, his beard scratchy.

We're here to talk about his new book In The All-Night Cafe, his memoir of the early days of his former band Belle and Sebastian and a new album and a box set collection of the work of his current band Looper. And we do. But in truth all of these things are bound up in what he has been going through for the last decade.

Since 2006 or thereabouts David has been suffering from chronic fatigue. He couldn't go out much. He suffered from severe muscle pain and so couldn't sit at a desk or play an instrument. At one point every time he opened his computer he would vomit. "It's just your brain has got into the habit of connecting these two things. You think if you go onto your computer you're in danger. It's just a misfiring signal."

Even misfires inflict damage though. "About three years ago it got to the point where I couldn't handle it anymore and I had a bit of a breakdown. You just don't have any sense of yourself any more."

Life stopped in a way. Time slowed. And David found himself living in the past, remembering how things were. The flat he owned in Glasgow with his wife Karn was on the market but they couldn't sell it so for a period he would drive there each day. "I couldn't really do much but that's where I started doing the memoir. I'd just go there and write for about an hour every day and then drive home again."

The memoir then was a form of therapy. "I was just reminiscing about back when I was well. I was living back in the past essentially. I think that's what all this has come out of."

The result of those hours in the Glasgow flat is an anti rock 'n' roll memoir in a way. It is about the first year of Belle and Sebastian. How David met Belle and Sebastian's songwriter Stuart Murdoch on a Training for Work scheme called Beatbox, at a music studio based in a business park in Finnieston, how they joined up and how a record, Tiger Milk, emerged.

It's a sweet, simple account of a vanished world, even if it's only 20 years or so ago. A pre-internet world of DSS schemes and mooching about in cafes and the pure chance involved in how a band comes together. "It was something I intended to do for at least ten years before I did it. I just always had this feeling that that part of the story had never been told. And I only recently realised that was because when we first emerged there was that thing of 'no interviews'. Really, this is the story that would have been told in those interviews. I felt it needed to be documented and a lot of people who were in the first band needed some credit for the part they played in the story."

What emerges is the story of two Stuarts, one who was about to find himself and another who hadn't realised he still hadn't.

"It was a really strange experience because we were both in exactly the same position. We were just friends on this course and I was a wee bit further along than Stuart because I already had my own band."

What dazzles David, thinking back, is the speed with which that all changed. "He'd had no band and hadn't been well six months earlier. Suddenly he managed to do in six months what I'd spent 10 years trying to do."

Who was the young man David was then, I ask him? "Deluded certainly that if you believe in this enough it will happen. It did happen, but looking back now I think the chances that I did get anywhere were really slim. So I was deluded to the point of being crazy, I think."

That delusion was fuelled by Duran Duran of all bands, he says. He was a teenage fan. And the grown-up David was thrilled to learn he was sharing an editor with John Taylor. He even got to meet the man.

I'm a bit staggered when he drops the name. The distance between Belle and Sebastian and Duran seems huge. "People have been saying that, but for me that was like one of the defining moments of my life because when I decided to do music when I was 14 it was purely because I wanted to be John Taylor. So to meet John Taylor ... It just kind of messed my head up in a way."

David formed Looper with his wife Karn in 1997 and it eventually transformed into a four-piece band. Always envious of Murdoch's gift for melody, David found his own voice in a mash-up of spoken word and sampled loops. Soon their track Mondo 77 was finding its way onto the soundtrack of Hollywood movies and being licensed for adverts. "We had a day of fame some years ago where this story was in all the tabloids that we had made half a million. It wasn't what was reported. I think we were making about £8000 each a year."

Looper's back catalogue is now being re-released on Daniel Miller's Mute label with liner notes from superfan Tim Burgess of Charlatans fame. That in itself has given David newfound self-belief.

"I think the box set coupled with Tim Burgess sleeve notes is maybe the first time I've felt validation," David says. "The fact that Daniel Miller has put a stamp of approval on the whole catalogue has made me essentially realise what I've been doing. I started out with a love of synthpop, but I wanted to apply the indie filter to synthpop rather than to the Beach Boys or the Byrds, which is the usual Scottish thing to do."

Now he's forging ahead. Even when he was ill music - like writing - was an escape route. "When I was going up to the flat every day ... At that point I thought 'I can't even stay alive any more. I can't take this illness any more'. I was in bed thinking I can't get up. Then I remembered I'd made this wee riff in the flat and I thought that was worth getting up for.

It was. He's thrilled by the new album. "I'm really pleased with it and really amazed that it doesn't sound like an ill person."

Stuart David has not been well, but he's getting better. Stuart David is making music and writing a series of teenage books. And Stuart David is leaving the house. Who can say which is the greater achievement?

In The All-Night Cafe by Stuart David is published by Little,Brown, priced £16.99. A five-CD box set These Things comes out on April 13, including new album Offgrid: Offline. He is appearing at Waterstones Edinburgh West End on Thursday. (Tickets £5/£3 phone 0843 290 8313) at 7pm and Waterstones Glasgow, Sauchiehall Street on Friday at 6pm. (Tickets £5/3 tel 0141 332 9105.)