Off topicLearning to compose and understand music notation is analogous to learning programming. The strange thing is, music is usually in my head (and sometimes I make it a point to listen to music) while in the 'groove' of programming. I have zero musical talent but the basic system of musical notation was easy to learn.
https://www.infragistics.com/commun...sts/is-programming-similar-to-composing-music
Music is all about math and physics.
For example, the notes in western music are separated by the 12th root of 2, or 1.05946309436
This, in fact, does not make for the best sounding harmony. Hence we prefer to round things to the next closest integer fractions.
For example, in the scale of the key of A, the note D is 4/3 the frequency of A. E is 3/2 that of A. This is called a Perfect Fifth.
| Note | Standard interval name(s) relating to A 440 | Frequency (Hz) | Multiplier | Coefficient (to six places) | Just intonation ratio |
|---|---|---|---|---|---|
| A | Unison | 440.00 | 20⁄12 | 1.000000 | 1 |
| A♯/B♭ | Minor second/Half step/Semitone | 466.16 | 21⁄12 | 1.059463 | ≈ 16⁄15 |
| B | Major second/Full step/Whole tone | 493.88 | 22⁄12 | 1.122462 | ≈ 9⁄8 |
| C | Minor third | 523.25 | 23⁄12 | 1.189207 | ≈ 6⁄5 |
| C♯/D♭ | Major third | 554.37 | 24⁄12 | 1.259921 | ≈ 5⁄4 |
| D | Perfect fourth | 587.33 | 25⁄12 | 1.334839 | ≈ 4⁄3 |
| D♯/E♭ | Augmented fourth/Diminished fifth/Tritone | 622.25 | 26⁄12 | 1.414213 | ≈ 7⁄5 |
| E | Perfect fifth | 659.26 | 27⁄12 | 1.498307 | ≈ 3⁄2 |
| F | Minor sixth | 698.46 | 28⁄12 | 1.587401 | ≈ 8⁄5 |
| F♯/G♭ | Major sixth | 739.99 | 29⁄12 | 1.681792 | ≈ 5⁄3 |
| G | Minor seventh | 783.99 | 210⁄12 | 1.781797 | ≈ 16⁄9 |
| G♯/A♭ | Major seventh | 830.61 | 211⁄12 | 1.887748 | ≈ 15⁄8 |
| A | Octave | 880.00 | 212⁄12 | 2.000000 | 2 |
Reference: https://en.wikipedia.org/wiki/Twelfth_root_of_two






