Enter the maze

The doh ray of me

by Peter W McOwan and Paul Curzon, Queen Mary University of London

A monk praying in the dark : copyright www.istockphoto.com 74238125

Sounds often follow musical patterns, the song of a bird, a happy whistle while you are out for a walk, not to mention music itself. We need ways to write down both these natural and composed patterns of sound, to allow us to easily record them for posterity, share them, learn them, and to write new music.

Composers now use special musical notation. It's based on the idea of assigning symbols to notes. We learn a simple version using letters as soon as we first learn a musical instrument, based on the scale C, D, E, F, G, A, B, C. This very human practice of assigning symbols to represent notes on a scale goes back a long, long way.

It all started in ancient India with a process called 'Solmization': assigning syllables to notes. It was then picked up in the sixth century by European monks. They were worried that, as Isidore, the Archbishop of Seville wisely said 'unless sounds are remembered they perish, for they cannot be written down'. To prevent this loss master of music Guido d'Arezzo set to work creating an easy to remember coding language for tunes. A piece of music is, after all, just an algorithm for creating a particular pleasing sound. Follow the steps (play the notes) in the right order, and you recreate the sounds, just as a computer follows the steps of a program to recreate the effect the programmer wanted. Musical notations were early forerunners of computer programs: languages for recording algorithms.

The big hits back in the Middle Ages were Gregorian chants and Guido realised they could be learnt much more easily if the chanters could see the tone progression on a scale, and associate it with the sound. To make this happen he matched syllables with each tone on that C, D, E ... scale we learn today. The result was the now familiar Do, Re, Mi, Fa, Sol, La, Ti, Do code popularised in the song from the film, 'The Sound of Music'.

But where did those syllables come from? Guido cleverly chose to use a popular hymn of the time. Each line started one note up the scale from the previous line. Using this stepladder tune Guido took the first letters of each word in the song and attached them to each line in the tune. The song went UT queant laxis, REsonare fibris: MIre gestorum , FAmuli tuorum: SOLve, polluti, LAbii reatum, Sancte Iohannes (or to you and me: So that your servants may, with loosened voices, resound the wonders of your deeds, clean the guilt from our stained lips, O Saint John). That is how Ut, Re, Mi, Fa, Sol, La, Si. was born. But hang on a minute where are Do and Ti? Did that famous movie song get it wrong? No, centuries after Guido invented the idea, "Ut" was changed to Do as it was so hard to sing. Later still, Si was replaced by Ti so that each sound started with a different letter, to avoid confusion. The result was the familiar music code we use today which gave Julie Andrews something to sing about. "Doe, a deer, a female deer, ..." is just a modern version of Guido's idea of using a song where the lines start with the syllables so making them easier to remember.

Maybe it's time someone invented a song that makes Python easier to learn.

You perhaps didn't know the note that follows Fa, was spelt Sol, not So: because of an audio illusion (the sound equivalent of optical illusions) the l is masked by the La that follows, so you don't notice it!