Explore pitch, beats, roughness, consonance, and the difference between just intonation and equal temperament — using your ears as the instrument.
Pitch is simply the frequency of a sound wave — how many times per second the air pressure oscillates. An octave is an exact doubling: 220 → 440 → 880 Hz. Most people immediately recognise octaves as the "same note, higher". Try dragging the slider and listen to the jumps at each octave.
When two close frequencies sound together, they alternately reinforce and cancel. The rate of this beating equals the frequency difference. At 440 + 443 Hz you'll hear a tone wobbling 3 times per second. This is how musicians tune: when the beating stops, the notes are in unison.
As the frequency separation grows beyond ~15–20 Hz, individual beats become indistinct and the sound turns rough or harsh. This happens when two frequencies fall within the same "critical band" of the cochlea — roughly 1/3 of an octave. Maximum roughness occurs around 30–40 Hz separation; beyond that, we start to hear two separate pitches.
When frequency ratios are simple whole numbers, harmonics align and the result sounds smooth — consonant. Complex ratios produce clashing harmonics — dissonance. Use sawtooth waves (rich in harmonics) to make this contrast vivid. Listen to how "locked in" the octave and fifth feel compared to the minor second.
Equal temperament divides the octave into 12 equal semitones (each a ratio of 21/12). This lets us play in any key — but almost every interval is slightly mistuned compared to pure whole-number ratios. The major third is the most dramatic case: ET is 14 cents sharp, producing an audible ~7 Hz beat between harmonics. Use sawtooth or organ tones to hear it clearly.
Now play a full major triad — root + third + fifth. The beating in ET builds across all three pairs of harmonics simultaneously.
If you stack 12 pure perfect fifths (3:2 ratio each), you travel through all 12 notes and "should" return to the starting pitch — but you land 23.5 cents sharp. This gap is the Pythagorean comma. Meantone temperament, common before 1700, kept thirds pure but had to dump the error into one "wolf fifth" — a horribly out-of-tune fifth that composers avoided. Equal temperament spread the comma evenly across all 12 fifths, each about 2 cents flat.
Finally: the Pythagorean comma in action. Hear what happens when 12 stacked pure fifths are compared to 7 pure octaves — they should be the same pitch, but they're not.