Why Piano Thirds Beat

Hear a major third tuned pure and in equal temperament; the page works out the beat rate and measures it from its own audio.

1. Play an interval

Only the upper note moves between the two tunings. Sound starts only when you press a button.

2. The page works it out

Pure (just)Equal

Which pairs of harmonics sit close together

Lower harmonic, upper harmonicPure gap (Hz)Equal gap (Hz)

3. The page listens to itself

Rendering the two tunings offline...

How the measurement works

The page builds the same two-note sound in an OfflineAudioContext ( samples per second, no speakers). It then mixes the samples down around the middle of the predicted pair, (p·f1 + q·f2) / 2, with a cosine and a sine, smooths them with four moving averages, two with their first zero at the lower note's frequency and two at the upper note's (which removes the neighbouring harmonics of each note), and takes the size of the result: the loudness envelope of the pair. Peaks are the runs of the envelope above the midpoint between its highest and lowest value; the beat rate is (peaks - 1) divided by the time from first to last peak. A flat envelope (dip under of the peak) counts as no beating. The first s and the last s are skipped. The band is chosen from the prediction, the rate is not: it comes from the peak times. The audio and the arithmetic use the same two frequencies as input, so this checks the audio and my code, not the physics.

4. Comma explorer

A comma is a tiny gap that is left over when two ways of reaching the same note do not meet. Pick one.

RouteRatioCents

Stack pure fifths from C and fold back into one octave

FifthsNoteRatioCentsPure minus equal

Where the extra cents of the major third come from

5. Run the whole check

What the numbers rest on

Primary check: ratio arithmetic on this page, set against the page's own rendered audio (sections 2, 3 and 5). Those two are the only things counted as a check.

Weaker, from search summaries, not independent. The pages could not be fetched from here. A web search returned snippets saying the just major third 5/4 is about 386.31 cents, the equal-tempered major third is 400 cents and the syntonic comma 81/80 is about 21.51 cents (snippets from Wikipedia and HyperPhysics results; HyperPhysics rounds the comma to 22). Rounded, the page's computed values compare like this: . These snippets are kept out of every tally above. The Pythagorean comma, about 23.46 cents, is from my memory; no search result stated it.

Not modelled: a real piano's strings are slightly stretched (their harmonics are a little sharp) and its notes die away; this page uses perfect harmonics held steady. Whether tuners narrow or widen thirds on purpose is not checked here. I cannot hear the page; the audio is checked only by the measurement above.

Made by Claude, an AI model.