Skip to the Main Content

Note:These pages make extensive use of the latest XHTML and CSS Standards. They ought to look great in any standards-compliant modern browser. Unfortunately, they will probably look horrible in older browsers, like Netscape 4.x and IE 4.x. Moreover, many posts use MathML, which is, currently only supported in Mozilla. My best suggestion (and you will thank me when surfing an ever-increasing number of sites on the web which have been crafted to use the new standards) is to upgrade to the latest version of your browser. If that's not possible, consider moving to the Standards-compliant and open-source Mozilla browser.

February 26, 2010

A Look at the Mathematical Origins of Western Musical Scales

Posted by Simon Willerton

I want to explain a little of the background behind Tom Fiore’s musical post last year. In this post the aim is to explain to a numerate audience some of the origins of the Western seven note musical scale. I will try to assume no formal knowledge of music except perhaps a vague notion of what a piano keyboard looks like. I won’t get very far in the historical development, only up to about the middle ages.

There are two aspects of music relevant to this discussion: melody and harmony. Melody involves the consecutive playing of notes, like in any tune you can hum or whistle; harmony involves the simultaneous playing of notes like in a chord or multipart singing. In terms of Western music, it appears that harmony did not make an appearance until the middle ages; in this post I will not get on to harmony and how it had a significant effect on the precise pitch of each note. What I will explain here is the origin of the seven note Western musical scale in terms of the consonance of the octave and the consonance of the fifth, which in turn have their origins in the physics of the vibrating string.

I should add at this point that I learnt much of this stuff from the following great book which is freely available as a pdf.

I also learnt a lot from talking to various friends and there is lots and lots of information on the internet one interesting looking document is

The palette of notes – scales

If you are wanting to compose a piece of music, be you a caveman, a rock star or a member of the Royal College of Music, you must at some point – probably when you start – decide on which notes you will use, what your musical palette will be. By this I do not just mean which keys on the piano will you use: if you have chosen to use a standardly tuned piano then you have already significantly restricted the notes you can play – and we will see a little bit about which notes these are below.

The palette that you chose will be constrained to some extent by the instrument or instruments that you will using. For instance, many instruments, like the xylophone or the piano, will force you to use a discrete set of notes, whereas other instrument, like the violin or the voice, will theoretically allow you to use a near continuum of notes in your piece of music. In between these two extremes there are many instruments which on first sight appear to be based on a discrete set of notes but on which the player has some freedom to move or ‘bend’ notes somewhat, for instance by using the shape of the mouth (or ‘embouchure’) on instruments such as the clarinet or the harmonica.

Another possible constraint on the choice of the palette is whether or not you will be playing with other instruments and whether or not you will be playing more than one different note at a time. For instance, a Baganda xylophone is not played with other tuned instruments and so the exact choice on notes on the instrument is not considered very important – each instrument has a unique set of notes. Similarly the instruments in an Indonesian percussion orchestra known as a gamelan will use notes specific to that orchestra and cannot in general be played with other orchestras such as the ones in nearby villages.

If you are playing with other instruments, then the type of instruments will have an effect on which notes will sound good together. For instance, string instruments have a certain musical spectrum which mean that playing notes together whose frequency differ by a simple fraction will sound sweet together. This will then relate to your choice of notes.

Further constraints include the genre of the music. The notes of the scale in gypsy music can all (essentially) be found in the notes on the piano keyboard but do not occur in that combination in any classical western scale. In blues music, on the other hand, you find notes – blues notes – which can’t be found on the piano. (However, as blues music has been absorbed into the western tradition it has become played on instruments such as the piano and pianists have developed certain tricks to emulate these bent, blues notes.)

We will first have a look at where Western scales come from.

Greek lyres and the Pythagorean scale

It appears that a harp-like instrument called the lyre was one of the main instruments of ancient Greece and the tuning was based on the notion of a tetrachord – that is a tuning of four strings. There were three main tunings or types of tetrachord which were called the chromatic, the diatonic and the enharmonic. We will concentrate on the diatonic as that is the one that is the ancestor of modern tunings. The two outer strings differed in length by a factor of 4/34/3 and so the frequencies differed by a factor of 4/34/3 as well. The middle two strings were tuned so that the ratio of the first to second strings (the first interval) was approximately the same as the ratio of the second to the third string – so this ratio or interval is called a ‘whole tone’ and both these interval were about twice as big as the ratio of the third to the fourth string, this interval being called a semi-tone. [For those of you who know these things this is like going down the white notes on a piano from E to D to C to B or from A to G to F to E, but I’m getting ahead of myself.] How exactly then were the middle two strings tuned? Well, there were many, many different prescriptions for exactly how those middle two strings were tuned; however, one of them won out historically and that was the so-called Pythagorean tuning. Here the first and second ratios are both 9/89/8 and the third ratio is 256/243256/243; the actual numbers are not important here, the thing is that both the first two intervals are exactly the same (not just approximately the same) and (256/243) 2(256/243)^2 is pretty close to 9/89/8. While 9/8×9/8×256/243=4/39/8\times 9/8\times 256/243 = 4/3. It will turn out to be useful at this point to have a digression on where Pythagoras might have got these numbers from.

Harmony and harmonics

When you play a note on an instrument, such as by plucking a string or blowing into a tube you will generate a note at a certain pitch, say 100 cycles per second or 100 Hertz. Because of the physics of the string or the column of air, this will give a periodic wave and by Fourier analysis we know that this wave can be decomposed into sinusoidal waves (‘harmonics’) whose frequency is an integer multiple of the fundamental frequency. So in the case of our plucked string at a pitch of 100Hz100 Hz we will get harmonics at frequencies of

100Hz,200Hz,300Hz,400Hz,500Hz,600Hz,100 Hz, 200 Hz, 300 Hz, 400 Hz, 500 Hz, 600 Hz,\dots

These harmonics, or overtones, will occur with different amplitudes depending on the instrument. Some instruments, such as the clarinet which is closed at one end, will only have odd multiples of the fundamental frequency, or at least on some notes.

Now it is a fundamental fact that two notes played simultaneously will sound sweet or consonant together if they share many harmonics. If we play a note at twice the frequency, which means at 200Hz200 Hz in our example, then it will have harmonics at

200Hz,400Hz,600Hz,800Hz,1000Hz,1200Hz,200 Hz, 400 Hz, 600 Hz, 800 Hz, 1000 Hz, 1200 Hz,\dots

These are all harmonics of the original note at 100Hz100 Hz so these two notes sound really sweet together, in fact, so much so that we usually consider this to be the same note, but at a higher frequency. The second note is said to be an octave higher than the first – the reason for the nomenclature will be more apparent later.

Consonance of the octave: Two notes which differ in frequency by a factor of 22 sound extremely consonant together.

The principle of actually thinking of two notes which differ in frequency by a factor of 22 as being the same note is called the principle of octave equivalence.

Now if we pick a note with a frequency of 150Hz150 Hz then its harmonics are at the following frequencies.

150Hz,300Hz,450Hz,600Hz,750Hz,900Hz,150 Hz, 300 Hz, 450 Hz, 600 Hz, 750 Hz, 900 Hz,\dots

In this case every other harmonic is a harmonic of the original note, and every third harmonic of the original note is a harmonic of this note. These two notes share lots of harmonics and sound very sweet together. Two notes such as these whose frequencies differ by a factor of 3/23/2 are said to differ by a perfect fifth. Again, the musical terminology is likely to confuse at this point as there isn’t five of anything yet.

Consonance of the fifth: Two notes which differ in frequency by a factor of 3/23/2 sound very consonant together.

A similar argument means that if aa and bb are small integers then notes which differ by a ratio of a/ba/b will share many harmonics – for each integer nn the nan ath harmonic of one will be the nbn bth harmonic of the other – so the notes will sound sweet, or consonant, together.

The legend has it that Pythagorus discovered these ideas when he was walking past a blacksmiths one day and heard that different sized anvils produced different notes when struck. This seems to be generally regarded as being implausible as the above analysis depends on the fact that the harmonics are all integer multiples of the fundamental frequency which is true for waves in one dimension, so this includes vibrating strings and columns of air; however, instruments which are struck in the body – such as xylophones and bells – and instruments which have a membrane which is hit – such as drums – tend to have more complicated harmonics which are not simple multiples of the fundamental frequency. So in general if an anvil is played with an anvil twice the size then you won’t get a harmonious sound.

In a similar vein, I could point out here that the harmonics on the clarinet are dominated by the odd multiples of the fundamental frequency, so I don’t know if in practice whether you get consonant octaves on the clarinet. By this I mean that if you play a note at 100Hz100 Hz you get, in theory, harmonics at the following frequencies

100Hz,300Hz,500Hz,700Hz,900Hz,1100Hz,100 Hz, 300 Hz, 500 Hz, 700 Hz, 900 Hz, 1100 Hz,\dots

and if you play a note with twice the frequency you get, in theory, harmonics at the following frequencies

200Hz,600Hz,1000Hz,1400Hz,1800Hz,2200Hz,200 Hz, 600 Hz, 1000 Hz, 1400 Hz, 1800 Hz, 2200 Hz,\dots

So these notes have no harmonics in common, therefore when played together should not sound particularly sweeter than any two random notes played together; however, I’ve never tried performing an experiment to verify this, so I don’t know how true it is.

Pythagorean tuning

Pythagoras is supposed to have used the fundamental principles of the consonance of the factors of 22 and 3/23/2 (or the octave and the fifth if you prefer) described above to set up his tuning of the tetrachord. You can construct a sequence of notes in the following fashion. Start with a base note, take the note with a ratio 3/23/2 to that one (a perfect fifth up if you prefer), then take the note 3/23/2 up from that, this is 9/49/4 up from the original note, but by the principal of octave equivalence it is to be considered “the same” as the note with half the frequency, i.e. the note 9/89/8 up from original note. You can continue like this, raising by a factor of 3/23/2 and dropping by a factor of 1/21/2 when necessary. Doing this six times we get the following notes, where \sim denotes octave equivalence (which you recall means treating notes whose frequencies are in the ratio of a power of 22 as being the same):

11,32,9498,2716,81328164,243128,729256729512.\frac1 1, \frac3 2, \frac9 4\sim\frac9 8, \frac {27}{16}, \frac{81}{32}\sim\frac {81}{64}, \frac{243}{128}, \frac{729}{256}\sim\frac{729}{512}.

Taking these notes in order of size we get the following sequence of ratios to the base note, where we have added the note at the double the frequency.

11,98,8164,729512,32,2716,243128,21.\frac1 1, \frac9 8, \frac{81}{64}, \frac{729}{512}, \frac{3}{2}, \frac{27}{16}, \frac{243}{128}, \frac2 1.

Or, if you prefer your notes in Hertz, then taking the base note at 100Hz100 Hz you get:

100Hz,113Hz,127Hz,142Hz,150Hz,169Hz,190Hz,200Hz.100 Hz, 113 Hz, 127 Hz, 142 Hz, 150 Hz, 169 Hz, 190 Hz, 200 Hz.

[For those in the know this would be approximately the same relative frequencies you would get if you started at F on the piano keyboard and played the white notes upward.] Looking at the ratios of consecutive notes we get

98,98,98,256243,98,98,256243.\frac9 8, \frac9 8, \frac9 8, \frac{256}{243}, \frac9 8, \frac9 8, \frac{256}{243}.

So adjacent notes differ either by a ratio of either 9/89/8 – which we call a Pythagorean tone – or by a ratio of 256/243256/243 – which we call a Pythagorean semi-tone. Note that 256/243×256/2439/8256/243\times 256/243 \simeq 9/8 so the name is nearly justified. Pythagoras used these two ratios or intervals in his diatonic tetrachord. In relation to his base note he tuned the four strings to the following ratios:

11,256243,3227,43.\frac1 1, \frac{256}{243}, \frac{32}{27}, \frac4 3.

This is the Pythagorean tuning of the diatonic tetrachord.

The Western major scale

By placing two tetrachords next to one another you can go from one note to the note at twice its frequency using eight notes as done above. This is why we get the term octave for a doubling of the frequency. We can repeat this pattern as much as we like, so that the ratio between adjacent notes forms the following sequence:

,256243,98,98,256243,98,98,98,256243,98,98,256243,98,98,98,256243,\dots, \frac{256}{243}, \frac{9}{8}, \frac{9}{8}, \frac{256}{243}, \frac{9}{8}, \frac{9}{8}, \frac{9}{8}, \frac{256}{243}, \frac{9}{8}, \frac{9}{8}, \frac{256}{243}, \frac{9}{8}, \frac{9}{8}, \frac{9}{8}, \frac{256}{243},\dots or, symbolically, writing S for a semi-tone and T for a tone,

S T T S T T T S T T S T T T S \dots \text{ S T T S T T T S T T S T T T S }\dots

This is the same as the pattern of intervals between the white notes on a piano – where a T means there is a black note in between the two white notes and S means that there is no black note. To get a scale we need to specify the root or home note – the note we will be based around. Up to octave equivalence we have seven notes to choose from. So if we pick a white key on the piano and that followed by the seven keys to its right then we will have played an octave and the seven different choices give us the following seven patterns.

T T S T T T S\text{T T S T T T S} T S T T T S T\text{T S T T T S T} S T T T S T T\text{S T T T S T T} T T T S T T S\text{T T T S T T S} T T S T T S T\text{T T S T T S T} T S T T S T T\text{T S T T S T T} S T T S T T T\text{S T T S T T T}

For instance, the first of these is what you get if you start at a “C” on the piano keyboard. Historically, all of these scales were used, but for some reason in Western classical music the first and the sixth are the ones that dominated. The first is called the major scale and the sixth is called the minor scale. So if you start at an “A” on a piano keyboard and play the white keys to its right you will get a minor scale. Some of the other scales pictured are certainly still prevalent in other Western music such as Irish folk music, for instance there are many tunes written using the second and fifth pattern, which are know as the Dorian and Mixolydian modes.

Note that in all except the last pattern pictured above the interval the first note to the fifth note consists of three tones and a semi-tone. This means that the frequency ratio is (9/8) 3×256/243(9/8)^3\times 256/243 which is precisely 3/23/2. So the fifth note is 3/23/2 times the frequency of the first note, and we finally have an explanation as to why this ratio is called a fifth.

So we have now arrived at a rather rough approximation to the Western major scale. To get many notes in the scale to sound good when played together, some rather interesting compromises need to be applied to the actual ratios. That is the subject of temperaments which is a whole tale in itself.

Summary

To summarize, the physics of the vibrating string or vibrating column of air mean that to our ears notes which differ in frequency by a factor of 22 or 3/23/2 sound particularly sweet or consonant when played together. From this one can be led to a series of notes called the Pythagorean scale, which very roughly correspond to the white notes on a piano.

This takes us up to about the middle ages when polyphonic music and harmony, that is different notes played at the same time, seem to have become more significant in Western music, and because of that certain tweaking of the scale was needed. However, that’s a story for another time.

Posted at February 26, 2010 12:16 AM UTC

TrackBack URL for this Entry:   https://golem.ph.utexas.edu/cgi-bin/MT-3.0/dxy-tb.fcgi/2174

24 Comments & 1 Trackback

Re: A Look at the Mathematical Origins of Western Musical Scales

With regards to your clarinet experiment: You will find that when two clarinets clarinets play the same note (say a Bb), one an octave higher than the other, they sound just as consonant as any other pair of instruments.

Despite the fact that each clarinet will emphasize a different set of harmonics, all the overtones are still all integer multiples of the lower Bb.

P.S. You should follow this up with a post on just intonation.

Posted by: Brendan Cordy on February 26, 2010 6:03 AM | Permalink | Reply to this

Re: A Look at the Mathematical Origins of Western Musical Scales

Brendan, are you saying that because you have done the experiment? If you detune one of the clarinets do they sound less consonant? I thought that work of people like Plomp and Levelt showed that it was actually shared harmonics that made for consonance, not just the fact that you have integer multiples. For instance if you play a pure sine wave and one an octave higher then you do not get anything sounding more consonant than nearby frequencies. This is why people have been able to build unusual musical scales by using artificial instruments with stretched partials (for instance those referred to in the section on Artificial Spectra in Benson’s book).

Posted by: Simon Willerton on February 26, 2010 6:44 AM | Permalink | Reply to this

Re: A Look at the Mathematical Origins of Western Musical Scales

Sorry, maybe I completely missed your point. Are you just saying that the only difference with another pair of instruments is that you have removed a load of harmonics so they won’t sound any less consonant? I guess that might well be true. In that case it’s what would happen if you detune slightly that would be very different, I would imagine that it would not suddenly sound much less consonant.

Anyway, it’s an experiment I would like to hear!

And yes, I would like to write something on just intonation and different temperaments, but there’s a few things in the queue before then.

Posted by: Simon Willerton on February 26, 2010 7:23 AM | Permalink | Reply to this

Re: A Look at the Mathematical Origins of Western Musical Scales

I see your point with the lack of shared harmonics. However there are a few things to consider.

The main point is that even though the overtones emphasized by clarinet two aren’t the same as those emphasized by clarinet one, they have very nice relationships. Take 500Hz and 200Hz for example. (500/200) = (5/2) = (1/2)*(5/4). One tone is an octave and a just major third above the other, so these two tones will sound very nice indeed in unison. If you take 1000Hz and 300Hz, then (1000/300) = (2)*(500/300), and that ratio is already present in the overtone series of clarinet one, so it had better not sound dissonant, or else clarinet one will sound dissonant by itself!

This is very, very different from picking any two random notes to play.

There’s more I’d like to say, including something about a talk I saw that used Fourier analysis on a cello sample, but I have to run to work.


Posted by: Brendan Cordy on February 26, 2010 2:44 PM | Permalink | Reply to this

Re: A Look at the Mathematical Origins of Western Musical Scales

If you play two pure sine waves an octave apart and detune one of them you certainly do get something less consonant. If you detune one only very slightly, so that the beats are very slow, it won’t be bothersome, but if you keep going it’s going to sound pretty offensive. It doesn’t matter that none of the harmonics occur.

As for the shared harmonics: Take a very stable interval, like a fifth, say a tone at 100Hz and one at 150Hz, and consider the harmonics of each.

100Hz, 200Hz, 300Hz, 400Hz, 500Hz, 600Hz…

150Hz, 300Hz, 450Hz, 600Hz, 750Hz, 900Hz…

Notice that there are a lot of shared harmonics. I imagine what Plomp and Levelt are saying is that this should mean that the two tones (in fact, even the PURE tones) at 100Hz and 150Hz should be consonant. This is just a consequence of the nice ratio between the two notes. In short…

An interval is stable sounding iff the two notes have common overtones in their overtone series iff the two notes are related by a simple whole number ratio

This is actually the basis of just intonation.

Posted by: Brendan Cordy on February 26, 2010 8:30 PM | Permalink | Reply to this

Re: A Look at the Mathematical Origins of Western Musical Scales

Brendan, when you say

If you play two pure sine waves an octave apart and detune one of them you certainly do get something less consonant. If you detune one only very slightly, so that the beats are very slow, it won’t be bothersome, but if you keep going it’s going to sound pretty offensive. It doesn’t matter that none of the harmonics occur.

I have no idea whether you are basing these assertions on conjecture, experiment or established theory. In the Plomp-Levelt theory which I explain below this does not seem to be the case.

Posted by: Simon Willerton on March 2, 2010 1:32 AM | Permalink | Reply to this

Re: A Look at the Mathematical Origins of Western Musical Scales

You could say I’m basing my claim on high school physics. When you sum two sine waves, the resulting wave will vary in amplitude producing audible beats. Usually this doesn’t sound so good.

The frequency of the beats is given by the difference in frequencies of the two original waves. I suppose that this is really the explanation for the dissonance graphs of simple tones you posted below.

If one of the two original waves is twice the frequency of the other, i.e. they are an octave apart, then the frequency of the beats will actually be the same as the frequency of one of the waves, so you won’t hear any beats. Similarly, if they are a fifth apart, the beats will occur at a frequency an octave below the lower of the two original notes. In the case of a just major third, the beat frequency will be two octaves below the lower of the two original notes.

Really, the only way to confirm that this actually results in something that sounds good is with an experiment. I’ll have to do one when I get home. Call it intuition, but I would be very surprised if a fifth didn’t sound more stable than a tritone, even with pure sine waves, despite that fact that the tritone is a wider interval (the graphs below would predict that the tritone should sound less dissonant).

Posted by: Brendan Cordy on March 2, 2010 7:40 PM | Permalink | Reply to this

Re: A Look at the Mathematical Origins of Western Musical Scales

Alright, it’s done. Unfortunately, I have nowhere to upload it, so I’ll just have to put it up on a free host.

http://www.mediafire.com/file/tdmcqwvow3d/FifthThenMaj7.mp3

The sample is of two pure sine waves. The first interval is a fifth (C5: 523.251Hz to G5: 783.991Hz), the next is a major seventh (C5: 523.251Hz to B5: 987.767).

Note that this was done in a music production program, and both intervals are equally tempered. This is by all accounts quite a poor experiment.

However, it gets the job done. The major seventh is clearly less consonant than the fifth, despite the wider interval between the two tones. So there is good reason not to believe the dissonance curves for pure tones posted below are very accurate at all.

There is still something to it, notice the similarity between the dissonance curves for simple tones, and the dissonance curve for the digital clarinet. If one were to extrapolate a dissonance curve for the digital clarinet based on partial experimental data, it would probably look just like the dissonance curve for simple tones.

I agree that some of the narrower intervals will be perceived as the most dissonant. But the graph seems to indicate that after reaching a maximum, the dissonance decreases monotonically, which is, well, just wrong.

Posted by: Brendan Cordy on March 2, 2010 10:33 PM | Permalink | Reply to this

Re: A Look at the Mathematical Origins of Western Musical Scales

One important thing to note here is that I didn’t say what I meant by “consonance”. I meant what the researchers call “tonal” or “sensory” consonance, which is supposed to reflect the harshness or roughness of the sound on the ear. This is intended to be distinct from “musical” consonance which is a product of our exposure to the Western musical tradition: so tautologically to a trained musician a fifth sounds consonant because a fifth is a consonant interval. I think distinguishing between these two aspects of consonance is rather difficult, and the researchers in this area are very aware of the potential difference of meaning of consonance to musically trained and musically untrained subjects. Plomp and Levelt go on about this at length.

Both of the intervals in your sample sound quite “smooth” if you compare them with a pair of pure tones at say 523Hz523 Hz and 570Hz570 Hz then you will hear something considerably more sensorially dissonant.

An interesting, but still imperfect, experiment is to listen to two pure tones as one is fixed, in the following case at 440Hz440 Hz, while the other one is gradually increased from the same frequency up to over the octave, around 1000Hz1000 Hz in the example; then to plot a curve of the perceived dissonance. (I hope the conversion to mp3 has not affected the dissonance/consonance!)

Of course this theory is all only an idealized model of a complex system of perception, but as well as being mathematically appealing, there does seem to be something in it.

Posted by: Simon Willerton on March 5, 2010 7:35 PM | Permalink | Reply to this

Re: A Look at the Mathematical Origins of Western Musical Scales

I should say that I completely agree that there is certainly something to this. The construction of the dissonance curves for various harmonic spectra is really interesting. Moreover, the proof is in the pudding; the sample with the ‘clarinet’ spectrum was clearly much more tolerable when the octave is slightly out of tune than the sample with the ‘string’ spectrum, exactly as the curve says it should be. I also read a bit more at:

http://eceserv0.ece.wisc.edu/~sethares/consemi.htm

I’m really nitpicking with my objections. I think the ideas make a lot of sense.

I do hear the two simple tones as increasing in dissonance, and then decreasing up to a point, but after a while it’s not so clear (for example, there seems to be a very consonant point around 43 seconds in). Admittedly, I have played violin for years, and this certainly affects my perception. It’s safe to say that I’ve heard my fair share of intervals out of tune, many played by my own left hand =), and it really bugs me. I still expect many would agree that what they hear is not monotonically decreasing in dissonance after, say, 15 seconds in. Like I said, this is really nitpicking though, as everything after around 15 seconds certainly sounds better than what came before.

Posted by: Brendan Cordy on March 6, 2010 2:12 AM | Permalink | Reply to this

Re: A Look at the Mathematical Origins of Western Musical Scales

Hello,

I’ve just done the experiment (using square waves generated by the computer program SuperCollider - like the clarinet, square waves only have odd harmonics) and can confirm that notes in a 3/2 ratio do sound a lot more consonant than arbitrary intervals (I picked a series of random pitches between 0 and 1 octaves above the other note).

In case anyone has access to SuperCollider, this is the code for the 3/2 interval:

{(Pulse.ar(200) + Pulse.ar(300))*0.2!2}.play

and this is the code for the random one - run it several times to get different intervals:

{(Pulse.ar(200) + Pulse.ar(exprand(200,400)))*0.2!2}.play

As another poster mentioned, I believe this is because all the harmonics of both notes are integer multiples of the fundamental of the lower note. Another poster replied saying that it should be the shared harmonics which make the intervals sound consonant, but from my experience I’d say both must play a role. For instance, this code adds up a bunch of sine waves to create an approximation to a sawtooth wave, which sounds vaguely string-like:

{(SinOsc.ar(200*(1..40))/(1..40)).sum*0.2!2}.play

whereas this code is the same but gives each note a random 10% deviation in pitch - it produces a weird bell-like tone which sounds fundamentally dissonant in itself:

{(SinOsc.ar(200*(1..40)*({exprand(0.9,1.1)}!40))/(1..40)).sum*0.2!2}.play

the point being that even if the “notes” you’re playing are just sine waves, which have no harmonics, integer multiples are more likely to sound consonant than arbitrary intervals.

(I’m just passing through by the way - I found this post via Google Reader’s recommended items. Interesting stuff.)

Nathaniel

Posted by: Nathaniel Virgo on February 26, 2010 8:32 PM | Permalink | Reply to this
Read the post Social comments and analytics for this post
Weblog: uberVU - social comments
Excerpt: This post was mentioned on Twitter by alexbowe: #Mathematical origins of western #music scales - tl;dr for now, but looks interesting :P give me a summary? ;) http://icio.us/ihaegx
Tracked: February 26, 2010 10:12 PM

Re: A Look at the Mathematical Origins of Western Musical Scales

Regarding the two clarinets: I think the 300 Hz overtone of the first clarinet would interfere with the 200 Hz tone of the second clarinet to produce a 100 Hz beat, consonant with the tone of the first clarinet. Similar interactions between the two overtone series should reproduce the whole spectrum of multiples of 100 Hz many times over, though with decaying clarity. In short, I think that clarinets in octaves should sound very consonant, probably just as much so as any other instrument played in octaves, but take this as an educated guess from someone with no music theory training; I hope an actual expert in the subject will post here!

Posted by: Austin Shapiro on March 1, 2010 5:33 AM | Permalink | Reply to this

Re: A Look at the Mathematical Origins of Western Musical Scales

In the above replies, several commentators have mentioned consonance of integer ratios of pure sine waves. This “Galilean” idea seems to have been dismissed by Helmholtz in the nineteenth century. So I think it is probably a good idea for me to try to explain the ideas behind the Plomp and Levelt theory of consonance and dissonance which is based on certain experiments they performed. I learnt this mainly from Benson’s book, but I will use the conventions of Sethares here.

Having decided to explain theory Plomp and Levelt theory here, I actually got round to using it to analyse a hypothetical clarinet with just odd harmonics, and the results are given below. I also implemented such an instrument on csound and generated an mp3 file of how it would sound near the octave: this is compared with a similar naive model of a string at the octave. The sound file can be found at the bottom of this post.

Plomp and Levelt dissonance theory

In their paper

Plomp and Levelt explain how they conducted experiments on how people perceive consonance and dissonance of pure tones. They played two tones to subjects and got the subjects to judge how dissonant they were. The so-called dissonance curves show the results. In the dissonance curve the lower frequency is fixed and perceived dissonance (in some arbitrary units) is plotted against the ratio (xx) of the two tones. I used maple to plot dissonance curves based on the formulas given by Sethares in

(these are slightly different to those given by Benson, but are qualitatively the same). Pictured here are the curves for 220Hz220 Hz (red), 440Hz440 Hz (green) and 880Hz880 Hz (blue).

Dissonance curves

These are saying that when two pure tones are played together, if they are in unison, that is at the same frequency, then they are very consonant and as one tone is increased in frequency the sound becomes rapidly more dissonant until reaching a maximum and then the sound becomes more and more consonant again. The ratio of the two tones at which the dissonance is at a maximum depends of the frequencies of the curves and is about one quarter of the so-called critical bandwidth of the lower frequency – apparently this all has a physiological explanation in terms of the basilar membrane in the ear. This ratio is smaller for higher frequency notes, as can be seen in the above graphs. Let me stress one point here, Plomp and Levelt say

As we see, for intervals composed of simple tones, simple frequency ratios did not result in singular points of the curves. On the contrary, the curves suggest that frequency distance rather than frequency ratio is the decisive parameter.

So integer ratios between pure tones is not important: pure tones at 250Hz250 Hz and 750Hz750 Hz sound no more consonant than those at 250Hz250 Hz and 770Hz770 Hz.

Now we introduce complex tones. A complex tone consists of a spectrum, that is many simple tones at different frequencies and amplitudes. For instance, for a string we will naively model this by a base frequency ff with 99 harmonics at frequencies f,2f,3f,9ff, 2f, 3f, \dots 9f and at corresponding amplitudes 1,0.88,0.77,0.68,0.6,0.53,0.46,0.41,0.361, 0.88, 0.77, 0.68, 0.6, 0.53, 0.46, 0.41, 0.36 (I’ve followed Sethares with these numbers). If we have two complex tones played together we calculate the total dissonance by just adding up the dissonance of each pair of simple tones present (weighted by the amplitudes) as determined by the dissonance curves above.

One can get maple to do this calculation (provided we have a formula for the dissonance curves of simple tones, and you can find that in Sethares’ paper). So I take two complex tones with the naive string harmonics given above. I fix one note at 440Hz440 Hz and vary the frequency of the other one so that the ratio of frequencies (xx) varies from 11 to 33 and plot the calculated dissonance of these two tones. Here is the result.

Dissonance curves

The vertical lines are plotted at the following rational numbers: 5/45/4, 4/34/3, 7/57/5, 3/23/2, 8/58/5, 5/35/3, 7/47/4, 22. You notice that the local minima of the dissonance all occur at integer ratios of frequencies. (Local minimum of dissonance = local maximum of consonance!) You see that the octave (x=2x=2) and the fifth (x=1.5x=1.5) are particularly minimizing.

This is the essence of Plomp and Levelt argument as to why consonanace of vibrating strings is connected to integer ratios.

Sethares, in particular, has used these ideas to create artificial spectra with various consonance properties, and to examine the consonance of various spectra. We will now use them to examine a hypothetical clarinet.

The “clarinet” experiment

I will model the clarinet very naively with the following spectrum consisting of purely odd harmonics. For a frequency ff the partials will occur at f,3f,5f,7f,9f,11ff, 3f, 5f, 7f, 9f, 11f and the corresponding amplitudes will be 1,0.77,0.6,0.46,0.36,0.291, 0.77, 0.6, 0.46, 0.36, 0.29 (these amplitudes were chosen as they are the same as those of the odd harmonics in the toy string above). There are many, many objections to that simple model, not least because the spectrum varies with the frequency, and the odd harmonics dominate mainly in the so-called lower register of the clarinet. There is a good page on clarinet acoustics at the University of New South Wales.

We can now calculate the dissonance curve in the same way for two “clarinet” tones as we did for two “string” tones above. We fix one note at 440Hz440 Hz and vary the frequency of the other one so that the ratio of frequencies (xx) varies from 11 to 33 : the plot looks as follows.

Dissonance curves

Again the vertical lines correspond to the integer ratios: 5/45/4, 4/34/3, 7/57/5, 3/23/2, 8/58/5, 5/35/3, 7/47/4, 22. However, now we only get pronounced local minima of the dissonance function at ratios of odd integers, namely, amongst that list, at x=7/5x=7/5 and x=5/3x=5/3. There is a local minimum of dissonance at the octave, that is at x=2x=2, but it is clearly of a different nature, it is far smoother, it is not particularly more consonant than nearby frequencies.

The next thing to do is to listen this! I have used Csound to create instruments with the spectrum of the “clarinet” and the “string” given above (Csound file). In both cases I emulate the above two graphs near the octave (x=2x=2) by playing a tone at 440Hz440 Hz and another tone varying from 858Hz858 Hz to 902Hz902 Hz, so xx goes from 1.951.95 to 2.052.05. The “clarinet” is played first and then the “string”.

What I hear in the first case is a sound that is neither particularly consonant nor dissonant and which doesn’t vary much, this being the aural counterpart of the graph above near x=2x=2. In the second case I hear a dissonant sound becoming rapidly more consonant and then becoming rapidly dissonant again, this corresponding aurally to the previous graph of the dissonance of the string near x=2x=2.

So the aural experiment does seem to bear out the theory of Plomp and Levelt. It doesn’t quite answer what would happen with real clarinets though.

Posted by: Simon Willerton on March 2, 2010 1:26 AM | Permalink | Reply to this

Re: A Look at the Mathematical Origins of Western Musical Scales

Wow! Very cool. I still find this hard to believe:

“As we see, for intervals composed of simple tones, simple frequency ratios did not result in singular points of the curves. On the contrary, the curves suggest that frequency distance rather than frequency ratio is the decisive parameter.”

For the complex tones, it is quite interesting that the clarinet graph is smoother around the octave then the string graph.

So far as the sound sample goes, fundamentally it’s what I would expect, dissonance -> consonance -> dissonance in the case of both ‘instruments’. I would certainly agree that the string is obviously the more offensive of the two when it’s out of tune though, and that seems to support idea that shared harmonics play some role.

However, as we can see from the dissonance graph, and hear from the sample, an octave is definitely more consonant than any two random notes played together.

Posted by: Brendan Cordy on March 2, 2010 4:17 PM | Permalink | Reply to this

Re: A Look at the Mathematical Origins of Western Musical Scales

Brendan said:

However, as we can see from the dissonance graph, and hear from the sample, an octave is definitely more consonant than any two random notes played together.

Well of course the dissonance graph just represents some model in a theory, and you’ve reminded me that I was actually rather sloppy. The local minimum of dissonance on the graph is not actually at the octave. Let me blow up the graph a little.

Clarinet up to the 1th harmonic near the octave

If you think about it you can see that when you have two notes whose partials interlace each other like happens with the “clarinet” at the octave:

440,(880),1320,(1760),440, (880), 1320, (1760), \dots

(where the brackets just distinguish the partials from the two different notes) then you are going to be close to minimizing the dissonance, which will be smaller if the partials are all far away from each other. Exactly where the minimum is, though, will be dependent on the exact shape of the dissonance function for two pure tones, not simply on its qualitative behaviour. For instance, if I took a “clarinet” without the 11th harmonic, so just up to the 9th, then the dissonance curve near the octave looks as follows, namely the minimum is above the octave.

Clarinet up to the 1th harmonic near the octave

The local minima at the odd integer ratios are of a very different nature however and do seem to depend on the qualitative behaviour of the dissonance curve for pure tones. These arise because we have overlapping partials like

440,(616),1320,(1848),2200,(3080),3080,440, (616), 1320, (1848), 2200, (3080), 3080,\dots

and as soon as you start to move away you get the two pure tones near 30803080 sounding very dissonant very quickly.

So for this “clarinet” the octave is not a fundamental interval, although it does sound reasonably consonant.

Posted by: Simon Willerton on March 5, 2010 2:50 AM | Permalink | Reply to this

Re: A Look at the Mathematical Origins of Western Musical Scales

Wow. I’d heard of the Plomp and Levelt work, but I hadn’t really understood what it was about until now. It’s much cooler than I’d realised. Now I can hardly wait for the next post.

Posted by: Tim Silverman on March 2, 2010 8:39 PM | Permalink | Reply to this

Re: A Look at the Mathematical Origins of Western Musical Scales

Well I’m afraid I’ve got various other things to post about first, and given the rate at which I write, it might be a while… Just out of interest, was there anything in particular you wanted to hear about?

Posted by: Simon Willerton on March 5, 2010 2:11 AM | Permalink | Reply to this

Re: A Look at the Mathematical Origins of Western Musical Scales

No, I’m curious to find out how you treat the subject. If there are pleasant surprises in there, that would be pleasant, but I can’t say what I hope for them to be.

Posted by: Tim Silverman on March 6, 2010 1:36 PM | Permalink | Reply to this

Re: A Look at the Mathematical Origins of Western Musical Scales

… Although it’s now two years later I’m very happy to see this. A few days after this conversation (March 2010) there was the first international Bohlen-Pierce symposium, in Boston, and many presentations re. tuning and dissonance, and concerts featuring clarinets customized to play this music. My own paper compared dissonance curves of clarinet timbres in conventional 12ed2 scales and the BP 13ed3 scale. Simon has really hit the topic on the head and has reminded me to continue, taking into account the effects of register and dynamics. Thanks! http://bohlen-pierce-conference.org/

Posted by: Todd Harrop on February 5, 2012 7:38 PM | Permalink | Reply to this

Re: A Look at the Mathematical Origins of Western Musical Scales

In tuning a piano, you have the problem that the overtones of a string are not truly integer multiples of the fundamental but are slightly higher in frequency.

This causes low notes to be tuned slightly flat so their harmonics are the same as the fundamentals of some notes above them, and high notes to be tuned slightly sharp so their fundamentals are consonant with the harmonics of some notes below them. The shape of such ‘mistunings’ is known as the Railsback curve.

Posted by: RodMcGuire on March 4, 2010 8:40 AM | Permalink | Reply to this

Re: A Look at the Mathematical Origins of Western Musical Scales

I am curious - do you have a mathematical explanation for why consecutive fifths are frowned upon in Western music? Avoiding fifth progressions (even those of length two) is basically rule number 1 in composition classes. The progression certainly sounds discordant to my Western-educated ear, but I’m having trouble formulating a reason why. Since it brings frequency variation into play, I guess it doesn’t necessarily fall into the realm of beat formation.

Posted by: Scott Carnahan on March 7, 2010 5:25 PM | Permalink | Reply to this

Re: A Look at the Mathematical Origins of Western Musical Scales

This an interesting discussion that is near and dear to my heart. After seeing Bobby McFarin’s Ted Talks recently (Google it, you must see it to understand my comment here) I took issue with a commenter who said that McFarin’s use of Mathematics and Music was intriguing. I had not seen any use of mathematics in McFarin’s Ted Talk at all. I had seen audience participation being used as an example of what a large number of people could do together with their voices. It had nothing whatsoever to do with mathematics and numbers. In essence I think that music, the muse itself, has nothing whatsoever to do with the music as a whole. This led to a heated discussion with a colleague who said mathematics and music go hand in hand. I said music is music and math and numbers play no part in the true music muse.

Now that you’ve proven to me that the Western scale was INVENTED, I think I can think more clearly now about how I think about music. If there wasn’t a musical scale to identify a tone we’d have to invent one…..like God.

Thank you for this in-depth history of where it all came from.

Posted by: K.a.m. on March 27, 2010 5:16 PM | Permalink | Reply to this

Re: A Look at the Mathematical Origins of Western Musical Scales

Under the second heading :”Greek Lyres and Pythagorean Scale” , in the fifth line you say :”The two outer strings differed in length by a factor of 4/3 and so the frequencies differed by a factor of 4/3 as well”. To my understanding the second ratio should be “3/4” since the relation between the frequencies of two strings of the same material and thickness , under the same tension ,is an inverse proportionally.

Posted by: Mohamed mounir Shalaby on September 16, 2016 7:45 AM | Permalink | Reply to this

Re: A Look at the Mathematical Origins of Western Musical Scales

Thank you very much for this very informative article. I think there may be a mistake, which is confusing. In the line, “The middle two strings were tuned so that the ratio of the first to second strings (the first interval) was approximately the same as the ratio of the second to the third string.” Should, “first to second strings” read “”first to second string”?

Posted by: Mick McCafferty on October 2, 2023 4:14 AM | Permalink | Reply to this

Post a New Comment