When you play a note at a frequency, you actually also get whole numbet multiples of the ‘fundamental’ frequency. This is due to the physics of waves on e.g. a string (or air in a cavity) - since the ends are tied to not move, only whole number multiples match the ends. These are called ‘overtones’. For this reason octaves (which is 2x the frequency) sound perceptually similar—you just skip all the odd multiples.
Now, if you play two frequencies that are close together, the combined sound’s loudness will oscillate over time due to interference—for a small difference this is fast and dissonant, but for a large difference it’s a nice slow ‘vibrato’. This is called a ‘beat’ or ‘beating’. Thus, if the overtones perfectly (up to what you can hear) match you’ll get nice sounds (consonance), but if they differ by a little then they sound dissonant, and if they differ by more then it’s fine again.
Therefore small integer ratios sound the most consonant. An example is a 3:2 ratio, in between unison and an octave—and this is a “perfect fifth” (meaning you go up 8 half steps—though the usual “equal tempered” tuning only approximates the 3:2 ratio via a 2^(8/12) = 2^(2/3) ≈ 3.2:2 ratio, e.g. from C to G. Likewise major thirds (C to E) are (close to) a 5:4 ratio and sound good, but a half step lower (a minor third, like C to E flat/D sharp) sound a little funky. Seconds (C to D) and especially minor seconhs (C to D flat/C sharp) sound the most dissonant.
The reason why people use those weird 12th roots of 2 for the notes is that if you try to use the actual ratios you want, then you get a problem where each note increment can’t be equal, and so you can follow two sequences of integer ratio (‘justly tuned’) increments that give you slightly different frequency values. For example, four fifths compared to 2 octaves + a third gives tones which differ by a ratio of 81⁄80. Whichever you choose to put on your instrument, you’ll have made the other sound out of tune.
‘Equal temperament’ fixes this by making everything a little out of tune, using 12th roots of 2 so that you can approximate the just intervals pretty well while still having equal half step increments. People usually use this nowadays instead of trying to do the older ‘just intonation’.
And here’s a basic theory of what sounds good, called the Helmholtz consonance theory.
When you play a note at a frequency, you actually also get whole numbet multiples of the ‘fundamental’ frequency. This is due to the physics of waves on e.g. a string (or air in a cavity) - since the ends are tied to not move, only whole number multiples match the ends. These are called ‘overtones’. For this reason octaves (which is 2x the frequency) sound perceptually similar—you just skip all the odd multiples.
Now, if you play two frequencies that are close together, the combined sound’s loudness will oscillate over time due to interference—for a small difference this is fast and dissonant, but for a large difference it’s a nice slow ‘vibrato’. This is called a ‘beat’ or ‘beating’. Thus, if the overtones perfectly (up to what you can hear) match you’ll get nice sounds (consonance), but if they differ by a little then they sound dissonant, and if they differ by more then it’s fine again.
Therefore small integer ratios sound the most consonant. An example is a 3:2 ratio, in between unison and an octave—and this is a “perfect fifth” (meaning you go up 8 half steps—though the usual “equal tempered” tuning only approximates the 3:2 ratio via a 2^(8/12) = 2^(2/3) ≈ 3.2:2 ratio, e.g. from C to G. Likewise major thirds (C to E) are (close to) a 5:4 ratio and sound good, but a half step lower (a minor third, like C to E flat/D sharp) sound a little funky. Seconds (C to D) and especially minor seconhs (C to D flat/C sharp) sound the most dissonant.
The reason why people use those weird 12th roots of 2 for the notes is that if you try to use the actual ratios you want, then you get a problem where each note increment can’t be equal, and so you can follow two sequences of integer ratio (‘justly tuned’) increments that give you slightly different frequency values. For example, four fifths compared to 2 octaves + a third gives tones which differ by a ratio of 81⁄80. Whichever you choose to put on your instrument, you’ll have made the other sound out of tune.
‘Equal temperament’ fixes this by making everything a little out of tune, using 12th roots of 2 so that you can approximate the just intervals pretty well while still having equal half step increments. People usually use this nowadays instead of trying to do the older ‘just intonation’.