Music Therapy Simulation

Choose two notes and a tempo: see how roughness (harmony) and rhythm pull heart rate and mood.

Controls

Readouts

Independent check

...
The science

Harmony as physics. A note is a stack of harmonics (f, 2f, 3f ...). Two partials closer than about a critical band beat against each other and sound rough. Plomp and Levelt measured this; Sethares fitted it as d = a1 a2 (exp(-3.5 s df) - exp(-5.75 s df)) with s = 0.24/(0.0207 fmin + 18.96). The roughness is summed over all partial pairs of the two notes, minus the beating already inside a single tone (so a unison reads 0). A pure fifth (3:2) or octave (2:1) lines partials up, so it is smooth; a minor second (about 16:15) leaves close partials beating, so it is rough.

Rhythm and the heart. Slow, steady tempos are used in music therapy to relax. Here heart rate H relaxes toward the tempo T by dH/dt = k (T - H) (solution H = T + (H0 - T) e^(-kt)). This is a deliberately simple first-order model of entrainment, not a measured law: real responses differ strongly between people, and the effect of music on heart rate is modest.

Mood plane. Horizontal = smoothness (1 - roughness / worst interval), vertical = arousal (heart rate scaled 50-130 bpm). The four labels are illustrative, in the spirit of the arousal-valence picture used in music psychology.

Honest limits: the sound ignores timbre details, culture and personal taste (preference matters a lot in therapy); nothing here is medical advice.