Why Piano Strings Refuse Perfectly Harmonic Notes
A perfectly flexible string has evenly spaced partials. Real steel wire bends, and that small stiffness nudges its upper frequencies sharp. Explore the effect on a single piano-like string.
Partial spectrum
Relative amplitude & frequencies · illustrativeIndependent numerical checks
Computed each updateExperiment · measure a vibration cycle
Sample the first mode's calculated displacement, find repeated downward zero-crossings, and compare the measured frequency with the string equation. This is a numerical measurement of the model, not a microphone recording.
The science · equations, assumptions and limits
Governing model
A uniform string with tension and bending stiffness is modelled as a tensioned Euler–Bernoulli beam. For small transverse displacement y(x,t):
Here μ is mass per unit length, T is tension, E is Young's modulus, I = πd⁴/64 is the second moment of area for a circular wire, and c is a simple distributed damping term. The density used to obtain μ = ρπd²/4 is ρ = 7,850 kg/m³ (textbook steel density).
Mode frequencies
With fixed ends, the mode shape is sin(nπx/L). Its undamped frequency is:
The ideal flexible-string limit is B = 0, giving fₙ = nf₁. Positive B makes the upper partials sharper than exact integer multiples of the fundamental. The displayed cents offset is 1,200 log₂[fₙ/(nf₁)].
Initial pluck and time evolution
The initial shape is a triangular displacement with zero initial velocity. Its sine-series coefficient is:
Each mode is an independent damped oscillator. The app evaluates its exact underdamped solution at fixed 1/120-second simulation ticks, so frame rate does not set the physics step. The drawing exaggerates transverse displacement so the shape remains visible.
What is simplified
- One straight, homogeneous, solid steel wire is used; real pianos use multiple strings per note and may use wound bass strings.
- The supports are perfectly fixed. Bridge flexibility, soundboard coupling, air loading, longitudinal motion, temperature, wire curvature and nonlinear large-amplitude effects are omitted.
- Damping is a single illustrative rate shared by all modes, not a measured loss model.
- The 2.4 GPa tensile limit is an illustrative failure threshold, not a material certificate or a safe working limit. Above it, the visual model marks the wire as broken and stops its tone.
- The four presets and all live parameter values are illustrative. The steel density is textbook; the equations are standard small-deflection beam/string theory.
Interpretation
Stiffness grows strongly with diameter because I is proportional to d⁴. A small increase in wire thickness can therefore make the upper partials noticeably less harmonic, even while the fundamental also changes because the wire gains mass. Piano tuners account for inharmonicity when setting the relationship between notes; this single-string experiment demonstrates the partial shift, not a complete piano tuning procedure.