Pure sine waves don't harmonize. If you play a sine wave at 400Hz, and continuously vary the frequency of another sine wave from say 700 to 900Hz, you won't hear any special consonance at 800. It will sound just as ugly as the neighbors.
What really harmonizes is the overtone series. The human voice, and instruments imitating it, have overtones at integer multiples of the main frequency. For example, if I sing a note at 400Hz, it will consist of a sum of sine waves at 400, 800, 1200 etc. When two such notes are sounding at the same time, and their overtone series partially match up - that's when you hear harmony. It's easy to see that it happens at small integer ratios.
The guy who came up with this idea (Sethares) also came up with an easy way to test it. He synthesized bell-like sounds whose overtone series aren't exactly integers. And sure enough, melodies with integer ratios of pitches sound horrible when played on that instrument, but melodies with tweaked ratios sound perfectly fine.
EDIT: Thank you HN! I believed this for years, but after writing this comment and getting some replies I went and checked, and it's not completely true. Matching overtones play a role, but simple frequency ratios sometimes work even without overtones, and there are proposed explanations for that. https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2607353/#idm139...
If I open 2 tabs of https://www.szynalski.com/tone-generator/ and then listen to 440+880, and then change 880 to 850 it is a world of difference. I would definitely describe that difference as dissonance and consonance.
Now the overtone series IS important and is not always 'simple ratios', a good example in a real instrument is the strong minor third overtone of a carillon, and as expected writing in major for that instrument is hard.
Thank you for that link. I never thought of my browser as a test bench before. (Of course, now I want a DVM, function generator, scope, logic analyser, spectrum analyzer and all the other goodies ;) ).
I'm not sure if this is the same thing as consonance/dissonance, but the graph of sin(x) + sin(2x), an octave, is regular and pretty and the graph of sin(x) + sin(sqrt(2)x), a tritone, is much less so.
Except that if you use a frequency ratio of sin(x)+sin(2.01 x), which is really very close to an octave and really sounds just as consonant as an octave to almost all people, you almost the same "dissonant" picture:
The strange thing is, none of these "simple ratio" theories account for the fact that our brains allow a lot of "fuzziness" around these simple ratios, so much that you can't really call them simple ratios as they encompass a whole bunch of not-simple ratios as well.
That sine wave sounds a bit "fuzzy" to me, maybe the generator adds a small amount of overtones or aliasing. I tried another generator (http://onlinetonegenerator.com/) and the consonance feels weaker.
Interesting, I still hear it the same, dissonant and consonant, perhaps western music ruined me. Thanks for sharing.
Edit: Didn't see the url, makes my old reply obsolete:
Interesting. I tried to avoid clipping/aliasing by using audacity with as high quality audio as my system allows and I can still reproduce pretty much exactly what you hear on those websites. https://vocaroo.com/i/s0Be5CexLgVs is 440hz, then 440hz+880hz, then 440hz+850hz. But I would be interested in any repeatable signal that does not harmonize at all so do share!
This is why tuning pianos is so hard, btw. The overtones are way more important than anything else about each set of strings.
If you don't take care of the overtones, playing scales will create a sort of "wah" effect that was cool in the 60's, but not so desirable for the freshly tuned piano. It's one of many reasons straight up MIDI sounds so weird. (Instrument modelling and multiple samples fixes that).
And you have different temperments, which flavour the sounds in different ways even after the "clashing" overtones are taken care of.
It's all related to how phonemes, units of speech, make different vowels or consonants when the pitch is changed. You'd be surprised at how much a speech sound changes in perception just because of the pitch. It has everything to do with those "What do you hear?" memes out there. Our brains do interesting things to similar wave envelopes at different pitches.
Fascinating stuff if you're into that sort of thing.
>It's one of many reasons straight up MIDI sounds so weird
PSA for anyone who needs to hear it: MIDI doesn't have a sound any more than sheet music does.
General MIDI-compatible software tone generator in Windows 95 is no more "MIDI" than an untuned piano in an abandoned house is "classical music".
MIDI to music is what TCP/IP is for communication (incidentally, these protocols are of the same age). If you want to "hear" MIDI, turn on the radio. You will "hear" MIDI in the same way you are "seeing" TCP/IP now, reading this page.
The limitations of this protocol do have an effect on sound, but in a subtle way. For instance, implementation of polyphonic pitch bend / slide was not standardized in the 80s. As a result, it was pretty much absent from electronic instruments until recently. A new MIDI-based standard, MPE, addresses that.
Surprisingly, what makes tones sound consonant is a matter of controversy in music perception research. The ratio between fundamental frequencies theory is most easily debunked: if that were true, equal temperament tuning would sound unbearable, but the over-tone matching theory is not confirmed either thus far.
In fact, here are two recent studies that suggest life-time exposure plays a significant role in the perception of consonance. If that's true your own judgement of consonance of two sounds is not a good evaluation of a theory of consonance, because that judgement may be shaped by your cultural exposure.
> The ratio between fundamental frequencies theory is most easily debunked: if that were true, equal temperament tuning would sound unbearable, but the over-tone matching theory is not confirmed either thus far.
Strong disagree there. EDO results in pure 4ths and 5ths. And I’m not sure how you can separate ratio of fundamentals from overtone consonance. And I’m not sure how you can separate “pleasing” from culture/upbringing, or why anyone would ever think that you could. It’s immediately evident by different people having different tastes. I appreciate the research, but I don’t think any of this is at all surprising.
That some properties of “consonance” are shared between cultures seems unsurprising, too, since the sounds everyone is exposed to will follow the same underlying acoustic properties. You can’t form words without listening to the overtones above your fundamental frequency, and forming resonance creates a notable body experiences, so those ratios are going to play an important role in most cultures as a matter of course.
Maryanne Amacher made some music that relies on the non-linearity of ears, what is known as "otoacoustic emissions." I guess if you put a sound source that produces the sum of two pure sine waves up to a human ear then record what comes back out, it can add in combination tones.
I think it's easiest to perceive in Chorale 1: https://www.youtube.com/watch?v=rtmv6LxNJqs&t=3079s (I'm not sure if I only hear the low-pitched tones because of non-linearities of my amplifier and headphones at higher volumes though...)
It's way too easy to get overtones from a sine wave. Lots of music production involves compression of dynamic range into a smaller interval, but this introduces integer overtones. For a toy example, we can think of arctan as being a compression function that takes infinite dynamic range into the interval [-1,1]. Playing around with some Fourier series, it looks like arctan(sin(x)) has a bunch of extra odd harmonics over the sin(x) fundamental.
In May, there was a HN post about a statistical mechanical model that derived a scale from an overtone model. It would be cool to see what comes out of inharmonicity (like bells).
https://advances.sciencemag.org/content/5/5/eaav8490.full
But, if I play pure sin(t440) + sin(t440x2^(4/12)) + sin(t440x2^(7/12)), it still sounds like a major chord?
I'm on mobile, so I can't whip up a jsfiddle, but I know from experience this doesn't sound terrible?
It's hard to type the equations out on my phone, but the resulting wave when adding a and a# has a very large period and sounds bad, where a + c# has a shorter period and sounds good. I'd be curious about the pure sine wave which matches the period of the summed waves.
I feel like there's more to this. Maybe I can make a visualization with matching sound over the weekend.
Pure sine waves don't harmonize. If you play a sine wave at 400Hz, and continuously vary the frequency of another sine wave from say 700 to 900Hz, you won't hear any special consonance at 800. It will sound just as ugly as the neighbors.
What really harmonizes is the overtone series. The human voice, and instruments imitating it, have overtones at integer multiples of the main frequency. For example, if I sing a note at 400Hz, it will consist of a sum of sine waves at 400, 800, 1200 etc. When two such notes are sounding at the same time, and their overtone series partially match up - that's when you hear harmony. It's easy to see that it happens at small integer ratios.
The guy who came up with this idea (Sethares) also came up with an easy way to test it. He synthesized bell-like sounds whose overtone series aren't exactly integers. And sure enough, melodies with integer ratios of pitches sound horrible when played on that instrument, but melodies with tweaked ratios sound perfectly fine.
EDIT: Thank you HN! I believed this for years, but after writing this comment and getting some replies I went and checked, and it's not completely true. Matching overtones play a role, but simple frequency ratios sometimes work even without overtones, and there are proposed explanations for that. https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2607353/#idm139...