Presets
Playback
String
Ideal fundamental, length and diameter set tension and stiffness; tension is calculated, not chosen.
Material
Changes Young modulus and density at the same pitch.
Excitation
Where and how hard
Damping and display
Display magnification only exaggerates the picture.
Pointer tool
Drag the string to pluck it where you let go, or drag the pickup.
Layers
Model checks
The science
A string is a sum of standing waves
A string of length L, tension T and linear density μ carries transverse waves at speed c = √(T/μ). With both ends pinned, only the standing waves sin(nπx/L) fit, and for a perfectly flexible string their frequencies are exact multiples of the fundamental, fn = n f0, with f0 = c/2L. Any starting shape is a sum of these modes. A pluck lifts the string into a triangle of height h at the fraction β of its length, and the amplitude of mode n is an = 2h sin(nπβ) / (n²π²β(1−β)). Plucking at β = 1/2 therefore silences every even partial and plucking near the bridge keeps many strong high partials, which is why that sounds bright and thin. A hammer (a short push in speed rather than a displacement) gives an ∝ sin(nπβ)/n, which is why piano hammers hit at about 1/8 of the length to remove the weak, harsh 7th and 8th partials. The pickup hears the string at position xp, so mode n is weighted by sin(nπxp): a pickup at a node of a mode does not hear it.
Stiffness stretches the series (inharmonicity)
A real wire resists bending as well as stretching. For a simply supported string this adds the term EI uxxxx to the wave equation and the partials become fn = n f0 √(1 + B n²) with B = π³ E d⁴ / (64 T L²) (Fletcher 1964). The partials are stretched sharp: n = 8 sits about 866 B (n²−1) cents above 8 f1. B is tiny for a long thin guitar string and large for a short thick piano string, and piano tuners stretch octaves to match it. Damping is modelled per mode as σn = σ1(1 + g (n²−1)): high partials die first, as in a real note.
How the page checks itself
Check 1 integrates the string equation directly on a grid (second-order finite differences, 120 cells, no modal formula inside) and compares the FFT peaks of its motion with the formula. Check 2 synthesises the signal for the string you set and recovers its partial frequencies and amplitudes by Hann-windowed, zero-padded FFT. Check 3 compares the closed-form stored energy T h² / (2 L β(1−β)) with the sum of the modal energies.
Honest simplifications: simply supported (pinned) ends; real strings are clamped, which raises the apparent B for the lowest partials. Vibration in one plane only (no polarisation beating, no coupling to the soundboard, no two-stage decay). The pluck is an ideal triangle and the hammer an ideal point impulse, with no felt contact time. Damping is a simple two-parameter law, not measured loss. The picture is slowed by a large factor and exaggerated in height; the sound and the graphs use real time and real amplitudes. The material constants (steel 200 GPa, nylon 3 GPa, brass 105 GPa, gut 5 GPa) are typical handbook values; presets are plausible but not measured instruments.
What to try
- Press Ideal thin string, pluck at middle: every even partial disappears from the spectrum, and the four mode rows show why (their middle point is a node).
- Compare Bright: pluck near the bridge with Mellow: pluck over the pickup: the same string, very different spectral centroid.
- Select Piano C6 (struck, stiff) and watch the purple ideal-harmonic ticks fall below the yellow partials on the spectrum; the stretch graph climbs past the red 5-cent line.
- Raise the wire diameter on any preset: B grows with the fourth power of the diameter.
- Switch the material from Steel to Nylon at the same pitch: the tension drops sharply and the stiffness changes.
- Press Sound to hear the additive synthesis of the partials you see (it starts muted).