Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Why 12 notes in Western music? (github.com/aguaviva)
253 points by xchip on Aug 29, 2022 | hide | past | favorite | 158 comments


Another possible explanation, which I'm surprised the author didn't go through is the "Circle of Fifths" which basically says:

Since Fifths sound so great, why not just keep doing that? When we get to the next octave, then come back down. If we get to a place that's "pretty darn close" to another note, then stop. The Python explanation looks like:

  f = 440
  for i in range(13):
      print(i,f)
      f = f * 3/2
      if f > 880: f=f/2.0

  0 440
  1 660.0
  2 495.0
  3 742.5
  4 556.875
  5 835.3125
  6 626.484375
  7 469.86328125
  8 704.794921875
  9 528.59619140625
  10 792.894287109375
  11 594.6707153320312
  12 446.00303649902344
Note that after exactly 12 steps, we're back at 446 which is "pretty close" to 440. So, we take this set of notes, sort them, and just jigger it a little bit to get the 12 notes we know today.


It's worth mentioning that stacking fifths this way creates something pretty close to an octave, but it's still noticeably different from an octave. The difference between an octave and 12 fifths is called "Pythagorean comma", it's about 23.46 cents and it'll be obvious to all humans who don't have a speech/hearing impediment, even if you were never musically trained. (It's believed humans are sensitive to small intervals like this because it's required to process spoken human language). Traditionally, it's considered anything more than a synctonic comma (i.e. 21.51 cents) will feel different to even untrained ears. (but of course, this is just the theory, in reality there is some small variance between humans, background, culture etc).

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

This is pretty significant to mention, because even though 12 fifths are "very close" to an octave [1], they're far apart enough that no one will feel an octave. In music, near misses like this are very significant since they cause the feeling of harmonic "dissonance". Since 12 fifths is a very dissonant interval (since it's so close to an octave but still noticeably out-of-tune) Western music developed techniques (such as well-temperament, equal temperament etc) to make sure this "error" is blend in. We achieve this by changing other notes ("tempering") ever so slightly so that critical intervals like fifths (or in other cases thirds etc) are stable. Other cultures, such as classical Indian music, have their own way dealing with Pythagorean comma! Since music is a universal phenomena found in all cultures, but it doesn't manifest the same way in all cultures (e.g. not all cultures give the same kind of emphasis to pitch or harmony Western music gives) various cultures developed their own different and interesting ways to work around this "error".

[1] To be precise, we're referring to the difference between 12 fifths and 7 octaves. Since an octave is so consonant, sounds N octave(s) apart feel "equal" albeit with different timbre.


Somewhere there is a perfect universe where 12 fifths form an octave.


I've heard there is a secret chord, that prophets play to please their lords.

But if you care for music less than algebra, just know it goes like this; the fourth, the fifth: the minor falls, the major lifts.


But, you don't really care for music; do ya?


Well played


That would have to be a universe in which the fundamental theorem of arithemetic was false. Otherwise, the only way to cross an interval that is an integer number of octaves is to take steps that are also octaves.


What the parent proposed doesn't require different math.

Just a species that hears out current slightly offset divisions in 12-tet as perfect, as opposed to only hearing integral ratios as perfect.


Viewing sound waves that don't synchronize with each other as being better matched than sound waves that do synchronize is less plausible than violating the fundamental theorem of arithmetic. There's no element of coincidence in whether two frequencies harmonize.

That hypothetical species wouldn't recognize two notes an octave apart as being similar, so there would be no reason to imagine a circle of fifths in the first place.


>Viewing sound waves that don't synchronize with each other as being better matched than sound waves that do synchronize is less plausible than violating the fundamental theorem of arithmetic

Actually it's perfectly plausible. People couldn't imagine others enjoying hearing a tritone -- and nobody in 1800 would imagine we'd enjoy listening to punk, hip hop, or Death Metal, and yet, millions do. We can surely consider a race that doesn't require intervals to absolutely synchronize.

>That hypothetical species wouldn't recognize two notes an octave apart as being similar, so there would be no reason to imagine a circle of fifths in the first place.

Note how I said that this imagined alien race would consider the "divisions in 12-tet as perfect". Note how those do include a perfect octave, that we already recognize as such. The alien race wouldn't change that, they'd just need to also consider perfect the slightly off ratios in 12-tet.


> Actually it's perfectly plausible.

No, for this to be plausible, you would need to have some theory of why the two notes matched with each other. There is no such theory; they have been chosen to be as unmatched as possible.

> nobody in 1800 would imagine we'd enjoy listening to punk, hip hop, or Death Metal

This is false.

>> That hypothetical species wouldn't recognize two notes an octave apart as being similar

> Note how I said that this imagined alien race would consider the "divisions in 12-tet as perfect". Note how those do include a perfect octave, that we already recognize as such. The alien race wouldn't change that

Sure. In that case, we can also imagine an alien race that perceives all and only the light that fails to reach its eyes.

Then again, perhaps being able to form a sentence describing something doesn't guarantee that the situation described is possible.


OK, I see that the discussion is futile.

This is both pedantic, condescending, and unwilling to entertain an idea.

In any case, just for anybody interested:

>No, for this to be plausible, you would need to have some theory of why the two notes matched with each other. There is no such theory; they have been chosen to be as unmatched as possible.

Nothing has in 12-tet has been "chosen to be as unmatched as possible". Instead, we've chosen it to match the ratios as close as we can, given the compromises we had (simpler instruments, larger range, etc.).

The 12-tet values still has strict mathematical properties, it's not just some random off collection of pitches - and it could be that, which is perceived as "perfection" by the imaginary alien race (that it is equally spaced values on a logarithmic scale).


> The 12-tet values still has strict mathematical properties, it's not just some random off collection of pitches - and it could be that, which is perceived as "perfection" by the imaginary alien race (that it is equally spaced values on a logarithmic scale).

This is an analysis you can't even apply to two notes. Every pair of notes is "equally spaced along a logarithmic scale", for the same reason that every pair of geographic locations is "equally spaced" along a linear scale, and of course also equally spaced along a scale with sinusoidal spacing. You have a single data point, and it's equal to itself. The claim has no meaning unless you're simultaneously evaluating more than two things.

In reality, of course, we perceive sounds as being related to each other when they have frequencies that are related to each other. This removes the need to evaluate them against imaginary background standards.

And two notes drawn from a 12-tet scale cannot have related frequencies unless they are separated by an integer number of octaves. The period of the combination of a note with its own fifth is double the period of the base note. The combination of a note with its 12-tet fifth is aperiodic.

> Nothing has in 12-tet has been "chosen to be as unmatched as possible".

Think before you speak.


Distinguishing different pitches implies distinguishing dissonant intervals from consonant intervals: there is no way they can sound equally "perfect".

What is definitely possible, instead, is liking dissonant intervals more than consonant intervals, for example because they sound "fatter".


Yes, that's correct.

Interesting tidbit: the ratio of a circle to its diameter isn't necessarily always Pi, but Pi will always be Pi as long as the foundation of mathematics holds.


You don't need a new universe. You just need a species that hears sounds a little differently. We won't like listening to their music, but it'll be really great for them.


Eh, I think you'd need a new universe, as it's a pretty basic principle of math:

  3^12 ~= 2^19
You can take two long strings of equal length (A & B), and pluck them, and they'll make the same sound. Then you can take scissors cut string A in half, and it'll sound different. (This is an octave.)

Then you can cut string B into thirds, and it too will sound different.

If you pluck both of your new strings at the same time, you'll find they sound quite nice together (the difference between these two is called a "fifth").

And after 12 rounds of cutting string B into thirds, and 19 rounds of cutting string A in half, you'll happen to have a string from each group that are almost identical in length and pitch.

But it won't line up exactly! They'll be about 1.4% different in length, which roughly works out to a quarter-semitone difference in pitch (i.e. 1/4th the distance from one piano key to the next).


But who says the creatures need to perceive sound in such a way that the harmonic series has sensory significance? To be honest I’ve never seen a compelling evolutionary explanation for why “hearing the harmonic series” developed in the first place. It obviously seems useful to be able to perceive sounds generated by (roughly) harmonic oscillators, since those occur naturally for various reasons, but why octave equivalence?


Look at it from a frequency perspective instead of genetic.

When you overlay two waveforms that are related x:1, the zero points of the waveforms align. The wave resets at the same instant. If instead the waveforms are related not exactly, then you get a change in where the reset point is that drifts and causes the wave to exhibit beating (changes in volume).

If you have a 2:1 (octave) relationship between 2 waveforms, then you won't hear the beating as the beat frequency exactly overlaps the frequency of the lower frequency.

If you have say two notes that are not quite in the octave ratio, then you hear beating at the difference in frequency. E.g. say 440Hz and 888Hz (instead of 880Hz), you have beating occurring at 448Hz, which you'll hear as an 8Hz (448Hz-440Hz) wobble in the sound volume of the combined wave.


> If you have a 2:1 (octave) relationship between 2 waveforms, then you won't hear the beating as the beat frequency exactly overlaps the frequency of the lower frequency.

If we take a look into a human ear we'll see there an apparatus which physically splits sound into a spectrum of frequencies (a long narrowing tube, sound comes from one end and it creates resonances at different places) and a lot of receptors which placed in such a way that allows them to specialize on different frequencies.

I know nothing that would point to an innate ability of this apparatus to feel octave as something special compared with a mix of two random frequencies. So the peculiarity we hear pops up on later stages of sound processing. But why it pops up?

Moreover there is an evidence (I have no link, sorry) that the peculiarity of an octave is a cultural thing, not a genetic one. European music teaches us to feel octave as something special. There are tribes not exposed to European music who doesn't feel consonance and dissonance like we do.

My hypothesis that a mind picks correlation between a frequency and a double frequency. I mean it is not because of some funny math comparing two sine waves, it is because sounds essentially are not single sines. Two sounds forming an octave are both sums of many sine waves, and there is a huge overlap between sets of frequencies, so they sound similar. And then, when mind trains on this data, it becomes conditioned on a similarity of double frequencies, so it starts think of two sines with frequency ratio of 2:1 as of similar. The similarity is just a correlation.

And people who didn't tried to make a music with strings cannot grasp the idea, because natural sounds mostly much more complex than just sum of a several sines with frequencies that are multiples of some base frequency.


What? No, you said it, the ear splits the sound into frequencies and physically puts sensors into places where they resonate. Octave resonates in the same place. (but higher octave resonates in one additional place)


No, octave resonates in two different places. If we talk about octave as of sum of two sines.


I was sloppy. First i meant the octave as two separate tones (one after another), then I meant only the higher pitched one.

The higher tone also excites the sensors for the lower tone.

Wait, does it? I might be spouting bullshit, sorry.


Every note is a sum of harmonic sine waves, usually not just a single one. The first harmonic of 440hz is 880Hz. So plucking a harp string for A4 will also produce the A5 and A6...


> Wait, does it?

Thinking about it, I'm not so sure it doesn't. I'm not a physicist to know it for sure.


It depends on what type of oscillator we are talking about, but strings, chambers or beam oscillators for example will resonate at double frequency of their main frequency.

The octave rule definitely has some physical/biological founding, it’s not purely cultural. Although culture also plays a role in its preponderance.


There are some assumptions about phase in there.


Yeah, you're right.


I don't think you need to imagine "creatures" - there are humans on earth whose culture's music doesn't have the concept of octaves, let alone fifths. All the real action in their music is in its rhythmic complexity.

But my comment was in reply to this statement specifically:

> Somewhere there is a perfect universe where 12 fifths form an octave.

For this to be true, I think you'd indeed need a new universe where 3^12 = 2^x, where X is a whole integer.


I'm not talking about explicit notions of octaves and octave equivalence, although those do exist in very many musical traditions and appear to be extremely widespread in musical traditions where tones have names (if not ubiquitous—I'm not aware of any exceptions). I was referring to the claims that octave equivalence is in some sense hard-wired in the human brain, or sometimes claimed to be all or many mammalian brains. I'm not qualified to evaluate these claims or even whether how well-accepted they are among experts, but such claims do seem to pop up all over the place when discussing music perception.


The basic reason for octave equivalence is not from human subjectivity. It's from the fact that something that repeats "x" times is also something that repeats "x/2" times, eg a sequence such as:

  ABCABCABCABCABCABC
Can be thought of as "ABC" repeated 6 times or "ABCABC" repeated 3 times. If you replace the letters with numbers, you can treat the numbers as samples of a sound wave.

Just to be clear: the magical number here is 2 (not 12 or 8 or 7) since "octave equivalence" refers to the fact that you can multiply a frequency by 2 and get the same note.

Unless the sound is a perfect sine wave, there isn't a particular frequency associated with it due to these alternative interpretations.


I'm much less qualified: I took a "World Music 101" class in college that described some Native American tribes whose songs had drums, and cries that fell in pitch from high to low to call down the spirits from above, but their music had no concept of octaves.

And I agree with you. While I can imagine a culture that hadn't "discovered" the octave, it's difficult to imagine people who can't even perceive octaves when presented with them, and quite easy to imagine other creatures that cannot perceive them.


This may or may not be true. In fact, it seems unlikely to me your claim is true.

In nature, sounds produce harmonics i.e. when two objects collide they usually create waves of frequency f, 2f, 3f, 4f... in various (usually exponentially decreasing) weights. It's very rare to find pure sounds (i.e. only f frequency) in nature. The interval between f and 2f is an octave apart (1:2 ratio); the interval between 2f and 3f is a perfect fifth (2:3 ratio). So, when you actually hear a sound, you actually hear an octave and a fifth too, and how dominant this octave and fifth changes the "timbre" of the sound. This way, you know the source of the sound independent of the frequency. For example, both a violin and a piano can produce the note A4 at 440Hz, but anyone can easily determine if it's a piano or violin. The reason is, when a piano produces A4, it sounds not only just 440Hz but also 880Hz and 1320Hz etc... too and the relative volume of 880Hz and 1320Hz will be different than that of violin. Your brain automatically interprets these volume weights as "timbre" and the fundamental frequency 440Hz as "pitch".

Consequently, in order for your brain to be able to process the timbre of a sound it needs to find octaves and fifths between each fundamental note it hears. This means there might be something universal about octave and fifth (and other decreasingly consonant intervals such as major third etc...). Maybe we "understand" music because our brain is hard-wired to search for octaves and fifths in all sounds, in order to analyze timbre and in order to process spoken language. If this hypothesis is true, maybe an alien species could have octave/fifth/major third based music too! (if they have music at all, of course)


> This means there might be something universal about octave and fifth

There is! At least for the kinds of instruments that are conventionally used in Western music. The harmonic series arises naturally from the physical properties of a string or wind instrument (e.g. violins, guitars, pianos, flutes, brass, organs, etc). As a very rough description of the physical phenomena, the tones we hear arise from a full spectrum, atonal excitation (like a pluck or a reed flapping) bouncing back and forth along the length of string or tube, which is basically a one-dimensional "waveguide". Frequencies that are aligned with the harmonic series naturally reinforce themselves, in the same way that putting energy at the top of the arc of a playground swing has more of an effect than in the middle.

Notably, musical instruments that are not strings or tubes, or more general sound-producing bodies, have more complicated patterns of sound waves dispersing through them, and don't typically follow the harmonic series. Pitched percussion, drum heads, or bells have more complicated harmonic spectra than the standard harmonic series (as they are generally thought of as 2D or 3D waveguides where cancellation/reinforcement patterns are less straightforward), as do less musically conventional sounds like knocking two rocks together or striking an arbitrary surface.


There is also the shape of the individual waveforms to take into account a piano has a more or less sinusoidal wave and a violin is more of sawtooth (due to the stickslip of the bow moving across the string(s)).


You're saying the same thing - the combined sawtooth wave is just the sum of all the sinus harmonics.


Is it not true that the shape of the waveform (sinusoidal, saw-like etc) is created by the relative weights of each harmonic? E.g. if you take any random sound wave, Fourier-transform it, you'll find the weight of each harmonic. Or are you saying there is a separate quality to sound waves that can cause their shape to be different even if each harmonic has the same relative weight with respect to the fundamental?


Yes, this quantity is the relative phase of the harmonics, although the human ear is generally considered to be insensitive to phase.


The human ear is insensitive, but the human ears are not. Or, more accurately, the human brain is not.


That would be a non-Euclidian (ie. curved) universe?

Maybe it is possible to construct a non-Euclidean universe for sound, by modifying properties of the propagation medium as a function of space or time?


I'm not comfortable with this first refering to a natural human tendency and then a western harmony, which is pretty much accquired, as if it were a natural consequence.

A simpler way to go about this is using the chromatic scale, drawing multiples of C0 upto C8 so that C7 to C8 spans an octave, and then fixing F according to a table of equal temperament.


>I'm not comfortable with this first refering to a natural human tendency and then a western harmony, which is pretty much accquired, as if it were a natural consequence.

Well, western harmony is based on a set of natural human tendencies formalized.

There are other ethnic music practices, also based on natural human tendencies.

The parts that are acquired are built on top. But most/all music practices (western or otherwise) start with natural human tendencies, as their foundations.


You're both describing two similar consequences of the same mathematical fact: 2^(7/12) is close to 3/2:

* The reason that in their 12-note graph the red line very nearly overlaps with the seventh green line is that (2^(1/12))^7 is very close to 3/2.

* The reason that twelve fifths nearly make an octave -- (3/2)^12 is ~2^7 -- is that if you use 2^(7/12) to approximate 3/2 then it's (2^(7/12))^12 which is exactly 2^7.

Since you're applying the approximation twelve times instead of once, that also explains why we've gone from being off by 0.11% to 1.4%.


Fifths don't sound so great after a while. This tuning leads to the dissonant "wolf interval" - https://en.wikipedia.org/wiki/Wolf_interval - so it was largely replaced by the well temperament - https://en.wikipedia.org/wiki/Well_temperament - used by Bach in The Well-Tempered Klavier.


are the post and your comment not mathematically equivalent statements?


Its the use of the musical concept of Fifths that's the key here: We just derive the notes from what sounds good, not what makes sense mathematically? I'm just using Python to mirror the author's analysis -- you can derive "12 notes" pretty much just by using your ear and listening to the Fifths.


A perfect fifth is just 150% (3/2) the frequency of the root, just as an octave is 200% (2/1). "What sounds good" is in a certain sense based on the harmonic series, and in that sense it is equivalent to what makes sense mathematically.

A problem is that if you stack perfect fifths to get 12 notes then they won't sound in tune with each other across different keys. It's this issue which forms the crux of the linked post.


I think it's integral to the theorie seeing the fifth as 3 times, the octave as 4 times and the prime as 2 times an arbitrarily low root key. Trivially, the 2^n multiples form octave intervals but between C12 and C24 there's your twelve tones on a logarithmic scale. Naturally, it doesn't transpose in integer intervals if stepping down.


No, the article is essentially pointing out that the 12th root of two to the seventh power is really close to 1.5, whereas the comment you're replying to is saying that if you raise 1.5 to the 12th power, you get really close to a power of 2.

The former is more interesting when it comes to how music works psychoacoustically: the interval of a perfect fifth is fundamental to almost all music. Whereas the "circle of fifths" is more of a convenience that makes it easier to think about keys. Few songs would ever traverse the whole circle and come back to where it started, and if you stick with strict just intonation there is no circle of fifths anyways. (Maybe you could better call it a "spiral of fifths" or something.)


Eh eh as other people say, you have discovered the Pythagorean scale, that is known to drift away slowly from the correct frequencies, that's is why for a long time people didn't use chords that overlapped octaves, because they sounded weird and they called those evil chords


In other words, 1.5^12 = 129.746… ≈ 2^7.


(For those wanting to hear these frequencies:)

aplay -d 2 -r $freq


> Note that after exactly 12 steps, we're back at 446 which is "pretty close" to 440.

If you’re not careful you’ll summon the ~elders~ people who are convinced that frequency scale is wrong and that there’s a more ideal (to human ears) frequency step for the same 12 note scale. They might even be right, but goodness… prepare yourself for it to get weirder than finding out whether someone really believes it’s legal to be barefoot in all public settings.


This is the reason. You can keep going but it's just pointless. Things sound good enough at this point


I love math explanations in Python, thank you.


12 notes tuned in equal temperament is a workable compromise between musical expressiveness, harmonic ratio accuracy, readability, and finger precision.

It's also an established standard, which is a huge deal because it means you have access to a huge established repertoire.

A 31-TET acoustic piano would be huge, extremely complicated, and probably unplayable. Smaller instruments mostly just aren't practical. In theory you can play with more precision on fretless instruments (including strings), but it's hard enough to get beginners to pitch 12-TET accurately.

Electronic microtonal keyboards exist, but they require extra learning and the music you can make with them isn't compelling enough to justify the complexity.

https://www.youtube.com/watch?v=9ZozXzKOf8o&t=94s


There used to be a lot of tempers floating around. For example a lot bach's music is not really supposed to be played in modern equal temper https://www.ethanhein.com/wp/2020/what-does-the-well-tempere....


I consider the 12 tone scale to be a technology. The historical temperaments were compromise solutions to the problem of getting a useable scale within the skills and patience of the musician. A harpsichord had to be tuned before every performance, by the musician.


I can't find a public source, but in "the great courses " series on bach they mention that he had written notes on the 'feeling' each of the many different tempers could give and in a sense we have lost some flexibility in our ability to compose music


It's still twelve notes.


I think 19-TET is the most viable alternative to 12-TET. It fits in a standard piano form factor by adding a few black keys, and uses the same note names everyone is used to. https://commons.wikimedia.org/wiki/File:19_equal_temperament...

And it sounds really unique! https://www.youtube.com/watch?v=bJfTu1Y2H44


22-TET is a sweet spot in the curve of "Average Error Distance From Harmonic Interval" http://www.gweep.net/%7Eshifty/portfolio/musicratios/index.h...


Thats a decent explanation but in other cultures like Turkish music you have 9 other notes in the space of one half step so losing those extra notes will make the music sound like faked Turkish music without those extra pieces.


Not a musician, but as a hobbyist composer and music theory enthusiast, I think anything more than 24-TET is overkill in terms of daily practice. I don't think there is sufficient expression to adding anything more than quartertone to justify making your theory and practice so much more complicated. 24-TET is convenient because all your 12-TET theory works exactly the same, except now you have quartertone, in addition to semitone. This gives really interesting intervals, although not all of them will be usable in practice. In terms of instrument practice, 19-TET is a good middle ground since it maps unambiguously to 12-TET while introducing useful and expressive intervals such as septimal minor third.


41-EDO is surprisingly playable on guitar, if you omit half the frets. The trick is to tune the strings so that each string only has half the notes, but the notes that aren't there are available on neighboring strings. It seems like it shouldn't work, but it does.

https://kiteguitar.com/

https://kiteguitar.com/theory/fretboard-charts-downmajor-tun...


There was 12 notes in Western music before 12 equal divisions.

This Mozart piece played in mean-tone temperament (historically accurate) has better tensions and resolutions than the equal tempered version.

https://www.youtube.com/watch?v=lzsEdK48CDY&t=700s

(The chipper ending to this piece is believed to be not written by Mozart.. the song was incomplete when he died.)

I even prefer Chopin in unequal temperament, but I'm not as confident about whether Chopin used 12 equal divisions.

https://www.youtube.com/watch?v=fJT5Q6HooyA


A long-winded way of saying that if you want to hit the 3:2 and 4:3 sweet spots "closely enough", dividing the octave into 12 logarithmically equidistant bins works very well, and better than any other number of bins less than 50 (or maybe 30).


Actually, 41 has a better 4th and 5th, only being off by about half a cent, as opposed to being off by about 2 cents. It also has thirds and sixths that are quite a bit better (though still not great), and it has very good 7-limit intervals, which is something 12-EDO has nothing even remotely close to.

31 is generally decent all around, but it has worse 4ths and 5ths than 12-EDO.

53 EDO is even better than 41, having 4ths and 5ths that are off by about 7 hundredths of a cent. It also has much better 3rds and 6ths than 41, but the 7-limit intervals are slightly worse.

https://en.wikipedia.org/wiki/31_equal_temperament#Interval_...

https://en.wikipedia.org/wiki/41_equal_temperament#Interval_...

https://en.wikipedia.org/wiki/53_equal_temperament#Interval_...


I guess I could imagine a piano that is 53/12 times the size of a current piano, but I wouldn't want to have to play it :)


The H-Pi Tonal Plexus is 205-EDO, and reasonably playable as far as I know. I'm not sure what the biggest version is, but it's about 6 or 7 octaves.


This comes up every so often and in my mind, there is an answer and it has to do with how well the notes in the "temperament" combine to produce near-enough approximations to simple fractions.

That is, take a temperament, combine each pairs of notes together. For each pairs of notes, find a close-enough fraction to it and give it a score depending on how many of these pairs produce simple fractions.

The 12 note equal temperament produces one of the best scores, assuming some (perhaps arbitrary) constraints.

There are some papers getting at this idea [0].

I even wrote a small program to try and do this [1]. Farey sequences are used for best rational approximation [2] [3].

I think this even gets at why some chords sound "sour/sad" while others sound "happy/full", because they have less or more constructive interference between the notes in the range of where we can hear.

Obviously this has a lot to do with culture, so it's not as clear cut but at least this approach is better than just thinking it's completely arbitrary.

[0] https://www.researchgate.net/publication/267806865_Measures_...

[1] https://github.com/abetusk/scratch/blob/release/src/music/be...

[2] https://www.johndcook.com/blog/2010/10/20/best-rational-appr...

[3] https://en.wikipedia.org/wiki/Farey_sequence


We've seen this before: and it's likely wrong. He ended his experiment too soon at 24 divisions, but even a little googling should have told him to go to 31, which is more accurate than 12.

The 12-note scale long predates the notion of just or equal temperament.


For the intervals they look at in the article, the perfect 4th and 5th, 31-EDO is worse -- about 5 cents of error, versus about 2. What 31-EDO has is a major third that's almost dead-on, and a minor third that's a lot closer.

https://en.wikipedia.org/wiki/31_equal_temperament#Interval_...

41-EDO though has a perfect 4th and 5th that are closer than 12-EDO, being off by about half a cent rather than about 2 cents. In fact, 41-EDO is better at every commonly-used interval than 12-EDO, plus it adds a lot of very good 7-limit intervals too (i.e. ratios with sevens in them like 7:4, which is way off in 12-EDO).

By a weird set of mathematical coincidences, 41-EDO is actually quite playable on guitar with the right layout. The trick is to omit half the frets and tune the strings so that each string has the notes that the strings above and below it lack. Tuning by major 3rds, you get a whole lot of useful notes clustered where they're easy to play. There's a handful of us (in Portland mostly) trying to promote this idea: https://kiteguitar.com/


According to https://news.ycombinator.com/item?id=32641527, 12 is substantially more accurate than 31. 41 is slightly more accurate, and 53 is a lot more accurate.


i don't think this post is making any arguments about _accuracy_ - the point is that 12 is the _simplest_ (smallest) number that gets reasonably close.

Simplicity is incredibly powerful.


Even better, if we abandon the idea of an octave base of 2, we can get other scales. What divisions lie between, say, powers of 3 or 5?

(You can find these naively by brute force!)


There was 12 notes before there was even division. It was Bach that pushed equal temprament (equal spacing). Before that, the ratios were actual ratios (perfect 4ths and 5ths), though you couldn't just transpose music and expect to sound good.


IIRC the system Bach was pushing wasn't actually equal temperament, but "well temperament" which was some sort of compromise between equal temperament and having pure fifths everywhere. The result was that all twelve keys sounded acceptable, but some keys had purer fifths or thirds than others. Some musicians/scholars say that Bach composed the different preludes and fugues specifically to use the resulting different characters of the different keys to the best possible advantage. I can't speak to this personally, I keep my piano at equal temperament ;)

(Big fan of your videos btw)


This is my understanding too. I have a Kurzweil K2500 keyboard from around 1999 that has a bunch of the alternate tunings, including three from that era. The Bach-era tunings weren't what we know of as "equal temperament." Truly equal temperament didn't come around until well after Beethoven was dead. I've always interpreted the "Well-Tempered" in Bach's title to mean that he was brining out the strength of each key. Some of those keys sound really "out of tune" to modern ears -- I have a friend with perfect pitch who legit can't listen to them.

Owen Jorgensen's "Tuning the Historical Temperaments by Ear" is good bedtime reading on this topic, if you have a couple hundred bucks burning a hole in your pocket. https://www.amazon.com/Tuning-historical-temperaments-ear-ei...


> Truly equal temperament didn't come around until well after Beethoven was dead

Source for that? The concept and practice certainly existed well before Beethoven's time but it's less clear at which point it became the norm. Even the wikipedia article on 12 TET has "citation needed" for the claim that it happened in the early 19th century.


I don't remember where I learned this, but what you said is more accurate than what I said -- the concept was definitely known well before Beethoven, but my understanding is it wasn't the standard tuning on keyboard instruments until much later, and came to its fruition with all the atonal music of the early 20th century. I think composers even went so far as to assign emotions/moods to various keys based on each key's sound. E.g. "E-flat major is austere, D-minor is sad," etc.

Might be worth reading:

- https://books.google.com/books/about/The_Effects_of_Unequal_...

- https://www.proquest.com/openview/b22142f819768ae82464aa2679...


More generally, I'd be curious to know how they'd practically tune a keyboard to 12TET before the electronic chromatic tuner got around. Start with Pythagorean fifths then compress ever-so slightly? How'd you keep them… equal?


Oo I can take this one! I'm not a registered piano technician, but I've tuned my piano (and helped a few friends) for some 15 years. Aurally (as opposed to electronically) tuning a piano is actually pretty straightforward. I'll stop short of saying it's easy, but once you learn the method, it's very sensible and just a matter of practice.

The general idea is to achieve consistent beat rates for a given interval -- major thirds being the most useful for its relatively high beat rate compared to other equally tempered intervals -- as you play it chromatically. By that I mean play A and C#, then Bb and D, then B and D#, etc. and if the beat rate hardly changes (but does consistently climb) then you've achieved equal temperament.

Say you've got A tuned to a reference (tuning fork). Then set the A above that so there's no beating, since octaves are always perfectly 2:1 regardless of temperament (until the extremes, when you need to stretch a bit, but I digress). Then tune the C# and then tune the F. Basically it's an augmented triad, or a stack of three major thirds (including from F back up to A). Get all of them to beat by about the same amount, but the higher ones just slightly faster than the lower ones. The fact that this feat utilizes two A's is the key to pulling it off. You frame out the octave and then fill in the augmented triad.

But now you need to do the next set: Bb, D, F#, Bb. How to get here without another external reference? Well, well, well. We have our ways. The perfect fourth between A and D is an option, but be careful not to make it actually a perfect integer (no beating), as that wouldn't be equal tempered; it should beat maybe about half as fast as the nearby major thirds, IIRC.


Further reading: https://my.ptg.org/HigherLogic/System/DownloadDocumentFile.a...

Notably:

> In equal temperament, all perfect fifths are “contracted”, while all perfect fourths as “expanded”. Minor thirds are contracted, while major sixths are expanded. Major thirds are expanded, while minor sixths are contracted. The piano tech must have knowledge of the approximate beat rates the intervals of equal temperament in the temperament octave: The beat rate of perfect fourths within the temperament octave may be about 1 beat per second. The beat rate of perfect fifths within the temperament octave may be about 1/2 beat per second. The beat rate of F3-A3 major third is about 7 beats per second and that of higher thirds are faster.

In my previous comment, my memory was a bit off when I said "about half the beat rate"... that's the difference in rate between fourths and fifths, apparently.

> Example: to check the tuning of D4 within the temperament octave, play A3-D4 and G3-D4. The fourth should beat faster than the fifth. If the fifth is too fast and the fourth too pure perhaps the D4 is flat; if the fourth and fifth beat at the same rate, perhaps the D4 is flat; if the fourth beats too fast and the fifth is too pure, perhaps the D4 is sharp.

> you can use more and more checks as one progresses through the sequence and tune each new note as a “best compromise” with all the previous notes, that is, each new note will not depend only on the last note tuned, so there will be more of a chance that errors will not accumulate in the later notes tuned.


Build a 12-TET fretted string instrument and tune your keyboards to it, after using a tuning fork to tune the fretted instrument?


I still feel that way about certain keys, even playing on an exactly equal tempered keyboard. I don't think the degree to which certain intervals might vary between keys is necessarily the important factor.


Those descriptors ("austere," etc.) have always struck me as subjective -- I'm not one to tell people what mood they're getting from certain keys. But a root major chord will have a much different feel in, e.g., C#-major on an 18th-century tuning than in equal temperament.

I have this CD [1] in a box somewhere but can't find it on Youtube. It's a few Beethoven sonatas in the temperament he would've used. Just sounded out-of-tune to me in certain parts (especially during the Waldstein), but I don't have perfect pitch. The booklet that came with that CD is really helpful in understanding all this, and I think that might be where I learned about that Owen Jorgensen tome.

There's no shortage of similar experiments on Youtube. This one [2] has a wild one in just intonation, but I doubt that temperament was still used when Mozart was composing.

[1] https://www.amazon.com/Beethoven-Temperaments-Historical-Tun...

[2] https://www.youtube.com/watch?v=lzsEdK48CDY


Thanks for that link, I don't know if it demonstrates "just intonation" though? But the 1/4 Comma Meantone tuning just sounds horrible the moment a diminished chord comes into the picture.


You're right, I mis-typed -- it's meantone, not just intonation. Someone elsewhere on this HN thread argues that's the tuning Mozart himself would've been using for that piece, which is bizarre to think about once you hear it on Youtube like that!

This is truly a fascinating world. People who argue that we should be using the original temperaments that composers used do have an argument. Imagine, for example, if Shakespeare were "tuned" to be in modern UK English rather than the English of its time.


> it was Bach that pushed equal temperament (equal spacing).

Not really. Equal temperament was being advocated both in China and Europe long before Bach was born. In Europe, it was the lute players that pushed for it, because it matters more for fretted instruments, where any temperament other than equal causes conflicts and inconsistencies on the neck.

https://en.m.wikipedia.org/wiki/12_equal_temperament


Pythagoras is believed to have come up with the just intonation (exact rational) figures. At the time, irrational numbers were distrusted and despised so, as you noted, the perfect fifth really was exactly 3:2.

But it’s likely that a 12-tone system won out because lg(3/2) is so close to 7/12, even if this was never a conscious decision. 19, 31, and 53 are also credible candidates per continued fraction expansion, but unwieldy for physical instruments (although some computer music does use 53-TET).


Pythagoras and his followers at first thought that irrational numbers didn't even exist, though the story that they drowned a guy for proving by contradiction that sqrt(2) is irrational is probably not right. Rather, strings with length ratios made of small integers, like 2/3 or 3/4, sound good (harmonize) when played together. So the started with the ratios, because that's what made sense. Not to use ratios was considered, well, irrational. :-)


It may not be true, but I still loved telling that story to my students.


>You may have noticed that 24 is also includes the 5ths and 4ths, the problem is that having twice as many notes would require instruments with twice as many keys or buttons making them more expensive and complicated to play, also probably we wouldn't notice the difference between notes that are so close

We actually would, and it's quite noticable. Several cultures use microtonals intervals with half-half-steps or similar.

The main reason we stuck with 12, is complexity in making AND playing an instrument with so many notes - that, or the halved range, if we keep the number of notes on the instrument the same.

But there are cultures (and instruments) which have more.


"Flying Microtonal Banana" - because why not fret a whole bunch of guitars for 24-Tet and record an album?

https://guitar.com/news/music-news/king-gizzard-stu-mackenzi...



I'm not a music theory expert, just a guy who has played guitar by ear for 28 years.

Equal temperament is definitely a compromise .. I find myself constantly trying to "sweeten" the tuning of my guitar strings relative to the song/key I am playing.

You can tune your guitar with the most accurate guitar tuner in the world (I have strobe tuners by Sonic Research and Peterson), and some things still just sound out of tune.


There are guitars with frets that aren't straight lines that try to address some of the problems:

https://guitargearfinder.com/faq/true-temperament-frets/


FWIW, A sitar also has a 12 note scale, but the frets are moveable so you can tune by ear. The drawback is, you only play melodies on the top string and there are no chords. It's possible to design a guitar where the frets are spaced at harmonic intervals and not equal tempered, but then, you can only play in one key, the key of E and you can't capo or play barre chords. However, if you do play such a redesigned guitar in the key of E, it will sound sweeter because all your notes will be harmonic and you could play chords.


I'm a bit confused by that article. It says things like "the problem is that equal temperament isn’t perfect" and "because guitars are imperfect instruments, they can never be completely in-tune" and "if you tune your open strings perfectly to pitch, you may still notice that some chords sound slightly out-of-tune."

That doesn't sound like a description of a problem with equal temperament. In fact, the whole point of equal temperament is that any given chord has precisely the same tuning in every key. Isn't the purpose of these staggered frets to tune the guitar to more accurately match equal temperament? In other words, a guitar string played on the 7th fret is supposed to be tuned exactly 7 12-TET semitones above that string played open, but with completely straight frets (in lines exactly perpendicular to the strings) it's difficult to get every fret on every string to be accurately tunes.

I believe this is what's referred to as intonation. Many guitars have some form of manual adjustment, like a movable bridge saddle for each string, and it's common to use that to slightly adjust the length of each string so that e.g. the 12th fret is accurately in tune with the open string. These "true temperament" guitars seem to have done a similar thing but with small adjustments to each fret on each string. Presumably the fret arrangements are designed to match that exact guitar fretboard with some specific guitar strings?

The article says "with a normal guitar, if you play an A Major chord, then play a D Major chord, those chords will be slightly out-of-tune with each other." Again, this doesn't sound like a description of a problem with equal temperament. From what I can tell, these "true temperament" frets would help specifically with playing the same chord/interval in different positions.


I mentioned this fretboard yesterday in another thread ( https://news.ycombinator.com/item?id=32626218 ). One of the main proponents of the design talks about its advantages here: https://youtu.be/D8EjCTb88oA

I'm not crazy about the sound, myself. It's kind of like a guitar sample played through a MIDI keyboard.


Yeah, that video is linked from the article I was responding to. The video certainly makes sense: he's demonstrating that intervals sound the same in every position and specifically that octaves are very in tune across huge distances on the fretboard.

From the small clips I've heard, it sounds great to me, especially when the guitar is playing alone. Back when I played a lot of guitar I was often pretty bothered by intonation issues, even with decent gear that was setup well and didn't seem to bother other (much better) guitarists. But of course guitars often play together with 12-TET instruments that are likely to be much more accurately tuned (like a piano or organ), and it makes sense that the every-so-slightly out-of-tune nature of guitars has become part of what sounds distinctively guitar-like, especially the specific tuning you're likely to hear a lot with common guitar chord voicing in many styles of music.


I've seen those! Pretty cool. I've also seen people put intermediate frets on certain notes.


Apart from ensuring my intonation was spot on, and my frets nicely shaped, scalloping my frets allowed me a lot of what may be the 'sweetness' you are after - a slightly harder pressure, without finger gymnastics, allows minor pitch corrections (but you can't go flatter). Regular guitars just seem dead to me. I also shaved parts of my neck - significantly - along different parts of it ie it's not 'smooth', it's shaped only for me, and how i want to play in the different registers.


Let's talk about splitting things up in useful ways.

12=2 * 2 * 3.

Splitting something in half is useful; splitting it half again remains useful. Splitting in half a third time is arguably less useful than splitting it into a third. So 12 is the made-to-order number that lets you split it in half, twice, and in thirds, once.

Which naturally leads to seconds and minutes, or 60:

60=2 * 2 * 3 * 5

Because dividing the whole into fifths is more useful than a second 3, or a third 2.

So, there's your basic argument for why you would see a 12 or a 60 instead of a 10 or some other number. You have a whole that you want to divide into useful parts.

I'm not sure that the linked article, or the current top comment (Circle of Fifths) meaningfully extends beyond this "useful parts" hypothesis; we like hearing useful parts would be the somewhat surprising thing to talk about.


These numbers are called "Highly Composite Numbers" [0]. Basically, it is a series of numbers where each number has more factors than the number before it (and is the first number with that number of factors). As you hinted, they are especially useful if your number system does not have fractions or decimal places and you still want to divide things.

You may recognize the beginning of the series: 1 2 4 6 12 24 36 48 60 120 180 240 360 720

Numberphile [1] calls them "Anti-Primes".

[0]: https://en.wikipedia.org/wiki/Highly_composite_number [1]: https://www.youtube.com/watch?v=2JM2oImb9Qg


No: Having 12 notes is a neat but accidental outcome of the musical scale.

On the derivation of the scale:

Two pure tones go good together when they have "ratios" of frequency. So, 440Hz and 660Hz would interfere in a pleasing way. This is the same way that it's "nice" when tiles on a floor match your gait in a way you can follow a pattern, or when two blinkers sync up.

So, it's nice when tones are fractions of one another like 3/2, 4/3, 5/3, etc. A ratio like pi/2 would sound weird, and very close frequencies (like 440Hz and 440.5Hz) would interfere to make a beat of 0.5Hz. (I'm sure we can all agree that a ratio of 4/3 is a much nicer fraction 440/441. In practice, this doesn't matter much, because we rarely use pure tones. This is why equal temperament scales don't sound abysmal.)

A natural ratio is just "2/1". This division gives you your octave. One octave up from 440 is 880. One octave down from 440 is 220.

This plays nicely into the second problem: Human perception is logarithmic in many things, tone included. For a musical scale to be perceived to have equal differences in pitch between notes, it needs to be roughly evenly spaced on the logarithmic scale.

So, we need to select a set of frequencies in [440Hz, 880Hz) (where 440Hz is arbitrary) that (1) arenice fractions of one another, but are also (2) evenly spaced on the logarithmic scale.

By nice mathematical luck, the 12-tone chromatic scale fulfills that!

---

On the questionable qualities of "12":

I don't think the nice divisibility of the number 12 matters here, in a scale where only 7 of the notes (with the most pleasing ratio) get the title of "major". Notation is written on a musical staff where the other 5 notes are folded away.

Furthermore, if you swap out the base of 2 for a base of 3 and re-derive the scale, you get other scales. One is the Bohlen-Pierce scale, which has 13 notes. I derived a similar scale one time, and I remember finding a 7 or 11 note scale. I forget which exactly, but the point being that these are prime numbers.

So, I'm wondering, how would 12 being divisible matter for music? I don't compose much, so I mean this question genuinely.

---

On the main point:

> I'm not sure that the linked article, or the current top comment (Circle of Fifths) meaningfully extends beyond this "useful parts" hypothesis.

I ask this in good faith: Did you read the linked article before commenting?

If you didn't, then :\

If you did, then I'm curious:

The scale derivation I described here is described in the article, with nice visualizations. If you did read the article, how do you now have this take? How could a 10-tone scale fit into this, and how would having a less nicely-divisible number matter?


Let me start by making the same point, but starting from a different place.

When you see pi, you look for a circle. When you see an 8 or 12 or 24 or 60, you see a few small primes multiplied together, and you might look for things that like being flexibly divided into clean subgroups.

Now I spent a couple of hours trying to extend my original argument, using the internet.

12tet (12 tone equal temperament) gives you good fourths and fifths (which as you say sound great) and TET. What you don't get is being able to correctly voice say a barbershop seventh, or persian music, or dissonant death metal, or microtonal pop.

While n-TET for any n is possible, Wikipedia lists 5, 7, 12, 15, 17, 19, 22, 23, 24, 26, 27, 29, 31, 34, 41, 46, 53, 72, and 96tet as being in use, some much more popular than others. Arabic music shifted from 17tet to 24tet, with the exception of some holdouts that find 24tet too 'commercial'.

You don't need bang-on fourths and fifths to be happy in n-tet; given n-tet, you figure out what intervals to use, what kind of chords you want to build, and what kind of scales you are willing to learn to use those chords.

So, fourths and fifths are good in 12tet, and you covered that. Is there anything else to say about 12tet and its popularity, particularly about there being 12 notes and its prime factorization into 2s and 3s?

From stackexchange: You can create a circle of any number of steps mutually prime to the total number of pitches in the octave.

And what it looks like is that you get a Circle of Fifths that has some particularly nice properties in 12tet due to the math with 2/3/5, and that makes scales and chord building particularly easy, making 12tet easy to work with, and that further popularizes 12tet. I just waved my hands there pretty hard; I did not do anywhere near enough due diligence on sources. But, yes, the number of notes does end up being important. Probably.

So I think I was minorly correct in being suspicious of '12' and how divisible it was into small primes, but majorly wrong in most other aspects.

As an aside, I did read your article, and just had a different take on what was going on; I was sure that the prime factorization structure of '12' would explain more than it does.


Some comments on tones. Pythagorean tuning is based on repeated ³⁄₂ increases in frequency with occasional halving to stay in the octave, so we have, e.g.,

A = 1

E = 3/2

B = 9/8 (here we halved to get back into our 1–2 range)

F# = 27/16

C# = 81/64 (another halving)

etc.

Another approach is to use harmonic overtones. When a string (or a column of air) vibrates, it vibrates not just at its fundamental, but in a series of integer divisions of the string.¹

Fundamental: A

Octave (½): A' (up an octave)

Twelfth (⅓): E (up a fifth from the octave)

Double Octave (¼): A''

⅕: C#²

⅙: E

⅟₇: G (but a bit flat from most tunings).

We invert wavelength to get frequencies and halve to get into the 1–2 range and our E matches up at 3/2 and C# comes out as 5/4 which is pretty close to the 81/64 of Pythagorean

I would also note that 24-tone music does occur with some moderate frequency in avant-garde music where half-flats and half-sharps have their own notation, although these notes are not easily accessible from many standard instruments, but the sound of a quarter-tone difference in pitch is definitely distinct. Many non-Western musics apply various micro-tonalities, such as Indonesian scales which are closest to a subset of a 9-tone equal temperament.

1. In some cases, e.g., overtones of a cylindrical pipe vs conical pipe, or open at both ends vs open at one end, you won’t get all of these tones, so a flute, which is cylindrical and open at both ends can hit the fundamental and the octave, while a clarinet, which is cylindrical but closed at one ends hits the fundamental and then the third partial (the twelfth) but not the octave.

2. The place where you hear notes produced to these pitches most commonly is in bugle calls: Taps, for example, would be ⅓ ⅓ ¼, ⅓ ¼ ⅕, etc.


I've never liked explaining the scale as a Pythagorean derivation. It's not really correct historically (Greek music didn't have anything approximating a full major scale) or mathematically (it doesn't understand the idea of a "third" interval the way tonal music does, so playing triads with pythagorean tuning sounds awful!).

Here's my take: late medieval singers discovered The Major Chord. That's the combination of three (!) notes that is "most consonant" (mathematically: beats in the shortest period). This combines two notes a major fifth apart (ratio 3:2), with a third note that is 5:4 with the low note. You can write some code to prove this if you like.

So now take that "best" chord with its three notes, and start moving it around. If you go up a fifth (i.e. by "the most consonent interval", that is the "closest best chord to your first best chord") you can play the same chord, adding two needed notes that weren't in the scale before. You can likewise go down a fifth to add two new notes.

Then you compress these seven notes into a single octave, and you get... the major scale! It's just there. All you need is that one "best" three-note chord and an obvious metric for "nearest" (i.e. transpose by a fifth) and you have almost all of modern tonal music. Play the same tunes starting on different notes and you get "modalities", etc... You can transpose up and down to nearby keys and keep playing by "cheating" with your tunings to move a note half way up or down.

And the practice of formalizing those transpositional cheats because what we now know as the equitempered scale. But they're still just cheats. And the fact that pow(2, 1.0/12) happens to work is, basically, just dumb luck.


I usually think of it as someone hundreds of years ago playing with a tighly stretched string and noticing stuff:

- Half a string's length is the same thing, just higher

- The harmonic at half a string is the same thing, just higher

- The harmonics at 3:2 and 4:3 are really loud and distinct

- If you chop up the rest of the string at the same interval as the 3:2 and 4:3, some have strong harmonics that match tones on the string, some don't

Then I figure with the Octave, 5th, 4th, and M3 as the strongest harmonics that matches other lengths (or octaves thereof), they went from there...


This piece is a good example of circular reasoning, isn’t it? The question “Why are there 12 notes in Western scales?” Is answered first by presuming that 4ths and 5ths sound pleasant (to whom? a Westerner?), the “4th” and “5th” being intervals ON a Western scale, which the author then reverse-engineers back to the 12-note scale which they assumed from the start. There are other scales you could start from, in which 4ths and 5ths aren’t so special…


No, not at all.

> 4th and 5th being intervals ON a Western scale.

That is where you went wrong. They are not. They naturally arise as small integer frequency multiples/fractions on any string instrument (wave lengths 1, 1/2, 1/3,...). They are hence quite obvious/loud (and humans recognize patterns as pleasant for whatever reason). Once you have 4ths and 5ths you repeat to get the Western system (handwaving away that this does not actually close, but "rounds" to make it fit into twelve. That is a whole other subject).

This is a pretty good example of inductive reasoning. We want a system that for any note also includes its first few harmonics, show that this implies....


I guess I wasn’t clear. I’m not saying the 4th and 5th notes don’t have a special sound to anyone. I’m saying that 1) just exactly how important their resonance is to you is influenced by your culture. It’s not that atonal musicians didn’t notice the resonance. They weren’t drawn to it as much. 2) The logic given was “if you want your scale to include the 4th and 5th, then 12 notes is inevitable.” The “if you want your scale to include the 4th and 5th” is the a built in assumption that you want something like the western scale, so it doesn’t seem that impressive to me that they then arrive at the 12-tone scale.


No, 4ths and 5ths are resonant. They sound better to a lot of people. They are completely distinguishable from arbitrary intervals right near there.

Most of the notes on the Western scale fall into this orientation, i.e. there is reasoning for it. It's not just arbitrary.


The why is because the 5th is the primary non-octave overtone of a vibrating string, and the 4th is an inverted 5th.


Thank you! After reading the article I was left unsatisfied, but couldn't put my finger on it. I was somewhere around thinking that we hadn't yet established why 4th and 5th intervals were particularly special and so I couldn't see why the conclusion worked.

You nailed it.


> I was somewhere around thinking that we hadn't yet established why 4th and 5th intervals were particularly special

Other responses to the GP have explained that. The article itself also mentions the reason (small integer ratios).


4ths and fifths are used in most standard systems of music.

Actually it's just fifths because fourths are just fifths.

And fifths sound good because of physics.

For example the pentatonic scale used in a lot of eastern music is subsumed by the western scale.


That's not really circular, though. It does start from the assumption that 4ths and 5ths sound pleasant, but uses that to build possible scales, some of which are more compatible with 4ths and 5ths than others.


An alternative question is: Why not more? There are approximately rational scales with more than 12 notes. Something I wonder is how the complexity of music relates to its use. For instance, instruments for music that's primarily ceremonial, or used in centralized locations by trained experts, could adopt scales with more notes, or more difficult tunings. This includes 12TET, which was difficult for an untrained musician to replicate, and unlikely to stay in tune for an entire performance on some instruments.

Simpler tunings might lend themselves to instruments that were homemade, used for folk music, carried by travelers, played at home, etc. In fact those two things could coexist within a single culture. There were pipe organs and folk fiddles in Europe during the same time period, after all. Once the 4 strings are tuned by means of an easily discerned interval, you can fill in with a tolerable scale by ear.

"Carried by travelers" suggests an advantage for a tuning system that can be restored by a non-expert and used for music that spreads from town to town.



I suspect it has something to do with resonance. Resonance occurs when frequencies match approximately. It isn’t just in the fundamental or pitch frequency of two notes— resonance can also occur via frequency matching in the shared overtones of two notes.

Consonant notes tend to share a lot of overtones. I have heard that the pentatonic scale maximizes internote resonance. This seems relatively straightforward to test empirically.

The first known scientific experiment (empirical test of mathematical model) was the attested case of the pythagoreans casting bronze chimes in the same rational proportions of lengths of a string. The experiment demonstrated that small integer ratios produce consonance.

Here is the most recent and up-to-date theory of harmony in music (that I know): https://downloads.spj.sciencemag.org/research/2019/2369041.p...


Article only looks at the 4th and 5th, but I think the more interesting observation is that if you pick any small number ratio between 1:1 and 2:1 (i.e. using numbers from 1..10 and lying within a single octave), they almost all have a reasonable 12-EDO approximation.

1:1 is the unison. Not terribly interesting.

2:1 is the octave, which is exact.

3:2 is the perfect fifth. About 2 cents of error.

4:3 is the perfect fourth. Also about 2 cents of error.

5:3 is the major sixth. About 15 cents or so of error.

5:4 is the major third. About 13 cents or so of error.

6:5 is the minor third. About 15 cents or so of error.

7:4 is the the first one that doesn't really have a 12-EDO equivalent, though the minor 7th is generally used, with about 31 cents of error.

7:6 similarly doesn't have an equivalent. It's about 44 cents flat of the 12-EDO minor third. In fact, most ratios with 7s are right out.

7:5 is in the ballpark of the 12-EDO tritone.

8:5 is the minor sixth. About 13 cents of error.

9:7 is a really sharp third, again no equivalent in 12-EDO.

9:8 is the major second. About 4 cents of error.

10:9 is also the major second, about 17 cents off in the other direction. (12-EDO makes no distinction between 9:8 and 10:9. That's actually fairly important, as it lets you get away with chord progressions that don't mathematically work out.)

It's really amazing to have so many decent approximations of ratios with only 12 notes. Different EDOs might have better or worse approximation of various musical intervals. It takes going all the way up to 41-EDO to find something that's better at basically everything -- it even has a more accurate 4th and 5th, which is the one thing that 12-EDO is amazingly good at.


Another nice thing about 12 notes is that 12 has lots of factors. It leads to a lot of cool symmetries which I think have to do with how we understand music.

For example, since 12 is divisible by 3 and 4, diminished chords (4 notes separated by intervals of 3) and augmented chords (3 by 4) don’t have a definitive centre to our ear. As a result they both create different flavours of uncertainty and suspense.

But if you break the symmetry, e.g. by moving any note in an augmented chord one to the left on a piano, the chord takes on a colour (in this case becomes a major chord).

Other equal temperament scales would end up having similar patterns, but at the cost of complexity. having closer to 20 or 30 notes in an octave would increase the number of patterns to recognize, and probably make them less distinct to us without practice.

It’s also interesting to me that we put 12 numbers on clocks as well.


And 12 months in a year. Around around frequencies abound. In ratio and interval, all things are sound. Rational reasoning abound, just don’t be too loud.

A note here. A note there. A harmonic there and there. You say blue, I say G, and now we aught to see the cymatics inside you and me! Altogether now, ratio, ratios, frequency make everything between you and me. Hey now, hey now, just make music, it’s what we all need now.


12 is a special number, it’s a highly composite number but it’s also a small number, this means that a large percentage of the numbers less than 12 divide it. This gives the group Z12 some interesting properties, there’s a wide range of element orders. Tritones come in pairs, major thirds come in 4 sets of 3 thirds, minor thirds come in 3 sets of diminished seventh chords, etc, major seconds form the two whole tone scales. Fourths (5) and fifths (7) don’t divide 12, so they generate the group, producing the cycle of fourths and fifths.

If we look at the groups next door, Z11 and Z13, they are of prime order, so every element generates the group => there is a cycle of “fifths” for each interval. Beautifully symmetric, perhaps, but less structure to enjoy.


It's the same reason 12 was used as a number base so often, it divides an doubling of frequency (misnamed an octave) evenly into 1,2,3,4,6 and 12 parts (on a logarithmic scale), which then have pleasant overtones.


Thanks for this. It is perhaps the clearest explanation ever of the musical scale, and why it is the way it is. I've literally watched dozens of YouTube videos on this topic in the past week, and none of them are as clear and insightful as this was.

You do have to wonder what an optical octave would look like, though - our visual range is, unfortunately, a bit short of an octave there... Maybe the same "tone" of a kind of extreme magenta?


12 notes, 12 hours, 12 months., even 12 monkeys.


> The duodecimal system, which is the use of 12 as a division factor for many ancient and medieval weights and measures, including hours, probably originates from Mesopotamia.

https://en.wikipedia.org/wiki/Duodecimal#Advocacy_and_%22doz...


Yep. 60 seconds, 60 minutes, 12 hours. To the Sumerian mind that was apparently as nice and round as 100 seconds, 100 minutes, 20 hours.

60 is the smallest composite number with three prime factors, and divides evenly by 2, 3, 4, 5, 6, 10, 12, 15, 20, 30. Decimal only divides by 2 and 5. Makes arithmetic by hand a lot easier. Duodecimal has a similar advantage.


> 60 is the smallest composite number with three prime factors

Er, that'd be 30 I think, but the main point stands.


2 is such a nifty prime, we multiplied by it twice. It was just too perfect not to.


The numbers 12 (2x2x3), 24 (2x2x2x3), 30 (2x3x5), 60 (2x2x3x5) and 360 (2x2x2x3x3x5) crop up in a lot of older counting systems because they're so conveniently divisible.


One twelfth the atomic weight of one carbon-12 atom is the atomic mass constant.

What does string theory sound like?

https://periodic.lanl.gov/79.shtml

http://en.wikipedia.org/wiki/Atomic_weight


The atomic mass constant is arbitrarily defined as 1/12th the weight of a C-12 atom, it has historically also been defined as 1/16 the weight of an oxygen atom but changed to C-12 because it behaves better.


> pairs of notes whose frequencies are multiples of 4/3 or 3/2 sound very pleasing when played together.

Yes, but why is that? Why did we evolve to like these particular combination of notes? Or, why do they remind us of some other natural sound?


It it could also very well be that it is just unusual and not associated with danger, so it could be relaxing by lack of associations.

In general anything more complex than "birds like blue feathers because it shows a strong immune system" is unlikely to have a simple satisfying evolutionary reason to exist that is less than 80% wrong.


Check out Musimathics volume 1 if you want an absurdly detailed explanation of why Western 12 TET is the way that it is. http://www.musimathics.com/


With digital pianos, I imagine it is easy to switch to different tunings so that you can play each piece in a tuning that fits the key? Would be a major advantage over acoustic pianos.


There are keyboards that will do this. I remember seeing this advertised back in the 90s.


When we divide the octave into various equal steps using equal temperament, we find that there is a local maximum at 12, which yields a good approximations for important intervals.

But the "why" cannot be explained just using arithmetic. There is a history behind it. Twelve note instruments didn't begin with equal temperament.

There are twelve notes in western music because the diatonic scale has 7 notes, and alterations of these notes add five more, if you aren't picky about microtonal differences.

If you have do-re-mi-fa-so-la-ti-do, there is a small step between "mi-fa" and "ti-do" which is about half of the longer step that is observed in the five remaining successive pairs. If you identify some half-step note between those other pairs like "do-re" or "so-la", you end up with five more notes, giving you twelve. That's all it is; if we back fill 7 notes with enough notes to have chromatic half steps, we get 12.

Now, early practitioners of western music did know that that's not all there is to it: that a G# is not the same as an Ab. They tried using the in-between notes for transposing to other keys and found that the keys sounded different. They knew all about the mathematics behind it and the Pythagorean comma: that if you go around the circle of fifths 13 times, you don't end up at exactly the same note (modulo octave); there is a discrepancy.

Various technical devices were devised, such as splitting the small keys of keyboard instruments, so that the G# key actually had a G# split and an Ab split. Various tunings were also used, like well temperament. Bach's Well-Tempered Clavier is basically a set of test cases for tuning.

We settled on equal temperament because it distributes the error such that all the keys sound the same; when music is transposed to any key, the pitch relationships are preserved.

Going back to the first concept; why wouldn't more than five additional tones be added to add color to a seven tone scale? It's because Western music traditionally hadn't been oriented toward recognizing microtonal differences, or at least into organizing them (where they exist) into a single system.

In Indian music, there are 22 notes (shrutis). They are needed because there are numerous scales which have the same approximation on a western instrument. For instance, there are multiple scales that resemble "do-re-mi-fa-so-la-ti-do": the Pythagorean scale, but which use different microtones chosen from the 22 shrutis. Those scales all have different names; they are not just different tunings for obtaining different flavors of do-re-mi.

But in Indian music, there is still a significance in 12 tones in an octave!

"There are 12 universally identifiable notes ('Swaraprakar' in Sanskrit) in any Octave (Saptak). As we play them from one end on any string, the perception of each of these 12 changes 'only' at 22 points given by nature (See numbers in green in the slide below). The sounds produced at these 22 points are the '22 Shrutis' and the 3 types of distances in-between are called as 'Shrutyantara' (in Sanskrit) (See Legend below)" http://www.22shruti.com/

And: https://en.wikipedia.org/wiki/Shruti_(music)#Identification_...

It seems there is no getting away from the situation of there being identifiable 7 note scales (Swaras), into which we can stuff five more notes to obtain some kind of twelve-note chromatic scale.


You also get the western[1] chromatic scale if you go up by a fifth (which is pleasant sounding for many reasons) ad infinitum.

C -> G -> D -> A -> E -> B -> F# -> C# -> G# -> D# -> A# -> E# -> B#(C)

Of course the B# you end up with at the end is 531441/4096 which is 1.3% higher frequency than 7 octaves above the starting C. If you want to generate flats as well, by traveling in the opposite direction, you end up with different notes for the flats. 12-TET is just the modern way of using a constant frequency ratio to divide the octave to match the 12 notes used by Pythagoras. The ancient greeks were unlikely to come up with it due to the reliance on irrational numbers.

1: Pythagoras is often credited with this scale, China also independently invented this scale and it's not clear which came first (https://en.wikipedia.org/wiki/Sh%C3%AD-%C3%A8r-l%C7%9C)


That's just from modulo math. A fifth is 7 semitones, which is relatively prime to 12. Thus 7x (mod 12) hits all the elements of the modulo 12 congruence for x in 0..11. We cover all notes in the first twelve steps.

But say we are not assuming a twelve note system in the first place; how do we get twelve notes?

Going up a fifth and then down a fourth is very close to a tone. We can do that five times before we approximately hit an octave, yielding six notes. The fifths above those notes are six additional notes.

We see that in your diagram:

C -> G -> D -> A -> E -> B -> F# -> C# -> G# -> D# -> A# -> E# -> B#(C)

in that we can interpret every other note as the whole tone scale:

C -> D -> E -> F# -> G# -> A# -> B#(C)

and their fifths:

G -> A -> B -> C# -> D# -> E# -> Fx(G)

Fifths fill the gaps in the whole tone scale to recover the other whole tone scale.

Going back to the 12 tone math again, 2 and 12 have a common divisor, so steps of 2 modulo 12 cycle through 6 symbols. There are 6 others left out, reachable by some relatively prime step like 7 (perfect fifth).


> That's just from modulo math. A fifth is 7 semitones, which is relatively prime to 12. Thus 7x (mod 12) hits all the elements of the modulo 12 congruence for x in 0..11. We cover all notes in the first twelve steps.

> But say we are not assuming a twelve note system in the first place; how do we get twelve notes?

My diagram showed an (approximate) 12 note cycle assuming only a 3:2 ratio for a fifth. There are lots of good reasons to use a fifth as the basic interval[1]. In no way does this assume a 12-note system.

The 12 notes don't come from "filling in" between the 7 notes of the diatonic major scale, they come from continuing the pattern until a near-cycle happens; is your argument that the 1.2% error in the cycle is arbitrary? it's less than 1/4 the next largest difference and slightly more than the rule of thumb for how much "anybody" can hear. The next time we get closer to a cycle is at 41, and we don't get closer by an order of magnitude until 53.

1: And in fact the fifth is used as a basis for many other scales both western and otherwise (Note that the first 5 notes are the major Pentatonic scale and the first 7 are the major diatonic scale).


Yes, the near cycle is a coincidence; it just comes from 1.5 ^ 12 ~= 129.746, which is close to the power-of-two 128.

It's because 3^12 is close to 2^19, to about 1.36 percent.

This is all abstract arithmetic; I don't believe it's exclusively how musicians discovered chromaticity. That likely has multiple origins, one of which is likely about filling in the five "missing" half step "slots" in a diatonic mode.

The 3:2 perfect fifth being an important interval isn't a coincidence; that's rooted in how the frequencies blend together without any beats being heard. The second harmonic of a fundamental is a fifth above the octave, and all that.

Speaking of which, the progression of harmonics, which is just multiples of a frequency rather than a geometric series like stacked fifths, can also derive diatonic scale notes.


I'm not certain of this, but my understanding is that Pythagoras generated these notes (actually more than 12 because there was a distinction between flats and the matching sharps) circa 500 BCE, and this predates chromaticity in music in the west.


Pythagoras' research is undeniable; but he wasn't some appointed gatekeeper, from whose desk sprang forth all western music. I don't suspect that very many musicians and instrument makers between 500 BCE and 1600-something (even the few that could actually read and write!) would have known about Pythagoras' work, and based their activities on his results.


"'only' at 22 points given by nature" >> this isnt true. The sa and pa are non movable and dont have upper and lower shruti is for a practical reason. Tanpura, which is a drone instrument has typical tuning of sa and pa notes. Singers typically sing with tanpura, to get reference pitch. If singer sings variation (shrutis) around sa and pa, it causes acoustic beats (https://en.wikipedia.org/wiki/Beat_(acoustics)) where the volume appears to vary slowly. For example, tanpura sa drone string is tuned to 139 hz and singer sings 140 hz then audience hears beat of 1 hz. The beats are unpleasant so these shrutis are avoided. There is no 'natural' reason here.


The 12 tone scale provides good approximations of many aesthetically pleasing (mathematically simple) intervals.


So these kinds of discussions typically center around harmonic considerations. What about the melodic ones?


Micro-Tonal bands such as King Gizzard play around/bend the rules on the whole 12 notes in music thing.


Familiar with the band, but not examples of this. Can you recommend any tracks that demonstrate?


Their albums Flying Microtonal Banana, KG, and LW are all microtonal, so anything from those albums. Rattlesnake, Billabong Valley, Intrasport, the Hungry Wolf of Fate, etc.


3^12 is within 1.5% of 2^19


Bach explored another consideration, key changes within compositions, quite thoroughly: for example: https://en.wikipedia.org/wiki/The_Well-Tempered_Clavier. You can also consider the group theoretic explanation as well (sorry paywall): https://www.jstor.org/stable/3679467


Modern electric pianos support changing from 12TET to other things. I wonder how it would sound to have an electric instrument retune itself throughout a performance as the key changes. Would it be worth the hassle?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: