There's a song about a bar on Hugh Moffatt's latest album, Only Along for the Ride that the Texan singer-songwriter frequented during his early days in Nashville.

Every character and every scene depicted in this rough and ready establishment are true to life.

It's some way from Shakespeare, whom Moffatt cites as his favourite example of a successful commercial writer; it's even further in social terms from the Dayton Opera house, where Moffatt has had one of several libretti performed. But whether you're writing dramas, operas or songs about a bar where you're liable to end up in a fight, Moffatt says, you have to write for your audience.

"You might start writing because you have something you want to say," says Moffatt down the line from Nashville, which has been his home town off and on since he arrived on a Greyhound bus en route to Washington, DC, in the early 1970s, decided to stay a week and ended up a resident. "But you have to make sure that people understand you, and that's where crafting a song - or any form of writing - is important."

Moffatt knows a thing or two about the songwriter's art. He's had songs covered by Dolly Parton, Jerry Lee Lewis and Merle Haggard. And his Rose of My Heart, which he wrote in the early 1980s and which was memorably recorded by Nicolette Larson not long afterwards, featured in a striking reading by Johnny Cash on Volume V of the American Recordings series that brought the Man in Black enhanced hero status among a new audience in his final years.

The Moffatt household in Fort Worth was always full of music. Although his parents weren't musical, they were big music fans and Hugh and his younger sister, Katy, grew up to a soundtrack of classical, opera, big band, jazz and pop music. Moffatt played trumpet in the school band but it was when Katy, now a successful singer-songwriter who tours the UK frequently, got a new, better guitar and Hugh inherited her old one that he began to get interested in playing music as a career.

After playing in blues bands at college he decided that he needed to play solo because in bands, he realised, it was too easy to hide behind the other guys and he wasn't learning how to communicate with an audience. Going solo turned out to be a masterstroke.

"By then I was living in Austin, Texas and I'd got into country music," he says. "All the other solo singer-guitarists were playing folk or blues or singer-songwriter stuff and all the country musicians played in bands. So if a bar or venue wanted country music, they had to hire a band - until I came along, and I did pretty well. I was working as a cook by day but I could get gigs six, seven nights a week because I was the only solo country singer."

Arriving in Nashville on a stopover on his way to visit friends in Washington, he found he could get work in bars such as the aforementioned song subject, Tiger's, and top up his earnings in kitchens or doing construction work while he waited for a break as a songwriter.

"The theory is that, in Nashville, you pitch a song to a publisher who gets it to a producer who in turn plays it to the artist and they record it," he says. "That's only ever happened to me once, when Alabama recorded Words at Twenty Paces. With Old Flames, which Joe Sun covered before Dolly Parton picked it up, I was playing at a wedding and this record producer just happened to be there, heard it and liked it. So luck plays a big part in success."

In the mid-1990s, Moffatt's luck ran out. An expensive divorce cost him everything he had and although he had a strong back catalogue, his income from songwriting had dipped considerably.

With a new, young family to support, he took a job with a company that specialises in making electrical power safer, more reliable and more economical all over the world and stayed on for 15 years. He left at the end of last year to pursue a Master of Fine Arts in Writing degree, with the focus on play-writing and screenplays, and to get back to performing live.

"Playing to people has always been an integral part of writing for me," he says. "I love it and to look out and see people looking at each other and connecting with a certain line or meeting them afterwards when they buy a CD on the strength of what they've just heard, that's a great feeling. That's when you know you're doing something right."

Hugh Moffatt plays The Royal Oak, Edinburgh, on Thursday February 20 and St Paul's Church Hall, Rothesay, on Saturday, February 22.