“Look at the size of it,” says actor Sandy Grierson in the top-floor rehearsal room of the Citizens Theatre in Glasgow after dropping a telephone directory-size document onto the floor with a thump. Grierson is in the midst of the massive undertaking of bringing Alasdair Gray's epic novel, Lanark, to the Edinburgh International Festival stage in a new dramatisation by David Greig, contained in the script which Grierson has just sent on a downward trajectory.

Under the guidance of director Graham Eatough, and in the shadow of a city which has been reimagined enormously since Gray first mythologised it as a grim dystopia he called Unthank, Grierson and a cast of largely familiar faces from Scotland's acting scene have just been running through the play's opening moments.

Grierson plays Lanark's eponymous hero who, on arriving in Unthank with no memory of his past and unaware of who he is, embarks on a voyage of discovery en route to becoming an artist in a collapsing society. Spread out over four books that move between magical realist future fiction and more familiar social realist terrain, and written over 30 years, Gray's book is a kind of imagined autobiography that charts his own struggles to be an artist as well as an ever-changing post-Second World War Glasgow.

Such a description doesn't even come close to summing up the sheer scale and vision of what is now regarded as a postmodern masterpiece. For something like Lanark to come out of Glasgow at all was considered startling to some at the time. To take it off the page and bring it to flesh-and-blood life is something else again.

“There's this idea of a life,” says Greig, still tweaking the script as he goes. “It's a big book, but underneath it all it's a life story, and it's partly a fictional life story, but it's also got a great deal in it of the life of this very particular artist called Alasdair Gray and the times he was living through.

"So there's a very human story at its heart, partly because of the autobiographical element, although it's by no means a normal autobiography, but this story of someone who is an artist in Glasgow and their struggles to find their place in the world is really important. Instead of it being like when the book first came out and people wondering what on earth it was, we've got some time and distance from it now, and there is a sense of it being a complete piece.”

Like Greig, Eatough first read Gray's novel more than 20 years ago. “I first read it in about 1990 or 1991 when I first came to Scotland,” he says, “and it was a really massive book for me. It tied in with the whole magic realist movement in literature that we were interested in at uni. Salman Rushdie's Midnight's Children came out the same year as Lanark, and we were reading Italo Calvino and people like that. At the same time it had this big emotional resonance, because I was moving to Glasgow, and Lanark did act as a bit of a weird emotional guidebook to the city.”

With such a sprawl of material to contend with, the novel's sub-title, 'A Life in Four Books,' has been rendered here as 'A Life in Three Acts'.

“Because it's a whole life,” explains Eatough, “we've had to find an appropriate theatrical language, which is a bit more narrated. Ironically, the realistic bit, which makes up the second act, has felt like the more adventurous process in terms of how we tell that story, whereas the fantasy bits are more scene-based and straight-ahead. It's a very odd book. It's very awkward and full of contradictions, and the main character in it isn't a massively likeable character. He's angular, and he keeps getting things wrong, and it's interesting to explore how you get that over on the stage.”

While Lanark is a co-production between the Citizens and EIF, it is also notable for reuniting the core artistic team of Suspect Culture, the theatre company formed by Greig, Eatough and composer Nick Powell while at Bristol University. Relocating to Glasgow, Suspect Culture went on to become one of the most significant companies of the 1990s and early noughties with defining works such as Timeless, which premiered at EIF in 1997.

As with that show, music plays a significant part in Lanark, with Powell, no stranger to the alt-pop scene from his tenures in Strangelove and the Blue Aeroplanes, drafting in a disparate array of contemporary talent for his soundtrack. String players Lucy Wilkins and Sarah Wilson are long-time associates of Powell, both with his band Oskar and with Suspect Culture dating right back to the live soundtracks for Timeless and Candide 2000. While Wilson has worked with Belle And Sebastian, Wilkins played with Brian Ferry and Roxy Music, and both have toured with noir-based moodists Tindersticks. Also involved in Lanark are Nick McCarthy of Franz Ferdinand and saxophone player Ted Milton of punk/jazz trio Blurt.

“I'm trying to approach the soundtrack a bit differently to how I'd normally do something,” Powell says, “and I thought I'd bring in specific people to work separately on it. The book's such a sprawling, eclectic postmodern monster that it invites that, so now the music feels like more of a collage than a coherent soundtrack from one brain.

“Because the book was written over 30 years, it's got a very specific set of vibes to it in different parts. Unthank when you first see it is this nightmarish version of a beatnik cafe, so Ted did something really atonal for that, then you've got this 1960s retro sci-fi thing going on like something from the BBC Radiophonic Workshop, and then a Prog thing and a dirty guitar sort of atmosphere, so there's all these contradictions going on.”

Given Franz Ferdinand's connections with Glasgow School of Art, where both Gray and his alter-ego in Lanark studied, McCarthy's presence is crucial.

“Franz Ferdinand know Alasdair,” says Powell, “and they happen to be managed by the old manager of Strangelove, so it all seemed to fit. Nick and I ended up spending two days in the studio with all these analogue synths, and we came up with something very different from what I would've done on my own. We went a bit Kraftwerk with it all.”

Greig and Eatough's take on Lanark isn't the first time Gray's novel has been staged at EIF. In 1995, the Citizens' Theatre's theatre in education wing, TAG, presented a version by Alastair Cording seen in a production by TAG's then artistic director Tony Graham.

The roots of this new version stem from Eatough's ongoing collaborations with visual artists, including Scotland's current representative at this year's Venice Biennale, Graham Fagen. Eatough came into contact with curator Sorcha Dallas, who represents Gray and heads up the Alasdair Gray Foundation. Dallas was in the midst of putting together the extensive programme of Gray's artwork to tie in with his eightieth birthday, and which featured a series of major exhibitions in Glasgow, including shows at Kelvingrove Museum, GOMA and Glasgow School of Art.

“We were talking about how there could be a theatre element to this,” Eatough says, “and I foolishly said that to have a go at Lanark would be like the holy grail of Alasdair's work.”

Eatough met Gray, who was enthusiastic enough to give the project his blessing. With Greig on board, the pair approached the Citizens Theatre's artistic director Dominic Hill to see if they would be interested in taking on what Eatough describes as a collaborative adaptation.

“The Citizens seemed like an ideal home for it,” he says, “partly to do with the scale of the piece, but also because of its history and the cultural role it has played in the city. It's a place I know Alasdair feels an affinity with, and also since Dominic came in, its approach to storytelling, putting on big stories with epic sweeps of narrative, also seemed to fit.”

With EIF also coming on board, 34 years after it was first published, Lanark might just have found its time.

“The importance of it now,” says Greig, “is to do with Alasdair's eightieth birthday and everything that's come out of that, but one thing we have noticed going through the book is that there is a contemporary resonance in every bit of it. There's a bit in the book which has just ended up as one line in our version, really, but which speaks of protesters on the cathedral steps protesting against the capitalist machine.

“On the other side of it, there's a lot going on that makes you think more emotionally about things. It might take 40 years for a book to become itself, and to separate itself from the surprise that it existed at all, but it does seem to have that very human core to it that speaks beyond its moment.”

Lanark is at the Royal Lyceum Theatre, Edinburgh from August 22-31 (not 26), various times, www.eif.co.uk/lanark; and the Citizens Theatre, Glasgow from August 14-17 and September 3-19, www.citz.co.uk