Acoustics · String modes

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.

Single-wire model · 2D
The speaking length / side elevationWire intact
Fixed bridge → speaking length → hitch and tuning pinDrag to pan · right moves scene right
Fundamental frequency
273
Hz · illustrative
Eighth partial
2,185
Hz · illustrative
Inharmonicity coefficient
0.00018
B · illustrative
Axial stress
0.995
GPa · illustrative

Partial spectrum

Relative amplitude & frequencies · illustrative
What you are seeingSelect a bar to isolate its standing-wave shape on the string.

Independent numerical checks

Computed each update
Finite-grid dispersion
Discrete wire mode vs continuum equation · illustrative
0.00%difference
Pluck-shape quadrature
Numerical integral vs exact first-mode coefficient · illustrative
0.00%difference
Undamped modal energy
Exact oscillator energy before and after · illustrative
0.00%drift

Experiment · 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.

No measurement yet. The predicted frequency is shown above. · illustrative
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):

μ yₜₜ + c yₜ − T yₓₓ + EI yₓₓₓₓ = 0

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:

fₙ = (n / 2L) √(T/μ) √(1 + Bn²),   B = π²EI / (TL²)

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:

qₙ(0) = 2a sin(nπr) / [π²n²r(1−r)]

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.

Made with 🤖 ChatGPT