Hacker News new | ask | show | jobs
by s-phi-nl 3728 days ago
There are some mathematical reasons.

In particular, the two most consonant (best-sounding) intervals are the octave and the fifth. The frequencies of the two pitches in an octave have a ratio of 2.0, and the frequencies of the two pitches in a pure fifth have a ratio of 1.5.

We would like the pitches we obtain from powers of these two ratios (stacking these intervals on top of each other) to be the same. However, since the integers are a unique factorization domain, they will never be (except for 2^0 = 1 = 1.5^0, of course). [1]

Thus, we pick powers of the two that are 'close enough' and call those the same pitch. The following Python (3) code subtracts the log-base-two of the powers of 1.5 from the integer they round to in order to find the closest ones:

  from math import log
  
  fifth = log(3/2, 2.0)
  
  print(0, 0.0)
  
  minDist = 0.08
  for i in range(1,100):
      pow = i* fifth;
      dist = abs(pow - round(pow)) 
      if dist < minDist:
          minDist = dist
          print(i, pow, dist)
This has output:

  0 0.0
  5 2.924812503605781 0.07518749639421918
  12 7.019550008653875 0.019550008653874684
  41 23.983462529567404 0.01653747043259557
  53 31.003012538221277 0.003012538221277339
From this, you can see that 12 is the closest that the powers of 2.0 and of 1.5 come being equal until 41. This is a primary reason why we use a chromatic scale with 12 notes.

(As an aside, a scale with 5 notes is also common around the world, called the pentatonic scale [2])

[1] For an explanation of this, see http://blogs.scientificamerican.com/roots-of-unity/the-sadde...

[2] https://en.wikipedia.org/wiki/Pentatonic_scale

2 comments

The TED video on the pentatonic scale by Bobby McFerrin is worth watching. Only 3 minutes long: http://youtu.be/ne6tB2KiZuk
This is a great explanation. To add onto this, I would imagine a lot of non-musicians would wonder whether there's a good reason for equal temperament, as most songs in every genre utilize it instead of more consonant scales (e.g., just intonation).

There are two main reasons. The first is a matter of switching between scales, as in, many songs will modulate to out-of-scale-but-mathematically-related chords. As 12TET has each scale using the same notes, one doesn't have to tiptoe around shared notes which are 'slightly' off. The second is pure convenience: using a set of notes for each key (or pushing the root note a few Hz up or down) would be a laborious process.

With that being said, an interesting direction some electronic producers take is to experiment with scales, given how ubiquitous waveforms with integer harmonics are. Here's an example from Richard D James: https://youtu.be/pTn1tmhA8L8