# Math and Music

Gold Member

## Main Question or Discussion Point

One octave is a doubling of frequency, say, 440Hz to 880Hz for A.
If I understand correctly, that is divided into 12 equal divisions, denoted by all 12 naturals and sharps/flats.
Of those 12, any given key tends to use only 8.

Why do these 8, which are not evenly distributed throughout the octave, sound pleasing to the ear?

Why is it whole, whole, half, whole, whole, whole, half? I guess that gets into fifths ad fourths and thirds, which I don't quite understand.

This irregularity, in what should be regularity, disturbs my sense of continuum. Help me understand.

Related Art, Music, History, and Linguistics News on Phys.org
Borek
Mentor
If I understand correctly, that is divided into 12 equal divisions
They are not equal, it is more like a logarithmic scale.

Then, it is not like only 8 of the notes sound pleasing to ear. Every single frequency is OK, even those outside the notes. What is important is that as long as the frequencies of the sounds are in correct ratios they create a nicely sounding progression and they sound well together (like in chords).

Then, there is the microtonal music.

So basically you are wrong on every account.

All discussions of music and math fall immediately into the deep end of the pool. As unlikely as it sounds, I'd say you are both right.

Modern western music (and my guitar necks) are mostly built around a 12 note, evenly tempered chromatic scale based on a logarithmic interval of ##\sqrt[12] 2 ## between semitones (for instance, between C and C#, C# to D ...), although even this isn't clear cut; well temperament, as in Bach's Well-Tempered Clavier, is but one system of tweaking temperament intervals so pleasing-sounding chords can be played over an instrument's entire tonal range. Western music also has several forms of 'just' intonation which also have different, untempered spacings between semitones, and a whole crop of other intonation systems abound in non-western musical traditions.

This is one of the many places where things get weird. In an evenly tempered scale, the diatonic interval of a perfect forth (E and A, for instance) sounds exactly the same as the augmented third chromatic interval E and G# because, being evenly tempered, the frequencies of G# and A notes are identical; in just intonations they aren't the same frequencies. Adding to the confusion, Greek nomenclature for their three standard tunings for 4 stringed instruments were called diatonic (for instance, A-G-F-E), chromatic (A-Gb-F-E), and enharmonic (A-Gbb-F(q)-E) where what I'm showing as F(q) is F lowered by a quarter-tone, and G-flat-flat would be close to an evenly tempered F, but isn't exactly as note spacing (usually) followed a 3 cycle Pythagorean 'just' intonation scheme.

My copy of From Polychords to Polya: Adventures In Musical Combinatorics came in handy for the above, but it is dear - Amazon shows used copies at \$60 USD on up! I haven't read it, but The Math Behind the Music looks interesting, and is reasonably priced.

This irregularity, in what should be regularity, disturbs my sense of continuum. Help me understand.
Don't know if this qualifies as BS or insight, but the question of musical scales puts me in mind of Euler's identity in that both incorporate natural, logarithmic, and irrational numbers. Octave ratios are rational (i.e 880 Hz to 440 Hz), within an octave note frequencies are logarithmic, and note interval ratios are irrational.

billy_joule
Gold Member
They are not equal, it is more like a logarithmic scale.
Sorry, I should have said proportional.

What is important is that as long as the frequencies of the sounds are in correct ratios they create a nicely sounding progression and they sound well together (like in chords).
But why? What makes 8 out of 12 pleasing? And why whole whole half whole whole whole half?

Gold Member
OK, so it's (almost) 1/8, 1/4, 1/3, 1/2, 2/3 7/8, 1.

So that suggests to me that it is those specific frequencies that harmonize - either as eighths or as thirds (their peaks would be synced). Those fifths would sound dissonant with these.

I've never really examined such a chart that showed the logarithmic scale marked out with linear fractions.

Gold Member
It seems to me then, looking at that chart, that one could theoretically make a pleasing scale that only used fifths (1/5, 2/5, 3/5, 4/5 and 1) - i,e,: C D#, F#, G# and A# - since they all harmonize.

I wonder if anyone has done that.

Borek
Mentor
But why? What makes 8 out of 12 pleasing?
It is not that 8 out of 12 are pleasing, have you read what I wrote?

Pentatonic scale uses five sounds. Will you count them as 5 out of 12? And which 5, as there are several pentatonic scales? And why these 5 are incorrect and 8 are correct?

There are many heptatonic scales, which one gives these 8 out of 12? Why this one, and not some other?

Plus, in the microtonal music there are many more sounds in use.

Yes, the question about why some combinations of frequencies are pleasing to the ear is an interesting one, but it is in no way equivalent to the narrow "why CDEFGAHC?", it is a much wider problem.

It seems to me then, looking at that chart, that one could theoretically make a pleasing scale that only used fifths (1/5, 2/5, 3/5, 4/5 and 1) - i,e,: C D#, F#, G# and A# - since they all harmonize.

I wonder if anyone has done that.
This is how DJs mix music (harmonic mixing). Each track has its own musical key, and if the next track is a perfect fifth above or below, it will usually fit.

The 12 semitones we use is just western music, just think of it as extra "tension" notes you can play around with. If you want it to that everytime you play a note it will always fit (like for improvisation or some eastern music), play the pentatonic scale. I am much more a fan of that scale, and always thought the 12 tones in western music was a little bit arbitrary.

symbolipoint
Homework Helper
Gold Member
Amazing! A discussion or argument about music! One would guess that at least a couple of the participants have good or better musical understanding, but this is a job for Leonard Bernstein to try to help. Okay, he can not participate, mostly because he is now dead; but there are some interesting videos on YouTube, just needing someone to do the search.

Jonathan Scott
Gold Member
Major and minor keys are conventions, as are the "modes" which preceded them. However, the major scale is based on a simple pattern.

A major triad is a set of notes whose frequencies are in the ratio 4:5:6 which sound well together (for example CEG). The notes of the major scale also include the major triads which end on the first note of the root triad (FAC, subdominant) and start on the last note (GBD, dominant). So the notes in those three triads (root, subdominant and dominant) make up the major scale when arranged into ascending sequence and adjusted to the appropriate octave.

NTL2009
jim mcnamara
Mentor
Did you ever hear a 'wolf tone' or a dissonant piece of music? Charles Ives come to mind - people hated some of his compositions for excessive use of dissonance. These tones did sound well together in a chord.

First off, the well tempered tunings we use nowadays were not employed extensively until about the time of J S Bach. There were/are many other scales:
https://en.wikipedia.org/wiki/List_of_musical_scales_and_modes

Some are pentatonic (5 tones not 8), example Peruvian 'pan flute'. There are other non-8 tone scales. Microtonal music does not do well in the notational context of music the way we learned it in elementary school.

G Zarlino (Renaissance) wrote several treatises on harmony and tunings, which started the ball rolling toward the more modern Well Tempered scale. Composers like Ives, Henry Cowell, Arnold Schonberg, and John Cage attempted to undo that, pretty much from the start of the 20th century.

https://en.wikipedia.org/wiki/Gioseffo_Zarlino

Now we have a sort of 'everyone's scale is right, and nobody's scale is wrong, therefore whatever I do is worthy' point of view. IMO, neither terribly productive or interesting. Somewhat like modern art: folks love it or hate it. Criticizing it negatively may get you placed in the Neanderthal Hall of Fame. Actually given the Neanderthal brain size compared to us modern humans, that might not be much of an insult.

kith
If you play a single note on a musical instrument, many different oscillation modes are excited. So beside the root, you get overtones which build up the harmonic series. (The relative intensities of the overtones vary depending on the instrument which is what gives each instrument its characteristic sound. But generally, if you play a note, lower overtones are more present than higher overtones.)

Let the basic premise be that simple frequency relationships correspond to consonance while complicated frequency relationships correspond to dissonance. If you look at the harmonic series, there are a number of ways to make it plausible that the major scale sounds consonant under this premise.

The first and the second overtones are the ocatve and the perfect fifth. Successively stacking perfect fifths and adjusting the octaves should give a scale with few dissonances between the different notes because each note occurs early in the harmonic series of other notes and therefore many simple frequency relationships occur.

This simple rule already gives us almost the major scale. What we get is the lydian scale which differs from the major scale by a single note: it contains the augmented fourth instead of the perfect fourth. Since the augmented forth occurs very far down the harmonic series of the root, it involves a very complicated frequency relationship. This makes it plausible that replacing it by a perfect fourth may improve the overall consonance. (What I have ignored here are little differences in frequencies between the usual equal temperament tuning and the actual frequencies of the overtones.)

Similarily, we could note that the major chord as a whole occurs early in the harmonic series (overtones 4,5,6) which is related to what @Jonathan Scott has written.

Last edited:
billy_joule
Gold Member
It is not that 8 out of 12 are pleasing, have you read what I wrote?
I did. But it mostly seems to tell me how I'm wrong, rather than what's right, so I had no response.

symbolipoint
Homework Helper
Gold Member
If you play a single note on a musical instrument, many different oscillation modes are excited. So beside the root, you get overtones which build up the harmonic series. (The relative intensities of the overtones vary depending on the instrument which is what gives each instrument its characteristic sound. But generally, if you play a note, lower overtones are more present than higher overtones.)

Let the basic premise be that simple frequency relationships correspond to consonance while complicated frequency relationships correspond to dissonance. If you look at the harmonic series, there are a number of ways to make it plausible that the major scale sounds consonant under this premise.

The first and the second overtones are the ocatve and the perfect fifth. Successively stacking perfect fifths and adjusting the octaves should give a scale with few dissonances between the different notes because each note occurs early in the harmonic series of other notes and therefore many simple frequency relationships occur.

This simple rule already gives us almost the major scale. What we get is the lydian scale which differs from the major scale by a single note: it contains the augmented fourth instead of the perfect fourth. Since the augmented forth occurs very far down the harmonic series of the root, it involves a very complicated frequency relationship. This makes it plausible that replacing it by a perfect fourth may improve the overall consonance. (What I have ignored here are little differences in frequencies between the usual equal temperament tuning and the actual frequencies of the overtones.)

Similarily, we could note that the major cord as a whole occurs early in the harmonic series (overtones 4,5,6) which is related to what @Jonathan Scott has written.
Complicated but assumedly very good. Now, what does that all mean? Does any of that tell us what the music is saying when we hear it, or how to select or create musical stuff when we want to show or express something?

kith
Complicated but assumedly very good. Now, what does that all mean? Does any of that tell us what the music is saying when we hear it, or how to select or create musical stuff when we want to show or express something?

Slightly longer answer: Finding the most consonant sounding set of notes is not music but the most boring thing ever. Examples: playing the same note over and over again, playing a scale only composed of octaves, etc. I would say that music lives from the interplay between tension and relaxation. How much tension is perceived as interesting is both a cultural and a personal thing.

In the terminology of my last post this means that we need someone to decide whether a certain frequency relationship in a given musical context is simple enough to be perceived as consonant (aka the measurement problem of music).

fresh_42
Mentor
FWIW, G. Mazzola wrote many books about mathematics and music. I have one titled "Groups and Categories in Music". He investigates the conjugation classes of ##\vec{GL}(\mathbb{Z}_{12})## of affine homomorphisms and assigns a musicality parameter to them. Regarding the volume of his work, I guess the connections between math and music are manifold and complicated. Unfortunately I haven't found a certain place, which especially deals with the given question (but I haven't searched for too long).

TeethWhitener
Gold Member
OK, so it's (almost) 1/8, 1/4, 1/3, 1/2, 2/3 7/8, 1.

View attachment 212120

So that suggests to me that it is those specific frequencies that harmonize - either as eighths or as thirds (their peaks would be synced). Those fifths would sound dissonant with these.

I've never really examined such a chart that showed the logarithmic scale marked out with linear fractions.
One of the original tuning systems was Pythagorean tuning, where the frequencies that make up the scale are related by simple whole number ratios. The 12-tone system of Western music comes from the fact that ##2^7 \approx (3/2)^{12}##, so that 7 octaves is almost 12 perfect fifths. Over the years there were various tuning schemes to enforce an equality there. The obvious problem is once you choose a fundamental frequency in Pythagorean or related tunings, only that key or closely related keys sound like they're in tune. As musical technique advanced and more distant key modulations began to pop up, Western music began to converge on the idea of equal temperament, where all keys would be equally slightly out of tune. This is somewhat less of an issue for choirs or string ensembles, which can adjust their intonation on the fly, but it is absolutely essential for keyboard instruments, whose intonation is basically fixed for the entire duration of a performance.

TeethWhitener
Gold Member
It seems to me then, looking at that chart, that one could theoretically make a pleasing scale that only used fifths (1/5, 2/5, 3/5, 4/5 and 1) - i,e,: C D#, F#, G# and A# - since they all harmonize.

I wonder if anyone has done that.
https://en.wikipedia.org/wiki/Harry_Partch
Harry Partch was pretty famous for his work with microtonality and just intonation.

TeethWhitener
Gold Member
In an evenly tempered scale, the diatonic interval of a perfect forth (E and A, for instance) sounds exactly the same as the augmented third chromatic interval E and G# because, being evenly tempered, the frequencies of G# and A notes are identical; in just intonations they aren't the same frequencies.
This is incorrect. Maybe you mean G# = A-flat? Or maybe C-flat = B (or E-sharp = F) is a better example. G# is a different note from A in pretty much every tuning system I know of.

Maybe you mean G# = A-flat?
Oh, duh. Yes, I had meant Ab!

Major and minor keys are conventions, as are the "modes" which preceded them. However, the major scale is based on a simple pattern.

A major triad is a set of notes whose frequencies are in the ratio 4:5:6 which sound well together (for example CEG). The notes of the major scale also include the major triads which end on the first note of the root triad (FAC, subdominant) and start on the last note (GBD, dominant). So the notes in those three triads (root, subdominant and dominant) make up the major scale when arranged into ascending sequence and adjusted to the appropriate octave.
I think this is the best explanation for the OP.

Other posters seemed to go off as if it was a competition of which scale is or isn't pleasing, but I think what OP was getting at is that the major scale is just so very common and basic to Western Music (do-re-me-fa-so-la-ti-do) and why should that be? As he stated, the "whole, whole, half, whole, whole, whole, half" step pattern seems rather odd.

But as @Jonathan Scott points out, the major triad chord is also a very pleasing sound and basic to Western Music, as it is made up of simple ratios of 4, 5, and 6. Starting with the note "C" (do) and using "Middle C" on the keyboard as reference, the 4x ratio is the "C" two octaves above Middle C. The "G" above that "C" is at a ratio of 6 to "Middle C", and the "E" above that "C" will be at a ratio of 5x. You can find tables or create one yourself using the factor 2^(1/12), but the 5 and 6 will be off slightly from these whole numbers due to the equal tempered application.

I find it is interesting that he goes on to show that when you take the major triad of C (C E G), and another major triad based on the G in that chord, you add the notes (G B D). Those notes make the scale C D E - G - B C, and then adding an F major triad (F A C, which ends on C), you get the rest of the notes of the major scale, for the full CDEFGABC.

Now, I can't decide if this is just 'data mining', and finding a pattern that fits, or something more basic. But it seems pretty basic: C-G is a 'fifth', and then F-C is a fifth (or as he puts it, the F is the sub-dominant of the C). But it is interesting to me.

Asymptotic
Jonathan Scott
Gold Member
Another pattern which generates the major scale is simply to follow the circle of fifths starting on the subdominant (that is F when the tonic is C) for 7 steps. That is, either go up a fifth (a factor of 3/2) or down a fourth (a factor of 3/4): FCGDAEB. However, in that case the stopping point is more arbitrary, and so for that matter is the starting point.

Asymptotic and NTL2009
BWV
The diatonic (i.e. white keys on a piano) scale pattern of whole and half steps dates back to antiquity with some evidence that they existed in ancient Mesopotamia. The modern concept of keys and harmony is a 17th century invention. The fact that a major scale contains major triads on the 1st, 4th and 5th scale degree is why it grew to prominence over older modal systems during the Baroque period.

Why do the 7 notes sound good ? Because 6 out of the 7 natural triads are major or minor chords, the perfect versions of which are decent harmonic groupings : 4/5/6 and 10/12/15. Toss in a bit of reverb and a melody can give itself a bit of depth from interacting harmonically with previous notes.

Regarding modern tuning, the "circle of fifths" is only an approximation. Everybody's used to it, but...

As a real-life example : working with a chamber choir, we tuned to the (digital) piano CGEC, sustained the chord then cut it off. For 15 seconds the echo persisted in the space. Then again, sans piano, tuning harmonically to each other. 34 seconds.

Last edited:
BWV
Well, Beethoven still sounds good on a piano and would make no sense in equal temperament

Some primarily French composers in the 70s began writing music based on actual partials rather than equal tempered tuning with some cool results. For example Gerard Grisey wrote this orchestral piece based on the spectrum of the initial low trombone note -he then used the rest of the orchestra to in essence synthesize the trombone timbre then play around with it

hmmm27