We have a video of our granddaughter, aged nine, dwarfed on a big stage as she played the violin in front of 200 parents, pupils and teachers.

It was her school’s Christmas concert and, at short notice, she had volunteered to stand in for an older pupil who had pulled out. She had only been playing the violin for a few months and although her performance – Jingle Bells – wasn’t tonally perfect, it was nevertheless impressive. Keeping perfect rhythm, she showed astonishing composure under pressure. I like to think Aly Bain would have applauded.

This is a child who enjoys music. She has had private piano lessons since she was six, and when the chance came to learn the violin free at school, she was one of the first to apply. Now, she is in a weekly class of 40, of varying ages and abilities.

She is one of the lucky ones. Her Edinburgh school recognises the importance of music, and allows it space on the curriculum. As Sir James MacMillan has highlighted, though, this is by no means universal. Recently, the composer has railed against the dwindling number of music teachers across Scotland’s primary schools. In 2008 there were 98; today there are 40, spread between 32 local authorities. When you think of the number of schools, classes and pupils each of these teachers is meant to reach, that number is beyond woeful. I have seen caviar spread more thickly.

Even back in 2008 provision was meagre, but today’s figures are shocking. The number of primary teachers for whom music is their main subject is at an all-time low, and MacMillan calls the situation nothing less than a national scandal: “Children will not be given the grounding in notation and basic practical skills in primary school, so teachers have to start from scratch in secondary. This will mean Scottish youngsters are missing out on the vital musical, cultural and learning experiences that kids in similar countries, like England, are receiving.” As a result, he says, it’s already becoming obvious that children from state schools are finding it harder “to reach the required standards to gain entry into our own Royal Conservatoire of Scotland”.

If things continue as they are, then there’s little chance of the next Nicola Benedetti coming from a state school. She, like MacMillan, has been a vocal critic of local authorities’ funding cuts for music in schools. Defenders of the education system are eager to point to the increase in music teachers at secondary level – 990 last year, a rise of over 100 since 2008. Yet while this is undoubtedly good news, it cannot compensate those whose first seven years in class have left them musically illiterate. Of course it is possible to pick up an instrument or start singing at the age of 12 or 13 and to excel, but musicians who defy the odds after a late start are exceptional.

Read more by Rosemary Goring: Live classical music is under threat as never before

What needs to be addressed is the situation of the vast majority, for whom music barely features, if at all, in their school week. Forgive me for harping on about a similar subject as in a recent column, when I spoke about the threat to funding for orchestras and choirs. The link, however, is too obvious to ignore. As for those in the music profession, so in the education system: music is a soft target when money is tight. It always has been. One of my relatives, who was a peripatetic music teacher in various primary schools until a few years ago, lived in a constant state of uncertainty. Whenever the annual budget was allocated, she feared she could hear the axe being whetted. Each time her contract was renewed for a further 12 months she felt she had had a stay of execution.

At primary level, music is not a core subject, so for many bean counters its importance is seen as negligible. Presumably they console themselves – if they think about it at all – that children keen to learn an instrument can get private lessons. Consequently, the attainment gap widens, deepening the gulf between those whose families can afford extra-curricular lessons and those who cannot even pay their utility bills.

For people able to fund private lessons it is a virtuous cycle, because the benefits of music to a young person’s intellectual and emotional maturity are well-documented. According to experts, the positive effects of learning a musical instrument spill out into every area of a child’s academic and social development.

This being so, why is music not given a secure – indeed central - place in the primary curriculum? What other subject has such a transformative effect it will benefit the school’s reputation as well as enhancing each pupil’s life? How, in short, can providing music lessons for all not be seen as money exceedingly well spent?

MacMillan was concerned about pupils falling behind their international peers, which is certainly a serious consideration. Catching children’s interest while they’re young will indubitably help solve that particular problem. But there is a wider issue here, which has nothing to do with world-class attainments or other objective measures of success. This is the importance of bringing music into children’s lives at a point where they can enjoy it without any thought of being examined or judged. Music teachers will tell you that almost without exception children respond automatically to music. All of us, it seems, are built to respond to beat and sound, and to want to join in, if only to dance.

Read more by Rosemary Goring: I want to do No Mow May I really do – but it’s not that simple

One teacher I know has spoken of the pleasure of taking a class of primary-age kids, watching their enjoyment in making music, and forgetting they are in school. The knock-on effect of doing something so far removed from the usual academic subjects, and where you are encouraged to enjoy and express yourself, is incalculable. As Benedetti has said, “music, if taught well, is something that has quite a unique type of power within education”.

The thrill of picking out a melody for the first time on a guitar, or putting both hands together at the piano makes the educational advantages of such achievements – concentration, skill, creativity and confidence among them – almost irrelevant. Yet they are not irrelevant. Everything is connected. This is a message those in charge of allocating primary school music budgets need drummed into them.