I love playing music, primarily guitar and piano (Fun fact, I was a music composition minor!). I’ve always been fascinated by theory and I finally sat down to visualize what is happening when notes are put together. I wouldn’t have imagined these intervals would look this way. Audibly these sounds go together like butter, visually it takes some interpretation.
Here I graph several common intervals (m2, M2, M3, P5), the major chord and the minor chord, to get another perspective of what makes music so magical. Notice that these intervals are formed from simple ratios. The Tonic frequency, sin(x), is added to the interval, sin(harmonic_ratio*x). I scaled the amplitude by 5 times so that it is easier to see. My resources were https://www.desmos.com/calculator and http://www.sengpielaudio.com/calculator-notenames.htm