IN THE Great Hall at Stirling Castle, one of the wooden portraits peering down from the ceiling has a discreet halo of zeros, ones and twos. When the carving was restored in the late 1990s it was hailed as the earliest surviving instrumental notation in Scotland – binary code for the kind of harp music that might have entertained James V and his 16th century court. But was it strictly a tune? Those cryptic numbers probably represent a bass line above which musicians would have improvised: in other words, the melody was up for discussion but the bass line was worth carving for posterity.

This wasn’t a uniquely Scottish thing. 16th Spain was mad for the sultry swing of the chaconne – a triple time bass pattern above which songs and dances and swirling virtuosic variations were spun and spun. Flamenco guitarists looped the sorrowful four-note riff of laments and the Italians had their passamezzos and folias. Or think of Bach’s Goldberg Variations: maybe you can hum the melody of the opening Aria, but can you hum the bass line? Me neither, which doesn’t seem quite fair given that’s what provides the framework for the 30 miraculous variations that follow.

Maybe I’m starting with the wrong question here, and should really be asking what constitutes a tune at all. According to a recent Glasgow University research project, that mysterious Stirling Head hints at the cultural clout traditional Scottish music once bestowed on music’s lower parts but has long since lost. Now it’s generally the top lines – fiddle tunes, pipe tunes, songs – that are sanctified in tune books, but for the past three years a study called Bass Culture has been looking into the heritage of what went on down below. For the project’s principal investigator David McGuinness, this has has been something of a lifelong preoccupation.

It began as teenager. “I was playing keyboard in ceilidh bands and wondering why the fiddle players got the tradition bit while the stuff we did underneath was a bit of a free-for-all,” he tells me, sipping at a cup of tea on Crow Road. He admits that the the free-for-all didn’t always yield the most creative results. “Not having strictures often makes your playing less interesting because you end up falling back into comfort zones when you’re not being pushed out of them.” To the mild alarm of our fellow cafe customers he starts to mime and sing, not-very-politely imitating a classic Scottish country dance band um-cha vamping style.

But then, I say "classic" because that’s what we’ve come to expect over the past 70 years or so. “The um-cha only hit Scotland’s dance floors in the 1930s,” says McGuinness, “when keyboardists shifted their beat sideways from the kind of chunky four-on-the-floor chordal stuff you’d get in 1920s pop music, or indeed in a Robert Mackintosh strathspey printed in London in 1803.” Four-beat bass lines seem to have been characteristically Scottish, too. “When you find them in Irish and English publications, they’re always there with the Scottish tunes.”

His investigation isn’t just about whether the chord emphasis goes on the beat or off it. Wind back a couple of decades into the 18th century and something altogether different was going on. For a brief period around 1760-1800 — what McGuinness calls “a window of opportunity when rural art was allowed unmediated into middle class technology” – printed strathspeys and reels featured distinctive independent cello lines.

A similar thing was happening in visual art, he suggests. “You got formal paintings of penny weddings and Niel Gow having his portrait done by Raeburn. For a short spell, someone like Gow” – a master fiddler and composer who had grown up in a humble Perthshire weaving family – “was treated with immense dignity alongside aristocrats. It all falls apart again once you get into the 19th century and the Victorian class system.”

It was all the piano’s fault. “Everything is always the piano’s fault,” McGuinness chuckles. What he means is that piano parts started appearing in printed dance music around 1800, despite the fact pianos didn’t become a regular fixture of dance bands for another 100 years. Why?

“Think about it. If you’re a musician and you need to make money selling your book, who’s gonna buy it? Anyone who can afford a piano can afford a book to put on it.” Musical aesthetics have never been immune to the forces of commodification. With the pianos come thick chords and rich Victorian harmonies, smothering the lither cello lines and laying the foundations for today’s vamping style.

McGuinness and his colleagues have been scouring libraries around Scotland to find more than 300 fiddle books printed before 1850 and have created an online archive of old tunes, with bass lines attached.

“I’m not dumb enough to think that everyone who looks at the website will suddenly start adding cellists to their ceilidh bands,” McGuinness acknowledges. “The day it went live we had fiddlers getting in touch saying they’d already learned a new tune for the pub session that night.” No, he didn’t write back saying they could only play them with the appropriate bass lines or not play them at all.

But to lead by example, McGuinness has released an album of fiddle tunes sourced from music printed between 1761 and 1823 and performed on historical instruments by his ensemble Concerto Caledonia – a folk-meets-early-music troupe comprising fiddlers Lauren MacColl, Shona Mooney, Aaron McGregor and Marie Fielding, violist Mairi Campbell, cellist Alison McGillivray and piper Callum Armstrong. They’ve called the album Nathaniel Gow’s Dance Band after the star 18th century outfit that played Edinburgh society balls around the turn of the 19th century.

What does it sound like? Hearty, spry, exuberant. A tune like Khellum Khallum taa fein, printed by Robert Bremner in 1761, has a stomping four-square bass line. In The Honourable Miss Rollo’s Reel the cello is as athletic and feisty as the fiddles, while in Niel Gow’s Lamentation for Abercarney of 1784 the cello provides a rich and shapely counterpoint to the beautifully solemn fiddle tune. We get four accounts of Invercauld’s Strathspey/Reel/Rant, from a weirdly staunch 1789 version to a smoother take from 1796, already notably more pianistic.

Has McGuinness done himself and his fellow pianists out of a job here? “Nah,” he shrugs. “I’m not interested in telling people how to play, certainly not when it comes to traditional music. That’s the difference between tradition and history: tradition keeps evolving, which is what makes it fun. What I’m interested in is acknowledging that tradition looks at the past in a certain way. The late 18th century was when the Scottish fiddle tradition acquired its identity, and part of that identity came from what was happening at the bottom end. It’s fascinating to explore that, if only because it might change how we shape the top lines.”

As ever with music, there are intriguing social parallels here: who gets the attention in historical narratives, and how subverting a standard perspective shines new light on the stories we thought we knew.

Nathaniel Gow’s Dance Band is out now from