There are some amazing relationships between math and music. Here are some excerpts from one of my favorite books – Mathematics: Is God Silent?https://amzn.to/33bjcCa by James Nickel.
“The basic structure of a piano keyboard consists of an octave of 13 notes, 8 of which are white and 5 of which are black. The black keys come in groups of 2 and 3. As in many other applications, these numbers are part of the amazing Fibonacci sequence (1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89…).”
“Pythagoras’ (572-492 BC) discovery of counting number ratios in musical notes served to intensify his conviction that “all is number.” He is said to have discovered that the fifth and the octave of a note can be produced on the same string by stopping 2/3 and 1/2 of its length. He also believed that musical proportions governed the motion of the planets, hence the phrase ‘harmony of the spheres.'”
“Every note of the musical scale has an exact frequency; each note vibrates a certain number of times per second. The frequency doubles every octave, and musical intervals depend upon simple arithmetical ratios. Sounds that are pleasing to the ear will display a graph that reflects order and regularity. This can be described mathematically as the summation of sine functions. To fully comprehend the wondrous order and complexity in music involves a thorough knowledge of trigonometry.”
“The order and harmony of true music will create order and harmony in those who listen to it and play it. Those sounds that are not pleasing to the ear we call noise. Noise and dissonant music do not display regularity. The disorder of noise, and much of the popular “rock music” of today could be proved mathematically to be noise, will create disorder in those who listen to it and play it.”