leios / SoME_Topics

Collaboration / Topic requests for SoME
Other
212 stars 6 forks source link

Why are there 12 tones in music? A mathematical exploration of equal temperament and the harmonic series. #175

Open cmp5au opened 2 years ago

cmp5au commented 2 years ago

About the author

Colin Parker: Math major, Data Scientist, and music enthusiast

Quick Summary

Why are there 12 tones in modern music? I'd like to use math, specifically continued fractions, to explain this phenomenon. Similar to 3B1B's early video on music and measure theory, I'm hoping people will gain a deeper understanding of both music and mathematics from this exchange.

Target medium

I'm thinking of having this become a video, but I'm open to other ideas and media.

More details

  1. What musical notes (frequencies) sound good together, and why? 1a. Harmonic Series (overtone series) 1b. Most important overtones in a harmonic series 1bi) Octave (first harmonic) 1bii) Perfect Fifth (second harmonic) 1c. Timbre of an instrument, and relation to the harmonic series

  2. What is equal temperament, and why is it useful? 2a. Call the ratio of frequencies between adjacent notes an interval (in music theory, a half step), and make all intervals the same size 2b. Include the most important harmonic -- the octave -- in our system. This allows us to have instruments in different registers (e.g. double bass and violin) sound consonant, even though they are separated by many octaves. Mathematically, this means our interval size is 2^(1/n), where n is the number of notes in our system 2c. Why use equal temperament instead of, for example, just intonation? 2ci) Mechanical limitations: open string, fretted, and wind instruments can only produce a limited set of notes 2ci) Playing music in a different key sounds approximately the same to those of us without perfect pitch, as relative pitches are all the same

  3. What equal temperament systems are best? 3a. Importance of including the second harmonic (perfect fifth) in the system 3ai) Gives you many other intervals, such as perfect fourth (octave less a perfect fifth), major second (two perfect fifths less an octave), major third (two major seconds), etc. 3b. Impossibility of including the second harmonic in the system 3bi) Mathematically, this would be equivalent to expressing 3 as a rational power of 2 -- not possible, but we can get close

  4. What are continued fractions, and how can they be used to best approximate an irrational with a rational? 4a. Continued fraction representation of log3 / log2, and the rational approximants it gives: 2/1, 3/2, 5/3, 8/5, 11/7, 19/12, 46/29, 65/41

  5. Practical application of this to music, limitations of human biology 5a. The human ear can detect variations in pitch of ~5 cents (4 cents if highly trained); closer approximation doesn't necessarily mean better 5b. Limited number of frets / buttons / keys on an instrument means smaller system is better 5c. These alternate TET tunings exist; Eastern instruments are tuned to 5-TET or 7-TET, the pentatonic scale approximates 5-TET, the major (or minor) scale approximates 7-TET

Contact details

Best way to contact me is by email: colin.parker@gmail.com

Additional context

There are Indonesian gamelans tuned to 5-TET, Chinese and Thai music in 7-TET, music written for 3-, 5-, 7-, 29-, and 41-TET that can be played instead of simply playing the scales (ref: https://www.youtube.com/channel/UCHSKIdtD1HrN-kn6-VN5mNQ)

Additionally, music has been created in, for example, 11-TET, which sounds incredibly spooky / "minor" / unstable partially due to not containing a good approximation for the fifth.

(Any additional licensing information? If you do not say anything, this post will be considered CC-BY.)

kevinb9n commented 2 years ago

From the peanut gallery!

cmp5au commented 2 years ago

From the peanut gallery!

  • There's a tricky line to walk here to avoid upsetting music theorists. :-) In general, there's a lot of very fun math that's adjacent to music theory, but you might want to disclaim that it isn't music theory and won't actually help you analyze or compose music better.
  • There's basically three realms to keep distinct, the physical, the mathematical, and the musical, and they influence each other but there's a ton of pseudoscience (so to speak) here.
  • Interesting thing about 5-cent discernment is that it means we CAN tell how off the major 3rd is quite easily, but we're habituated to it
  • Rational approximants is an interesting approach but I'm not sure about it. When I spreadsheet out which divisions are uncharacteristically good at approximating the perfect 5 and major 3 (discounting those that are multiples of a previous), I get 5, 7, 12, 19, and 31, and there's a reason why these form a fibonacci sequence that the approximant thing doesn't get at?
  • This is not worth much but here's an old diagram I did for an ELI5-type post and then never used. Any unlikely ideas it inspires in you are yours.

Good note on music theory -- I wasn't claiming that this material would help someone analyze or compose music better, but it's worth a disclaimer at the beginning.

Do you mean continued fractions is what you're not sure about? Rational approximants are used even in the divisions you mention: 2^(11/19) ~ 1.5, 2^(18/31) ~ 1.5 is why these 19- and 31-tone systems are good at approximating a perfect fifth.

If you mean continued fractions, I agree that it misses out on some good-enough systems just because they aren't best-in-class. Even then, I could add a section about how any continued fraction beginning with [1; 1, 1, 2] is "good enough" at approximating the second harmonic and therefore the perfect fifth. This would catch 19: 30/19 = [1; 1, 1, 2, 1, 2] and 31: 49/31 = [1; 1, 1, 2, 1, 1, 2], and would still showcase the power of continued fractions. What do you think?

alan2here commented 2 years ago

Each octave is divided into N notes, where multiplying the frequency of a note by a constant, and repeating N times goes to its equivalent in the next octave.

Because 12 is highly composite, setting N to 12 also allows for various other values for free, these are 2, 3, 4, and 6. However noticeably N = 5 is a small, simple ratio, and is missing. Tunings can compromise between N = 12 and somewhat compensating for a lack of N = 5, but it's interesting to imagine if there are other options available too.

options:

  1. N = 10, or 15 May sound very unfamiliar has 5, and either 2, or 3

  2. N = 20 has 2, 4, and 5 too many notes

  3. N = 60 has 2, 3, 4, 5, and 6 too many notes

  4. Adding the N = 5 notes between the N = 12 ones, this would yield 17 notes, I can only imagine that something like this has been tried before.

ZEKE-Foxheart commented 2 years ago

Also from the peanut gallery: There are also some facts that need to be fact checked as well. This is from a Musical Theorist who composes in "post-modern" (for a lack of a better term) compositions

   2a. Call the ratio of frequencies between adjacent notes an _interval_ (in music theory, a _half step_), and make all
   intervals the same size

Careful because an interval isn't a unit of distance but just how to measure distance between any 2 notes so it is common to say "the interval from C4 to C5 is an octave" or "the interval from C to E is a major 3rd"

   2b. Include the most important harmonic -- the octave -- in our system. This allows us to have instruments in different
   registers (e.g. double bass and violin) sound consonant, even though they are separated by many octaves.
   Mathematically, this means our _interval_ size is 2^(1/n), where n is the number of notes in our system
   2c. Why use equal temperament instead of, for example, just intonation?
   2ci) Mechanical limitations: open string, fretted, and wind instruments can only produce a limited set of notes

There are techniques to play some pitches other than what the instrument was meant to play which include "bending" (by pulling the string sideways on a fretted instrument or by adjusting the embouchure for wind instrument players for some wind instruments) and different fingerings for wind instruments.

   3ai) Gives you many other intervals, such as perfect fourth (octave less a perfect fifth), major second (two perfect fifths less
   an octave), major third (two major seconds), etc.

The major third is traditionally measured by going up to the 4th overtone (5th partial) to get a closer ratio 5:4

   5c. These alternate TET tunings exist; Eastern instruments are tuned to 5-TET or 7-TET, the pentatonic scale approximates

Usually, instruments made for scales smaller than 12, Eastern or Western, are tuned to Just intonation instead. Not to say that there are notable exceptions.

There are Indonesian gamelans tuned to 5-TET, Chinese and Thai music in 7-TET, music written for 3-, 5-, 7-, 29-, and 41-TET that can be played instead of simply playing the scales (ref: https://www.youtube.com/channel/UCHSKIdtD1HrN-kn6-VN5mNQ)

Additionally, music has been created in, for example, 11-TET, which sounds incredibly spooky / "minor" / unstable partially due to not containing a good approximation for the fifth.

Also, there are compositions that use 6-, 8-, 23-, 24-, 26-, 31-, 48-, and 72-TET scale to name a few. Honestly, name a natural number m and there is an m-TET most likely