A proper stage play by Irvine Welsh?

James Christopher anticipates a shot in the arm for theatre-goers

There can be few more transparent conspiracies than the union of the wild man of Edinburgh letters, Irvine Welsh, and the ex-Traverse theatre director Ian Brown. One is steeped in the ways of Edinburgh's council schemes, football casuals and drugs. The other personifies "cutting edge" theatre. They have joined forces to stage Welsh's first proper stage play, You'll Have Had Your Hole, at the West Yorkshire Playhouse.

Why, you wonder, does Welsh bother with the impoverished world of theatre? From his books, and the film of his novel Trainspotting, he never has to pick up a Biro again.

Yet, for someone yet to see his first play staged, Welsh already has a colourful theatrical record. The stage version of Trainspotting is still touring the world. A dramatisation of Marabou Stork Nightmares, Welsh's third book, lasted until 10 minutes into opening night, when the actor playing the protagonist lost his voice. And a performance piece, Headstate, that Welsh developed at the Edinburgh Festival with Boilerhouse TC was closed by Greenwich Council before it even had a chance to open, for flaky reasons that had more to do with drugs hype than fire regulations.

Welsh's work translates to theatre and film with surprising ease, as shown by the success of Trainspotting. Once you attune to the Edinburgh patois, it's hard to forget his prose, as spoken and thought by some of the most unsavoury characters in British literature, and the aspirations of a group of working-class Edinburgh schemies can be as luridly exposed on screen as they are on the page.

Welsh argues that, after the screenplays, the novels, the poetry and that bizarre sheaf of short stories The Acid House, a conventional stage play was only a matter of time. Perhaps. It appears to have been Ian Brown who asked Welsh to write a play - and three years later, Welsh called to say he'd finished it.

Now they're sitting opposite me in the canteen at the West Yorkshire Playhouse, forking curry, an oddly matched couple with a common fascination with the extremes of human behaviour. If Brown has cultivated his interests a little more circumspectly than Welsh, it is not for want of trying. His productions of the Canadian playwright Brad Fraser's Unidentified Human Remains and The True Nature of Love, and Poor Super Man at the Traverse and Hampstead theatres, revealed a demonic taste for modern Jacobean nightmares.

Welsh is tall, lanky, with a cherubic face buttonholed by round, blue eyes; Brown is Mr Urbane, smooth, stylish, with a neat haircut. They are surprisingly good company. Welsh even manages to procure a strong prescription drug for me to sort out a force 10 migraine. He passes it, fist to fist, at the end of the interview and says, "Mind, only have a couple eh pints." I feel as if I've just scored a tab from Timothy Leary.

Pat though it may sound, it's the team thing that Welsh finds beguiling about scripts. As he wrote recently, "Success is only something you can value if it's shared", and "Playing God [writing novels] can be a lonely business".

Perhaps only Welsh could have given that Morningside phrase "You'll have had your tea" from Muriel Spark's The Prime of Miss Jean Brodie the sardonic spin of the title of his new play You'll Have Had Your Hole. "The phrase seeped into Glasgow culture as a way of satirising the meanness and snobbishness of Edinburgh," says Welsh in his po-faced Edinburgh brogue. "The idea that you've arrived somewhere and you're expected to have fed yourself already."

Welsh's play, however, has little to do with sending up stingy old ladies with social pretensions. Set in a deserted, sound-proof music studio, it revolves around two young amphetamine-addled henchmen who kidnap, string up and torture an acquaintance. There is a vintage Welsh ending for those worried about the loss of form shown in the author's 1996 novel, Ecstasy.

"It's about an old score being settled," says Brown. "It's a bit of rough justice, skewed by the fact that they get more involved than they intended to. There's not much future left for the two jailers, so they don't have much to lose."

On the page, it reads like an old-fashioned revenge tragedy with a large dose of black comedy. People underestimate Welsh's sense of humour. They get dazzled by the horrific plot twists and miss the bathos. In Trainspotting, it's the "reformed" heroin addict panning the shit in a blocked toilet bowl for the methadone suppositories he's excreted. In The Granton Star Cause, it's the unfortunate Boab being turned into a large fly by God for no better reason than that he's "a lazy, apathetic, slovenly cunt". In You'll Have Had Your Hole, it is the peculiar code of honour under which everyone operates.

"There's a moral heart to the play," says Brown.

"There's got to be, really," says Welsh. "Now society has become so diverse, so has morality. Everyone is accountable. But people work out their own, depending on how society and culture shape them."

"If the Boy Scouts had got to them when they were kids, they'd have ended up as social workers," says Brown. "But a chance meeting with gangsters sucked them into a whole different process."

Brown has seen this kind of scenario before, notably with Brad Fraser's plays. "I do gravitate to stuff where I can get hold of the nub of a particular problem, regardless of whether people say it's shock-horror or not," he says. "There's a side of me that's drawn to the dark ... Good drama comes out of people in extremis. There's a lot of power in characters being in the middle of something terrifying."

Are they the same kind of characters who populate Trainspotting?

"They're roughly from the same background," says Welsh, "but the Trainspotting characters are mostly innocents. They don't really understand what kind of situations they get themselves in by taking drugs. This crew know what that subculture is all about."

For Brown, the challenge is tapping into that subculture and exposing Welsh's enormous non-theatrical audience to an experience he thinks they are actively denied. I ask Welsh whether he wanted to prove that he could do it. "I think I wrote it because I hadn't written a play before, rather than to prove something to myself ... Plays are a lot easier than novels. Novels are for control freaks. They're harder to road-test and there's a lot more writing. Scripts, however, are ... part of a process where you hand the responsibility on. I don't feel I've got to write another, but then again I don't feel I've got to write another book or film script either."

Needless to say, there is one of each due out this summer.

`You'll Have Had Your Hole': previews from 19 February, opens 24 February and continues to 21 March, at West Yorkshire Playhouse, Quarry Hill, Leeds (0113 213 7700)