loading...
running...
The science
A musical note is a harmonic series: partials at k f0 with amplitudes that fall off (here a_k = rho^(k-1)). Two simultaneous tones sound smooth or rough depending on how their partials sit relative to each other inside the ear's critical bands. Partials closer than about a critical bandwidth but not identical beat and produce sensory roughness (Plomp and Levelt, 1965; Helmholtz before them).
Sethares (1993) fitted the Plomp-Levelt data with a closed form for one pair of sinusoids of frequencies f1 < f2 and amplitudes a1, a2:
d = a1 a2 ( e^(-b1 s (f2-f1)) - e^(-b2 s (f2-f1)) ), s = 0.24 / (0.0207 f1 + 18.96), b1 = 3.5, b2 = 5.75
It is zero at equal frequency, peaks at a gap df* = ln(b2/b1) / ((b2-b1) s) (about 27 Hz at 500 Hz) and decays for wide gaps. The cross roughness shown is the sum of d over every partial of the lower tone against every partial of the upper tone. Plotted against the interval in cents (1200 log2 of the frequency ratio) it has dips at simple ratios such as 2:1, 3:2, 4:3, 5:4: there many partials coincide exactly (a coincident pair has gap 0 and no roughness) and the rest sit far apart. This is a physical explanation, offered by Helmholtz and Sethares, for why simple ratios are heard as consonant.
Euler's gradus suavitatis for a ratio p:q in lowest terms is 1 + sum e_i (p_i - 1) over the prime factorisation of p q: a historical numerical measure of simplicity (3:2 gives 4, 5:4 gives 7, 45:32 gives 14). In the 3D scene the roughness bars are placed where the sliding bridge of the second string would be for that interval, so the pointer, the bridge and the curve move together; string vibration is drawn as a sum of the lowest harmonics at a slowed-down visual rate, with the real frequencies used only for the sound and the readouts.
Checks. (1) For two pure 500 Hz sines the numerical argmax of the curve equals the analytic df*. (2) The cross roughness is symmetric when the tones are swapped. (3) For a 3:2 fifth with 12 harmonics a brute-force count finds floor(12/3) = 4 coinciding partials. (4) Twelve just fifths minus seven octaves equals the Pythagorean comma, 23.46 cents. (5) Doubling all amplitudes multiplies roughness by 4. (6) Two sines at the same frequency give zero roughness.
Honest limits. Roughness is one ingredient of consonance; culture, context, harmonic fusion and virtual pitch also matter, and the Sethares curve is a fit, not a law. The model uses equal-loudness sine partials, no masking, no combination tones and a fixed amplitude pattern. The "slowest partial beat" and "just ratio" labels are exact arithmetic; the roughness values are relative, not in absolute units. Equal-tempered intervals differ from just ones by up to about 16 cents (the third) and 2 cents (the fifth).