Music and Mathematics
a page from the website josebamus.dk     

back to English
start page

back to German
start page
If you are not satisfied with the usual explanation of the scales, according to which they are made up of intervals defined by simple numerical ratios, and if you believe that the connection between music and mathematics goes far deeper, then you have come to the right place.

Although the translation of my articles on the topic 'music and mathematics' (orig. written in Danish) still is in progress, I have decided to launch this side of josebamus.dk/english now. While you are waiting for the translation I can offer you a computer program that will give you a pretty good idea of the content of these articles. I call the program THE SCALE GENERATOR. The core of the program is an algorithm that simulates the mathematical principle behind the tonal system and especially the musical scales. However this is only the case for a specific value of a fraction called The Section, and in that case I talk about The Golden Section of Music (GSM). When the value equals to the "normal" Golden Section then the scales follow the order of The Fibonacci Sequence, and generally speaking a specific sequence of scales are generated for each value you choose. The sequence generated when the value equals GMS (I call it The Schandorf Sequence and I'll explain why later) defines the scales, that can be used for music, but only a few are used in practice. You can compare The Fibonacci Sequence and The Schandorf Sequence below.

By means of THE SCALE GENERATOR you can analyse the tonal system in detail. You can also use the program for pure mathematical purposes, especially in the topic of number theory. For instance you already may realize, that the just mentioned Fibonacci Sequence is only one of many sequences, that can be generated by the same algorithm, and that makes you view this famous sequence, which even has its own journal, from quite a new perspective. Another mathematical concept that is related to these sequences and can be demonstrated in the program is the concept of continued fractions.

Now I will give you a short introduction to the program, and after that you can download the program.

Below you see the user interface of the program. It is made up of three parts. To the left you make your inputs and options, to the right the scale is generated as a coloured ring, in which each section marks an interval. In this case the smaller intervals are blue, the larger ones green. The ring itself depicts the tonal cycle, i.e. the octave. At the bottom of the window you see the same scale straightened out. This linear model of the scale also acts as a keyboard. When you touch an interval with the mouse you will hear the tone (see the instruction in the frame 'sound'). You can also get the whole scale played automatically.

In this example the C major scale is generated. Mathematically all diatonic scales are permutations of the same sequence of intervals. In this case the permutation is set to –1; you get the minor scale when the permutation is set to –4, and in the remaining cases you get the church modes. If you set the number of intervals to 5, you get the pentatonic scale, and if the number of intervals is 12, you get the Pythagorean chromatic scale. You get the tempered chromatic scale if you use the section 7/12 instead of 0.5849625... (The Golden Section of Music).

A click on the box 'show output' opens up for this tabel:

It tells you that the scale is made up of 2 blue and 5 green intervals, and it also tells you the size of each interval (the meaning of the numbers in the middle of the coloured boxes cannot be explained in this preliminary introduction). Here the octave is set to 1, which is the binary logarithm of 2, which is the acoustic definition of the octave (all this will be explained in the text being translated). In the same way the size of the other intervals are calculated. E.g. the acoustic definition of the major second (the green intervals in the example) is 9/8, and so its size (its tonal definition) is log(9/8)/log2 = 0.169925.

When you generate the scales step by step, starting with just two intervals and then increasing the number to 3, 4, 5, 6, 7, etc. (the easiest way is to use the method described beneath the circular model), then you will find that at certain steps the scale is made up of just two different intervals, while at all other steps they are made up of three (the third one is yellow). This is due to a mathematical principle known as the Three Gap Theorem or the Steinhaus Conjecture. The distribution of the two cases depends on the numerical value of the section. If this value is 0.618034... (The Golden Section) the scales made up of just two different intervals follows the Fibonacci Sequence; if the value is 0.584962... (The Golden Section of Music) these scales are all applicable for music although only a few are used in practice. The sequence of these scales and the mathematical principle after which they are formed was first described around 1965 by my Danish colleague Frede Schandorf, and after him I have named it The Schandorf Sequence (I mention this because an American musicologist claimed to have made this discovery in 1989).

In the program the value of the section is called the ratio (see upper left corner). Using the choise 'optional' you can set the ratio as you want and for every new ratio you get generated a new sequence. You can see the current sequence when you click on the button named 'the bi-intervallic scales'. As an example I will show you the beginning of the Schandorf Sequence and the beginning of the Fibonacci Sequence:


the Schandorf Sequence

the Fibonacci Sequence

As you increase the number of intervals their size becomes smaller and smaller and sooner or later they become undistinguishable from each other. Then you can use the zoom and displace functions. As an example I will show you the case, where the octave is divided in 53 intervals – a specific interesting case, in music theory known as Mercator's temperament. First you see the scale 1:1, and then it is zoomed 3:1.

The numbers around the circular model and below the linear model represents the implicate order of the scale. The concept of an implicate order is taken over from the quantum physicist David Bohm, whose interesting remarks on music you can read here: A Quotation from David Bohm . The implicate order apparently does follow certain rules - but how to describe these? You may try to figure that out yourself - or you have to wait until my articles are translated into English.

After having worked with my program for a while you will probably realize, that it also can be used for pure mathematical purposes, especially in the topic of number theory. With this end in view I have made another version of the program with some special functions added. This version of the program will be put on my website later on, but as an appetizer I will show you a table, that shows the mathematics of continued fractions in a new context. The example is about the case, where the continued fraction is made up of nothing but the number 3 (see column no.8); column no.6 is equal to the sequence I call the bi-intervallic scales:

Now you hopefully would like to download the program. When doing so you will be met with the usual warnings, telling you that it may be unsafe to open the file. But you can be sure that I would never spoil my reputation as a serious and reliable musicologist by spreading virus instead of knowledge - and so you can safely download the program here:

Just follow the instructions. The program can easily be uninstalled again.