Arithmetic and Music

Taking a break from all this physics, I thought I'd talk a little about music and some related mathematical coincidences. One of the fundamental concepts of music is that of consonance and dissonance. Consonant things sound nice when played together and dissonant things do not. For example, if you play two Cs together on a piano (or your instrument of choice), it's a pleasing sound, but playing a C and an F# together sound unpleasant.

It could have been the case that what we find pleasing and displeasing on this simple level could be purely random, but our tastes align with a very elementary mathematical fact. Ratios of frequencies that involve small numbers in the denominator sound good. Take a 2:1 ratio, for example. That is an octave. The A above middle C on a piano is usually tuned to around 440 Hz. An octave above that is 880 Hz, and an octave below that is 220 Hz.

Sticking with ones in the denominator, we next have a 3:1 ratio. This would be somewhere between one octave and two octaves. To keep things in the same octave, we can go down an octave from 3:1 and examine the ratio of 3:2. From the A on the piano, that is a frequency of 660 Hz. This interval is called a perfect fifth. When a singer sings a fifth, for example, they will usually sing a perfect fifth. I think that violinists and other fretless instruments also play perfect fifths, too, but I don't remember. You will not find any key on a modern piano with the frequency of 660 Hz, however.

If we keep sticking to ratios between 1:1 and 2:1, the next smallest denominator is 4:3. This is a perfect fourth. If you pick a note and go a perfect fourth above it and follow that with a perfect fifth, you find that you are at a ratio of 3:2 * 4:3 = 2:1, an octave. Intervals which obey this relation are called complementary intervals. The octave, the perfect fourth and the perfect fifth are generally the most pleasent sounding intervals. Beyond this, there are ratios such as 5:3, a major sixth, 5:4, a major third, filling out much of the usual musical scale. Such a scale is called just intonation.

But where does the scale come from? Why stop at some particular point? Since the fourth and the fifth are complementary, we can pick one and focus on the fifth. What happens if we keep going up by fifths? We get a sequence of ratios that look like 3^n : 2^n. A funny thing happens when n=12. We can compute

(3/2)^12 = 129.75

This is remarkably close to 2^7. If we go up twelve fifths, we almost end up at seven octaves. Two fifths, for example, gives a ratio of 9:4. Going down and octave from there gives us 9:8 which is a major second. Going up again gives us 27:16 which has a pretty big denominator. However, 27/16 = 1.69 which is pretty close to 5/3=1.67 or a major sixth. Up a fifth and down an octave from there is 81/64 = 1.27 which isn't all that close to the major third, but up a fifth from 5:3 (as opposed to 27:16) hits it on the nose.

This coincidence, that 129.75 is almost 128 tells us that we should think about a 12 note scale. We pick a note, called the tonic, on which to start the scale. If we choose C and go up and down by fifths, we get

Gb - Db - Ab - Eb - Bb - F - C - G - D - A - E - B - F#

The notes Gb and F# are declared to be the same even though they differ by the factor of 3^12/2^19 = 1.014. This is called Pythagorean tuning, and the above sequence of notes (with the ends connected) is called the circle of fifths. Be construction, we get our fifths and fourths perfect. The major second and minor seventh are also hit on the nose. Others, like the major third (a pretty important interval) aren't so great.

You can start fudging to get closer to just intonation. Just put the notes you want back to their nice ratios. But there's no reason to only look at intervals starting at the tonic. As you fudge, the other fifths won't sound so good anymore. The particularly bad intervals in various tunings are called "wolves". If you change keys, you hit these intervals a lot. Back when, music in different keys actually sounded different.

There's a conservation of trouble here. That 129.75 will always show up somewhere. The modern perspective is to put it everywhere. There are twelve notes in the scale, and we want the octave to be 2:1. Thus, we make each half-step (twelve half-steps form an octave) have a ratio of 2^(1/12):1. This is called equitempered tuning. The octave is still there, but all the other intervals have been fudged. For example, a fifth is now a ratio of 1.498:1 as opposed to 1.5:1. A fourth is 1.335:1 as opposed to 4:3. And all the fifths and fourths are equally close to the perfect interval. How about the major third that the Pythagorean tuning had trouble with? 1.26:1 as opposed to 1.25:1. Major sixth? 1:68:1 as opposed to 1.67:1. Not so bad, all things considered.

Intervals are cool and all that, but music is a lot more than that. At this point, we've made ourselves a chromatic scale:

C - C# - D - D# - E - F - F# - G - G# - A - A# - B - C

but almost no music is played in this scale. Instead, some subset of notes is chosen. The major diatonic scale starting on C, for example, is

C - D - E - F - G - A - B - C

and the natural minor scale is

C - D - Eb - F - G - Ab - Bb - C

There are other scales, too, but let's stick with these. One explanation for them is that this sequence of notes appears in the circle of fifths. Starting at F, for example, one finds the major scale and starting at Eb gives the minor scale. I don't find this particularly satisfying, so I'm going to talk about another "explanation" which I found on the internet (I forget the page, unfortunately).

Before getting to that, we need to talk about chords. We like small denominators, and the smallest denominator one can have is one. Thus, it helps to look at the sequence of ratios:

2:1 3:1 4:1 5:1 ...

The first is the octave. The rest I will transpose to be less than one octave. The second becomes 3:2 which is the fifth. The third is another octave, and the fourth is 5:4, or the major third. These three notes form the major triad. We can keep going. 6:1 is the fifth again. 7:1 goes to 7/4 = 1.75. This is somewhere between a minor and major seventh. Depending on this choice, we get a dominant seventh chord or a major seventh chord. After this the chords get pretty busy, but the next new note is 9/8, the major second. This is a 9-chord. 11/8=1.375 is reasonably close to the perfect fourth, 4/3, which would make an 11-chord, but at this point we're pretty dissonant.

The three most important notes in a scale are the tonic, the perfect fourth and the perfect fifth. If we add in the major triads on these notes, we get exactly the major scale. This is secretly the circle of fifths in disguise, really, but I think it makes the role of the tonic much more clear.

What about the minor triad, then, where the major third is replaced by a minor third? I don't know if there's a pat answer for that one. But, if you wanted to introduce some more dissonance in the major triad, the third would be the place to do it. If you take the minor triads on the tonic, fourth and fifth, you get the natural minor scale. The other minor scales are modifications that get you that nice major seventh note to lead into the tonic.

One last scale worth mentioning is the pentatonic scale. If you take five consecutive notes in the circle of fifths, you get the major pentatonic. It consists of the tonic, major second, major third, perfect fifth and major sixth. In C, that is

C - D - E - G - A - C

We can make a minor pentatonic by analogy to the major and minor diatonic scales. The natural minor in A has the same notes as the major scale in C. In general, the minor scale with the same notes as a given major scale (starting a minor third below the tonic of the major scale) is called the relative minor. So, we can define the minor pentatonic scale in C to be the same as the major pentatonic scale in Eb. Thus, we have

C - Eb - F - G - Bb - C

The pentatonic scale is great because you can play almost anything in it, and it won't sound so bad. Much of pop music improvisation is done in this scale, in fact. It's also the case that the black notes on a piano exactly form a pentatonic scale. This actually isn't a coincidence given the discussion of the circle of fifths. There are twelve notes in the circle of fifths, forming the chromatic scale. If we take seven consecutive ones, we get the major diatonic scale which, in C, is the white notes on the piano. We have five notes left over, then, the black notes forming a nice pentatonic scale. So go nuts on the black notes.

More like this

Have you read This is Your Brain on Music by Daniel J. Levitin? It deals a lot with this kind of thing (plus some psychology of music). My guess from this post is that you would like it, even though it gives a cursory treatment to all this (I didn't know anything about music, but expected a bit more psychology from it).

Chimpanzees aren't overtly musical, but they identify pairs of tones as consonant or dissonant in almost exactly the same quantitative range as humans, with dissonance peaking at about a quarter-tone. I can't easily find the reference. But see:

Psychological constraints on form-bearing dimensions in music
Stephen McAdams

Contemporary Music Review, 1989
Copyright © CMR 1989

In raising the question of form-bearing dimension in music, we are trying to understand the possibilities and limits of the apprehension musical form in terms of the psychological mechanisms that operate on a received acoustic structure. To approach this understanding theoretically and experimentally, we need to define the notion of form-bearing dimension and to develop some ideas on the interactions that take place between perceptual processes and memory structures as form is accumulated in the mind of a listener. Three areas of psychological concern are discussed: perceptual grouping processes, abstract musical knowledge structures and event structure processing. For each area, the constraints on different musical dimensions such as pitch, duration, dynamics and timbre are examined in light of their potential to carry musical form.

Keywords : auditory grouping, event structure, form-bearing dimension, knowledge structure, mental representation, musical form, perceptual invariance, psychological constraints.

See also:


Dissonance of musical dyads arises due to rapid beats between .... (a three-quarter tone), for which the maximum roughness value ...…

It's no big surprise that most music is written with a lot of octaves, major fifths and fourths. They're the intervals which are the most pleasing sounding to the human ear. Just about everything else is less pleasing to the human ear.

On the other hand, there is some music which is written with a lot of dissonant sounding intervals, like the tritone (ie. an augmented 4th or flatted 5th interval) which is one of the most dissonant sounding intervals. (ie. Listen to the song "Black Sabbath" by Black Sabbath).

There are some genres of music which play exclusively in the chromatic scale, such as some extreme forms of punk rock and heavy metal like: death metal, grindcore, black metal, speed/thrash metal, etc ...

The reason there is a cycle of 5ths (and inversion as cycle of 4ths) is precisely because 5 is the only number equal or less than the 12 semitones in a Western octave which is relatively prime to 12.

When there are a prime number of intervals in an octave, there is only a chromatic scale ascending or descending. When there are 30 intervals in an octave, there is a cycle of 7ths and a cycle of 11ths. The orbifold aspects of this are in the only Music Theory article in Science for the past century, and rather recently.

You have to be careful equating "consonance" with "pleasing" and "dissonance" with "displeasing". There are many people that like dissonances because of the tension created. Consonance and dissonance can be defined by several different contexts: physics (measuring the beats created by disruption of the two waves), cultural (how sonorities are expected to be used in a given genre or culture), and personal aesthetics are the main ones I can think of. One may argue that some psychological expectations are not culturally based but universal to all people, but the only interval that comes closest to this universality among all musical cultures is the octave. Even within Western culture there have been changes in the aesthetic judgment of intervals. The perfect fourth was considered a consonance in the early Medieval period, a dissonance in the Renaissance, and both in the Common Practice period. A good book on this is James Tenney's A History of Consonance and Dissonance.

I understand "consonant" and "dissonant" ... but please don't equate them universally to "pleasant" and "unpleasant." That's just silly ...

By Scott Belyea (not verified) on 01 Sep 2007 #permalink

I will pitch in with the commenters that see a difference between consonant/dissonant and pleasant/unpleasant. The later is probably a cultural context and something we learn, much as a language. (And much as a language and baby language, we are probably evolved to structure it in certain ways.)

The modern "western" scale is a late invention, it is a compromise to permit scaling, rythms (old and new) are important, so is the visual and kinesthetic context, et cetera.

By Torbjörn Lars… (not verified) on 01 Sep 2007 #permalink

"I think that violinists and other fretless instruments also play perfect fifths, too, but I don't remember."

Violins (and violas, cellos, and double basses) can play perfect fifths, or any other abitrary pitch interval. They (and the voice, trombone, etc) are continuously variable pitch instruments, unlike (say) a piano, which is a fixed discrete pitch instrument. Violins play whatever tunings suit the other instruments they accompany, so when they play along with a piano they play a tempered scale to match the piano, but when the play along with other variable pitch instruments, such as in a string quartet, they play in pure tunings.

As to dissonance. An interesting and very little known fact about about dissonance occurs in the classic blues sound, which can be generally defined as a melody constructed from a minor scale, played over a chord progression built from a major scale, with the same tonic as the melody scale.

Try this interesting exercise in different kinds of dissonance: Play a dominant seventh chord, say G B D F, then add Bb above the chord, and you will get the classic and pleasing dissonance sound found throughout blues, jazz and rock music. This chord is a dominant seventh, flattened ninth, or G7-9, and is basically a minor third above a major third. (Note that this chord contains a tritone interval, B-F.) But, and here is the interesting bit, try swapping the B and Bb around to give the interval structure G Bb D F B, or a major third above a minor third, and it sounds truly awful.

Furthermore, you don't need all the notes of a complex chord (a chord with more than three notes) to produce a pleasing sound, or the characteristic sound of that chord. Try playing G B F, or G D F, and both with give you a dominant seventh (rooted in G). The trick is to have an interval of a third in there somewhere, G-B in the first chord voicing, and D-F in the second. This is a really basic example, and it gets very complicated very quickly, but you get the idea.

Blues based music also uses microtones in between the various intervals, especially the major and minor third (and its inverse, the respective sixths), which are produced when a blues guitarist 'bends' the note slightly, and which give the blues so much of its characteristic sound. Arabic music also uses an interval somewhere between a major and minor third, which gives a very interesting and characteristic sound indeed.

Lastly, the tritone interval (six semitones, equal to C-F#) is not actually dissonant as such, it is more a neutral interval which is used as a harmonic pivot in jazz chord substitution, which lies behind the major musical breakthrough that was be-bop, (for which we can thank Charlie Parker and Thelonius Monk, with a lot of help from Dizzy Gillespie). Interestingly, Bach's music hinted at this stuff about 300 years previously.

I love music theory (and the maths/physics behind it). Thanks for the interesting post.

By Obdulantist (not verified) on 02 Sep 2007 #permalink

when the play along with other variable pitch instruments, such as in a string quartet, they play in pure tunings.

That was what I was wondering. Thanx.

Isn't a G7-9, G B D F Ab? Do you mean G7#9?

I suppose I should say something about the consonant/disonant pleasing/displeasing conflation in my post. I certainly agree that dissonance is great (I'm a big fan of V+ at the moment), but, horribly unscientifically based on no evidence, I do suspect that there is something basic about the octave, the fifth and maybe the fourth. There must have been experiments playing tritones and fifths for small babies and gauging the response. Anyone know?

I enthusiastically agree with #8 by Obdulantist. Thelonious went to my high school, whose alumni, irked that Peter Stuyvesant was antisemitic, recently and unsuccessfully proposed that the the school be renamed Thelonious Monk High School.

As mentioned on Wikipedia:

Little is known about Monk's early life. He was born on October 10, 1917 in Rocky Mount, North Carolina, the son of Thelonious and Barbara Monk, two years after a sister named Marian. A younger brother, Thomas, was born a couple of years later. Monk started playing the piano at the age of nine; although he had some formal training and eavesdropped on his sister's piano lessons, he was essentially self-taught.

In 1922 the family moved to Manhattan living at 243 West 63rd St., and Monk attended Stuyvesant High School, but did not graduate.

He briefly toured with an evangelist in his teens, playing the church organ, and in his late teens he began to find work playing jazz. He is believed to be the pianist featured on recordings Jerry Newman made around 1941 at Minton's Playhouse, the legendary Manhattan club where Monk was the house pianist. His style at the time is described as "hard-swinging," with the addition of runs in the style of Art Tatum. Monk's stated influences include Duke Ellington, James P. Johnson, and other early stride pianists.

Monk's unique piano style was largely perfected during his stint as the house pianist at Minton's in the early-to-mid 1940s, when he participated in the famous after-hours "cutting competitions" that featured most of the leading jazz soloists of the day. The Minton's scene was crucial in the formulation of the bebop genre and it brought Monk into close contact and collaboration with other leading exponents of bebop including Dizzy Gillespie, Charlie Christian, Charlie Parker, Miles Davis, Sonny Rollins, and Milt Jackson.

Now, I used to go to concerts by Max Roach, in NYC and when he was a professor at UMass/Amherst, and my Mom used to talk with Sonny Rollins when he was dropped out but practicing at night on the Brooklyn Bridge.

I had a year of intensive Classical Guitar as a student of a student of a student of Segovia, basically to improve my blues and folk guitar singer/songwriting. The #8 comment linking orbifolds (implicitly) and Blues and Jazz and Arabic music (cf. Alan Ginsberg's comments of the Arabic influence on Bob Dylan) is right on target.

By the way, Chris Rock was another entertainer who dropped out of Stuyvesant, and so is not well known as a pseduo-alumnus. Length prohibits me from naming other entertainment co-alumni such as Jimmy Cagney, and numerous Nobel laureates and Field medalist and the like.

Music, Math, Physics. Yes!!!

"Isn't a G7-9, G B D F Ab? Do you mean G7#9?"

Oops, correct. I can only plead a late night posting.

"I do suspect that there is something basic about the octave, the fifth and maybe the fourth. "

I agree, and if I recall correctly, they are the most common intervals in the different scales used by different cultures. I don't think it is any coincidence that the first few intervals generated in an overtone series are (in order) the octave, the fifth, the fourth, (followed by the major third, and the minor third).

Using C as the fundamental, the overtone series starts out as C C G C E G Bb, etc.

By adding E the overtone series generates both a major and a minor interval (C-E, E-G), which gives us the first full chord, the major triad (C E G). Adding the next overtone (Bb) suddenly makes things a whole lot more interesting.

Firstly, it gives us the start of a chord that is both an implicit minor chord (G Bb), and which has its fundamental on the fifth of the original overtone series (G).

Second, it generates a half-diminished chord (E G Bb), an important chord for modulating between keys, which also contains the tritone interval (E-Bb), which is closely related to:

Third, it generates the dominant seventh interval to the original fundamental (C-Bb). So, after the major triad (C E G), the next chord generated in an overtones series is the dominant seventh (C E G Bb), arguably the most important chord in diatonic music. This chord, as any musician will tell you, wants to resolve to the key of F, and the dominant seventh chord in F wants to resolve to Bb, and in Bb to Eb, and so on, thus producing the circle of fifths.

And that is one a hell of a school you attended, Mr Vos Post.

By Obdulantist (not verified) on 02 Sep 2007 #permalink

By adding E the overtone series generates both a major and a minor interval (C-E, E-G), which gives us the first full chord, the major triad (C E G). Adding the next overtone (Bb) suddenly makes things a whole lot more interesting.

Yeah. That's in the post, even :). I didn't talk about chord progressions, though

Pitch perception skewed by modern tuning

* 03 September 2007
* news service…

Mozart had it; Leonard Bernstein had it; even Jimi Hendrix reportedly had perfect pitch - the ability to recognise a musical note without a reference tone. Now it seems that orchestral tuning may be skewing note perception in people with this rare talent.

Jane Gitshier at the University of California, San Francisco, and her colleagues identified 981 people with exceptional pitch-naming ability. However, these people often had trouble with G# and A#, misidentifying them as A.

Gitshier speculates that since orchestras tune to A over a range of frequencies, exposure to this may widen people's "A category" and make them lump together adjacent notes (Proceedings of the National Academy of Sciences, DOI: 10.1073/pnas.0703868104).

From issue 2619 of New Scientist magazine, 03 September 2007, page 20

And, yes, Obdulantist, it was "one a hell of a school you attended." I was actually in the bottom half of my class, by grade point average, and was still accepted to Caltech, where I was still below average in many ways.

It is no coincidence that Einstein played the violin...

Jonathan Vos Post,

Could there be a continuum in people being able to judge pitches without a reference? (ie. From people who have almost perfect pitch to folks who have no pitch perception whatsoever, on a sliding scale).

In my case, I can recognize E and E flat notes played on a guitar or piano relatively easily. This probably has to do with the fact that the lowest and highest strings on the guitar are tuned to E or E flat, which is typically played a lot. (I've played guitar for many years).

To a lesser degree, I can recognize the A and G notes.

For most other notes, I can't really recognize them easily without a reference.

Small error in the piece -- it's the A above middle C which is set to 440 Hz, not the one below. Otherwise, a really interesting article. The A below middle C is "uncomfortably low" for many instruments of the orchestra to tune to (trumpet and flute, for example). Also, the frequency of A has been rising over the centuries, a complaint of many singers, including Placido Domingo. The high Cs written for tenor by composers like Bellini and Donizetti sounded at about the pitch of today's B flat.

By Wayne McCoy (not verified) on 03 Sep 2007 #permalink

Great post! I've long been convinced that there must be some nice mathematical explanation for why we pick out the 7 notes of the major scale from the chromatic scale, but never worked it out. Probably because I'm not a musician and have no idea what I'm talking about. Your explanation makes sense.

Aaron #12.

Fair point, I forgot that detail in the couple days between reading the post and writing that comment. Perhaps understandable given the very info rich post. :)

JC #14

It has been well established that perfect pitch is something that most people can acquire if taught it properly from an early age. Like language, there is a developmental window of opportunity during which this can be done. Hungary has a fantastic musical education system, and the population has high levels of musical proficiency and perfect pitch.

By Obdulantist (not verified) on 03 Sep 2007 #permalink

There's a new book on this; How Equal Temperament Ruined Harmony (and Why You Should Care); Ross Duffin.

It has, you can deduce, a Message. Does distinguish between harmony in chords and harmony as time progresses. Written by a musician, for musicians, so it has a history of the arrangements of the commas.

Many musicologists blame the piano accordion for the loss of musical diversity, especially in Europe. Seriously.

By Obdulantist (not verified) on 03 Sep 2007 #permalink

Equal Temperment ruined harmony? The Well Tempered Clavier by Bach is absolutely great stuff. Okay okay, Bach's harmony unfolds in time and is not so much chordal. But it is funny how great music can come from great constraints while really lousy music can come from total freedom. Great composers can do wonders with so little! The modest and insignifcant look for justifications for their lack of creativity.

"21st Century Science and Technology", the engagingly nutty pop-science magazine edited by the followers of Lyndon LaRouche, one published an article arguing fervently that in order to restore greatness in music, middle C MUST be defined as exactly 256 Hz. (I don't recall if it blamed the A=440 convention on a British conspiracy, but I wouldn't be surprised.)

By Robert P. (not verified) on 04 Sep 2007 #permalink