Say we play C4 and G4 on the piano at the same time, stop the notes, then play D4 and A4 simultaneously, then the quality of this sound is the same as the quality of the first.
To understand why that was the case, I read about just intonation and equal temperament.
Physically, we are generating waves that travel through the air, so to simplify things I went to a program called desmos where you can simulate waves.
I constructed an analogous situation there by first pretending that a note that has frequency equal to 2pi (the default period of a sine wave) was a note in the equal temperament system.
Next to produce a note which is a perfect 5th above that note, we must multiply the original frequency by 2^(7/12), this is equivalent to going up seven semitones, which is the definition of a perfect 5th.
Then, as the piano uses hammers which vibrate strings and then as the pressure waves add together in the air before reaching our ears, I will take the summation of the original sine wave and the second sine wave that has a frequency which is 2^(7/12) times the original waves frequency, this is what f1(x) + g1(x) represents on desmos.
Next to represent the same situation, but with both tones raised by two semitones I conduct the same experiment but with f1(2^(2/12)*x) + g1(2^(2/12)*x) (in desmos I make two new functions and give it an offset so you can see it lower down). Visually we can see that the wave generated by this sum is identical to the first, but with a scaling in the x direction.
Mathematically, we can see that the new wave just has a period which is 1/(2^2/12) times the original period. Because the period is shorter, this corresponds to a higher frequency, and pitch, so playing these two notes together should indeed have the exact same quality but just higher.
After doing this, I wondered why when voicing chords on piano we are usually allowed to move notes by octaves so that the voicing is more clear without actually changing the chord.
To do this, let's consider a similar situation to the first thing we did. Say we are playing C4 and G4, then based on what I learned, playing C4 and G5 should also produce a wave with the same quality.
Experimentally we would be comparing the wave generated by f(x) + g(x), and then f(x) + g(2x), as this represents a shifting by one octave up.
After doing that, the waves that were generated by both the above summations had totally different qualities:
Can someone explain why C4 and G4 played simultaneously and C4 played with G5 should both have similar qualities?