Singer-songwriter Joanna Chapman-Smith was perched on the back rest of the lounge seat, jolted and jostled with each bump in the track as she steadied her hand to pluck the guitar strings.

Her voice never wavered, though, as the train lurched around bends and passengers swayed in the economy-class lounge car. She was singing, aptly, Train Song, her lilting melody of uncertain love, while Via Rail's The Canadian sped from Vancouver toward Toronto, dwarfed by the Rockies. "It's like its own little world out here," said Vancouver student Cecilia Lundsten, looking at the dozen or so other passengers fast becoming friends around the music.

The lure of travelling cross-country by rail is the magnificent unfolding landscape, wrapped in the enduring mystique of retracing Canada's history. Along the way, time slows to the speed of long conversations. But Via found that on-board performances provide something more. It quietly organizes a program giving free train fare and meals to professional Canadian musicians travelling long-haul, Vancouver-Toronto or Montreal-Halifax routes in exchange for performing – adding a live, homegrown soundtrack to a quintessentially Canadian trip.

Story continues below advertisement

"I love that they are looking for a Canadian experience for their passengers, especially [since] I consider my music Canadian because of how eclectic it is," Ms. Chapman-Smith said. "So I got a chance to tell them that and just have that mindset going in, that we're all on this train creating a Canadian experience."

Via's program started in 2009 when the Halifax band Gypsophilia travelled to gigs by train and began playing for passengers as paying customers. The next time around, the band arranged with Via to perform in exchange for free passage. The idea caught on.

"It's such a charming place to play music, and it's a captive audience to say the least," said Ross Burns, a guitarist and percussionist with Gypsophilia. "There's not that much space for an audience, in the tens of people for sure. So it is really intimate. You're sitting right there, watching a band do its thing, swinging back and forth with the movement of the train, trying to perch on top of seats with their instruments. There's something romantic and nostalgic having music on the rails."

Via doesn't advertise the program to passengers, apart from a quick mention over the lounge-car speakers before a performance, which are usually three times a day. "Let's call it a surprise and delight, because it's not a scheduled and formal program for every train," said Steve Del Bosco, Via's chief commercial planning officer.

Interested performers apply to Via and must be Canadian; the program is open not just to musicians but to artists who can give workshops and spin entertaining tales about their craft. A travelling performer must appeal to both sides of the Via divide: economy-class, whose passengers are often younger; and first-class with its sleeper cabins and dome cars, which usually attracts people over 35, often much older.

"Once you're on the train, there's a lovely social environment going on," Ms. Chapman-Smith said. "You've got all this time and these people – interesting people who are on an adventure."

Flexibility is key, say musicians who have made the trip. Delays are common as The Canadian has to stop frequently for passing freight trains, which get priority. As a result, mealtimes in the dining car sometimes change, requiring performances to be rescheduled. And tour groups sometimes commandeer a lounge car, forcing the performance venue to change.

Story continues below advertisement

Mae Moore, a singer-songwriter from Pender Island, B.C., who fuses jazz and folk, recalled how once no one showed up when her lounge-car performance was announced. "I thought, okay, well, I'll just play here anyway. And this fellow, he was probably in his 30s and got on at Thunder Bay. He wanted a beer in the bar car. I was playing and he said, "Do you know any Led Zeppelin?" I played him Little Wing, Jimi Hendrix. And then it was great, and he stayed for the rest."

Guitarist David Essig, also from B.C.'s Gulf Islands, cautioned that although it's convenient to take advantage of the train to play various parts of the country, the experience isn't for everyone. "I think it's a good thing for performers who are very experienced at working with audiences," he said. "I would feel kind of bad for a young performer who was on his first or second tour and might be thrown by the fact that people are so close to you. And it's fairly noisy. It's a train."

It's also so casual that the usual decorum for listening to a performer breaks down. With Ms. Chapman-Smith, passengers sometimes whistled and hummed with the song, or talked over it. She turned that into a positive by telling stories and having people sing along. Another negative-positive: As the train's entertainment, performers can feel like the resident celebrity every time they step out of the sleeper cabin. "It's day two. It's Thursday, and I'm tired," Ms. Chapman-Smith said with a laugh halfway through the trip.

As the train rolled into the Prairies, the difference between first-class and economy became more apparent. Some of the first-class passengers who were part of a tour group seemed to view Ms. Chapman-Smith as another perk. Economy-class passengers, who aren't allowed past a certain point in the train, were typically surprised and delighted by the music and were more apt to buy Ms. Chapman-Smith's CDs.

Including economy class in the festivities was "one of the things that we fought for really hard, because when the program first started, it was initially meant to be for the back end of the train [in first class]," said Sarah DeRosa, a senior service service attendant who has worked on the trains for nine years.

As The Canadian wound into its third and then fourth day, through endless rural Ontario, Ms. Chapman-Smith's performances found a pattern: daytime playing for a group of regular attendees and children; pre-dinner songs for retired couples; and tunes later in the night for grateful audiences in economy class.

Story continues below advertisement

Wendy Ainsworth, travelling with her husband from Melbourne, Australia, noted that while looking out the window after a performance at the rocky, green, Group of Seven landscape, "it doesn't matter how beautiful a place is – there are times when you are going past the same scenery for hours on end. So to have something else that gives you another perspective …" She let the sentence trail off and nodded appreciatively at Ms. Chapman-Smith, who was putting away her guitar.