LIAM O'Rafferty was happily minding his own business when the muse snuck up on him in a deserted Wyvern Theatre four years ago.

What she whispered though was not the dulcet notes of a sweet ballad or specks of an epic tale, not even the beginnings of one come to that.

Instead the design agency boss found himself picturing a bookshop, dressing every inch of the stage with rows of shelves heaving under the weight leather-bound volumes. Then Belle from Disney's Beauty and the Beast rather unexpectedly cropped up in his mind's eye, diving from a ladder reaching down for a novel. Days later, he had sketched the plot for Paper Hearts, a heart-warming musical which after months of single-minded work, endless rewrites and sheer pigheadedness in the face of rejection, will finally premiere at the Edinburgh Fringe Festival next month.

How is that for an origins story?

"We were preparing the theatre for a conference and we were setting up, putting up the screens, hanging banners - that's when I got the idea, I saw this bookshop. I thought, 'I've never seen a musical set in a bookshop'," recalls the 52-year-old from Old Town, who once toured as duo The Third Man with local guitarist Bob Bowles. "I decided there and then that I would write a musical, the book, script, music and lyrics. No-one in their right mind should attempt this, it is incredibly hard.

"Growing up I loved musicals with catchy songs, like the Sound of Music and My Fair Lady. I really wanted to bring back that old style in a contemporary way. "

Undaunted, the father-of-one took to his bedroom cum makeshift studio and devoted every spare moment to producing an eclectic blend of rousing numbers across genres.

"Musicals are so difficult to crack,” adds Liam, who runs Red Rocket Graphic Design on Cricklade Street. “You want people to still be humming the tunes when they leave. They have to be able to relate to the songs. A lot of people just think a musical has to be one style of music. But we’ve got Russian folk, a rock gospel number; all these styles reflect what's going on in the story and the emotions."

The weeks and months of tireless toil were nothing compared to the mammoth task of persuading top brass directors and producers to take a chance on an unknown first-time musical writer pushing 50.

"No-one took me seriously," he admits. "I had not been to one of the London academies, I didn't know anyone. There were a lot of setbacks."

He recruited professionals to showcase some of the feature songs at various low-key events at a bookshop in Devizes and in Swindon but failed to draw interest or funding for a full-scale production. Chance smiled on him at last in November, when he crossed path with straight-talking director Tania Azevedo. Not one to pussyfoot, during an introductory powwow, she complimented his songwriting only to hand him a well-thumbed copy of How to Write a Musical (which incidentally Liam owned but had not got round to reading) urging him to polish the script. Far from peeved, he studiously heeded her advice.

Four months later, he had a solid setlist of 13 numbers, stage-worthy script, committed director on board, secured a musical director and prime venue, The Underbelly, at the Edinburgh Festival.

Set in a high street bookshop, the uplifting musical comedy follows assistant Atticus Smith, a gifted but hopelessly work-shy writer who lives vicariously through his plucky characters' tribulations – a pair of Russians caught the turmoil of 1942 Stalingrad - until the arrival of the spirited Lilly to whom he takes an instant dislike. The feeling is mutual. Guided by a contemporary pop-folk score they navigate their relationship while trying to save the store from an aggressive takeover. In a parallel plotline, Atticus's creations Isaak and Yanna embark on a perilous journey to seek revenge and reparation for past wrongs.

Any suggestion these interweaving plots may be a tad convoluted for light entertainment is promptly dismissed by Liam as nonsense.

"People can sometimes treat audiences like idiots, think they can't handle too much detail or complex plotlines. If you engage audiences, you've got them."

Auditioning hordes of fledgling actors was a learning curve for the effusive artist; thankfully, a few emotional outbursts aside, he by and large nailed the poker face.

"It was incredible we had about 300 people auditioning for Lilly alone and 850 people came for the parts," he says, still incredulous. "It was like the X Factor. We sat at a big table. We would give each other the look if there were in or not. Because I was new to this world I had to learn the etiquette, how to behave and how to shut up," he adds with a deep belly laugh. "Someone started doing their song once and I started singing along. I was told to shut up. When we did the recall I heard someone practicing, she was singing Angel Star. I had never heard my song sung before. I started blubbing. Tania just said, 'Hold it together'. It feels like the songs are your children, but they've got to go off to school and somebody else has to look after them and that's when the actors get hold of them."

But taking a production to the Fringe for close to a month does not come cheap. Aside for a Kickstarter campaign to raise £1,000, Liam has had to cover most of the £30,000 outlay out of his own pocket.

Yet this is a small financial sacrifice to see Paper Hearts finally take flight in front of thousands and hopefully catch the eye of a West End producer.

"I'm nervous, scared, excited," he says with a timid smile. "My biggest worry is how many bums I'm going to get on seats. People say that when you're older you dry up, there’s nothing left for you to do. But I've done this very late in life. It can't stop now."

To find out more about Paper Hearts go to www.paperheartsmusical.com.