Presets
Playback
String
Tension, material density and the sounding length set the pitch.
How it is excited
Pluck or strike, where, and how hard.
Damping and finger
Sustain, stiffness and the finger that isolates a harmonic.
Display
Pickup position, harmonics and slow motion.
Camera
Layers
Quality
Model checks
The science
The wave equation on a string
A string of tension T and linear density mu obeys y_tt = c^2 y_xx with wave speed c = sqrt(T/mu). With the two ends fixed the only steady patterns are standing waves sin(n pi x / L), so the allowed frequencies are f_n = n c / (2L) = n f1: exact whole-number multiples of the fundamental. That is the harmonic series.
How much of each harmonic?
Pulling the string aside by h at position a and letting go starts every mode with the amplitude b_n = 2 h L^2 / (n^2 pi^2 a (L-a)) * sin(n pi a / L). The amplitudes fall as 1/n^2, and every harmonic that has a node exactly at the pluck point (n a / L a whole number) is missing. A hammer of width w and speed v gives B_n = 4 v sin(n pi a/L) sin(n pi w/2L) / (n pi omega_n), which is much weaker in the highest harmonics when the hammer is wide.
Stiffness and damping
A stiff string (piano wire) has f_n = n f1 sqrt(1 + B n^2), so the overtones are slightly sharp; the slider sets B and the third graph shows the deviation in cents. Each mode loses energy at its own rate, here gamma_n = (1 + d (n-1)) / tau, which makes the sound mellower as it fades. A finger resting at a fraction q of the length adds damping in proportion to |sin(n pi q)|, so only modes with a node at the finger survive: these are the flageolet (harmonic) notes of a guitar or violin.
The three checks
(1) A finite-difference solution of the wave equation (Courant number 1) with the same initial pluck is run for several periods; the autocorrelation period of its output is compared with 2L/c. (2) The Fourier sine coefficients of the initial triangle are integrated numerically (Simpson) and compared with the closed formula for the first ten harmonics. (3) The spring-like energy of the initial triangle (T/2) integral y_x^2 dx is compared with the sum of the modal energies (mu L / 4) omega_n^2 b_n^2.
Simplifications
The string moves in one plane, the supports are rigid, and the soundbox is not modelled, so the radiated sound is estimated from the string velocity spectrum only. Damping is a simple empirical law. The time-scale slider slows the vibration for viewing; the optional sound always plays at real speed.