Toolyard

Standing Wave Simulator

Equations in this simulation

v = √(T ÷ µ)
TTension T (N)how hard the string is pulled; tuning a guitar peg changes it
µLinear density µ (mass per length, g/m)thick bass strings are heavier per meter, so they sound lower at the same tension; used in kg/m
vwave speed on the stringhow fast a bump travels along it

With the current values:

f_n = n v ÷ 2L, λ_n = 2L ÷ n
LLength L (m)between the two fixed ends: the nut and the bridge on a guitar
nHarmonic nn = 1 is the fundamental; n = 2, 3, … are the overtones, at whole multiples of its frequency
f_nfrequency of harmonic nthe pitch; pressing a fret shortens L and raises it
λ_nwavelength of harmonic nn half wavelengths fit exactly between the ends

With the current values:

nodes at x = k L ÷ n, k = 0, 1, …, n
nodespoints that never moven + 1 of them, the two ends included; halfway between are the antinodes, which swing the most

With the current values:

b_n = 2 h L² sin(n π a ÷ L) ÷ (n² π² a (L − a))
aPluck position (% of the length from the end)a harmonic with a node at the pluck point is missing: plucked at a fifth of the length, the 5th, 10th, … harmonics are silent
b_namplitude of harmonic n in the pluckthe triangle the finger pulls the string into, written as a sum of sine waves (a Fourier series); the chart shows them

How to use the standing wave simulator

  1. Set the tension, the mass per meter and the length of the string, and pick a harmonic. The string vibrates in that standing wave, with the nodes ringed in red and the envelope dashed; the picture is slowed down so you can follow it, by the factor shown under it.
  2. Switch to Pluck it and the string starts from a triangle, pulled aside at the pluck position, and moves as the sum of all its harmonics, which the chart shows as a spectrum. Pluck near the end for a bright sound with many overtones, near the middle for a mellow one; any harmonic with a node at the pluck point is missing.
  3. Tick Play the sound to hear the note at its real pitch. Raise the tension or shorten the string and the pitch goes up, just as when tuning or fretting a guitar; the Instrument Tuner tells you which note a real string plays, and the Tone Generator plays any frequency.

Frequently asked questions

What is a standing wave?

Two waves of the same frequency traveling in opposite directions, here the wave running along the string and its reflection from the fixed end. They add up so that some points, the nodes, never move and the points halfway between, the antinodes, swing the most. Only wavelengths that fit a whole number of half-waves between the ends can stand: λ = 2L/n.

How do I work out the frequency of a string?

f = (n ÷ 2L) √(T ÷ µ). The wave speed is √(T ÷ µ), the square root of the tension over the mass per meter, and the fundamental has a wavelength of twice the length. A guitar high E string, 0.65 m long, 0.4 g/m, tuned to 330 Hz, is under about 74 N of tension.

Why does a plucked string sound different from a pure tone?

Because it vibrates in many harmonics at once, at 1, 2, 3, … times the fundamental, and the mix of their strengths is the timbre. Where you pluck sets the mix: a pluck at a fifth of the length removes the 5th, 10th and 15th harmonics entirely and is weak in high ones, while a pluck close to the bridge keeps many high harmonics and sounds bright and twangy.

What are harmonics on a guitar?

Touching the string lightly at the middle, a third or a quarter of the way along forces a node there, which kills every harmonic that needs movement at that point. What is left rings at 2, 3 or 4 times the open string's frequency, the clear bell-like notes guitarists call harmonics.

It says WebGL is turned off.

The 3D view needs WebGL, which every current browser has. It can be switched off by hardware acceleration being disabled in the browser settings, or by a very old graphics driver. Turn hardware acceleration on, or try another browser.

Is anything uploaded?

No. The simulation is drawn by your own browser with WebGL; nothing is sent anywhere, and it keeps working offline once the page has loaded.

More science simulations

Related calculators and tools

Related simulations