For a time Andy McGregor and his mates thought their band might just make it. “We played support for bands like The Subways, Reverend and The Makers, and Idlewild,” says the former frontman of Blind Pew, the 60s-influenced outfit he formed with mates from Ayrshire in 2000. We were always on the hunt. We even turned down a slot with a new band called the Arctic Monkeys because we thought we were too busy.”

They released an album and a couple of singles and held their breath for a decade or so until, one day, after a record company video shoot in London that never saw the light of day, they realised the hunt was over.

“We spent 10 years in the band, signed a deal when we were 27 with an independent label. They promised us the world then it all went wrong.”

Some might say the road to nowhere is a well-trodden path but for Andy the years of toil in Blind Pew have ultimately delivered him to an unexpected destination of creative fulfilment.

Next month, the Largs-raised composer, writer and director will bring the curtain up on Battery Park, a play he has written about a Britpop-era, Greenock band edging on a breakthrough for years.

He didn’t need to look too far for the germ of inspiration. “The idea has been with me for many years,” says the 42 year old. “It’s loosely based on my own experience of being in a rock band that, ultimately, failed.”

They weren’t alone. In the 1990s a band from the Inverclyde town owned the most fleeting of moments in a national spotlight that, for a second in 1994, might just have fired them into the same machine that propelled Oasis into the stratosphere and, in the fullness of time, turned the term Britpop from a casual comment into a globally recognised movement.

Whiteout, originally comprising Greenock boys Paul Carroll, Eric Lindsay, Andrew Caldwell and Stuart Smith, had a working class swagger, wore their fringes low and shaggy, with double denim and 70s sandshoes. Many a 40-something Greenockian’s vinyl collection still includes a cherished copy of the band’s LP Bite It, but the Britpop wave ultimately left Whiteout on the shore down on the lower Clyde.

The similarities between the Whiteout story and the band in McGregor’s play are remarkable.

“A number of people have asked us if this is based on Whiteout,” says McGregor, acknowledging the parallels. “It’s not. I’m a wee bit young for the start of Britpop, to be honest.”

Battery Park are, instead, a fictional band featuring two working class Greenock brothers and fronted by a private schoolgirl, the latter inspired by McGregor’s time teaching music in St Columba’s, the fee-paying school in the village of Kilmacolm.

“That gave me insight into a world I didn’t know,” he says. “It’s not like the private school girl is the villain, it’s not set up like that. But she has a little bit more belief in herself and ends up being successful.”

In an echo of Whiteout’s famously destructive former co-headliners, the band’s contrasting sibling dynamic leads to them becoming the “masters of their own destruction”.

McGregor says: “What’s exciting for me is it’s actual musos on stage. The characters on stage, as characters in the band Battery Park, pick up the instruments and play as a band. So it feels like a gig, as well as a play, and a story people hopefully think is funny and relatable. Maybe even a bit sad.”

The nuance goes beyond one band’s dreams in the dust. Battery Park shines a light on class, small town aspiration and even Brexit.

“Years ago I saw a play called Small Town, written by DC Jackson, Douglas Maxwell and Johnny McKnight. They all came from small towns. I remember realising I hadn’t seen my Scotland represented in theatre until I saw that play,” says McGregor, whose production company Sleeping Warrior is named for the Isle of Arran’s mountainous optical illusion, which McGregor grew up looking at.

“Small town Scotland has everything to do with it and some of the attitudes of some people in small town Scotland.

“There’s a character who wants to write for the NME. And there’s that question: ‘How is that possible, how does somebody from Greenock write for the NME?’

“The guy who was the guitarist in my band worked night shift, day shift, back shift at IBM, changing all the time.

“A lifetime of that can destroy you. Class is a big part of the story and how it affects your attitude to everything, particularly when you’re younger.”

Battery Park opens at the Beacon Arts Centre, Greenock on September 22 & 23; touring to Glasgow, Dundee, Ayr, Bathgate, St Andrews, Perth, Cumbernauld, Livingstone, New Galloway, Edinburgh and Inverness.