Experiment
Stringstanding waves and harmonics
Pluck a guitar string, shorten it at a fret, touch it lightly in the middle. See that a single sound is many tones at once — then set the string swinging with an oscillator and compare it with a pipe.
Click a fret on the neck to shorten the string. Each fret raises the pitch by a semitone.
Challenges
0 / 4Did you know…?
A wave runs along a guitar’s E4 string at about 430 m/s — faster than sound in air (343 m/s). It follows straight from the formula v = 2L·f₁ = 2 · 0.648 m · 329.6 Hz.
The six strings of an electric guitar (a 0.010–0.046″ set) pull on the neck with a combined force of about 460 N — as if a 47 kg weight were hanging from it. In a concert grand piano the string tensions add up to around 20 metric tons, which is why it has a cast-iron frame.
A clarinet behaves roughly like a pipe closed at one end. That is why the even harmonics are weak in its low notes, and when “overblown” it jumps up a twelfth (3·f) rather than an octave like a flute.
How does it work?
1 A wave there and back
After a pluck, the triangular kink splits into two waves running in opposite directions. They bounce off the fret and the bridge, and together they add up to the vibration of the string.
Some shapes don’t travel at all — they just grow and shrink in place. These are standing waves, or vibration modes. The points that stay still are nodes, and the places that vibrate the most are antinodes.
2 What tones can a string make?
A whole number of half-waves has to fit into the length L: λn = 2L/n. The wave speed depends on the tension T and the mass of one meter of string μ:
v = √Tμfn = n · v2L = n2L√TμTighter — higher. Thicker (larger μ) — lower. Shorter — higher. The tone n = 1 is the fundamental f₁, and 2f₁, 3f₁… are the harmonics.
3 Frets and semitones
Guitar frets are spaced so that each one shortens the vibrating part of the string and raises the pitch by a semitone, that is, multiplies the frequency by 21/12 ≈ 1.0595:
Lk = L02k/12fk = f0 · 2k/12After 12 frets the frequency doubles (an octave), so the 12th fret sits exactly halfway along the string. That is why the frets get closer and closer together.
4 Timbre and the plucking point
Plucking at the point x₀ excites mode n with the amplitude
An ∝ sin(nπx₀/L)n2If x₀ falls on a node of mode n (e.g. x₀ = L/3 for n = 3), that mode stays silent — this is Young’s law. Near the bridge the higher harmonics are relatively stronger and the sound is brighter, more metallic. In the middle it is soft and round.
5 Harmonics (flageolet tones)
A light touch at a distance L/k from the end damps every mode that moves at that spot. Only the modes with a node at that point survive: n = k, 2k, 3k…
You then hear the tone k·f₁: at ½ — an octave, at ⅓ — an octave and a fifth (a twelfth), at ¼ — two octaves. On a guitar that is around the 12th, 7th and 5th frets.
6 Resonance and the standing wave
In “Standing wave” mode the oscillator shakes the end of the string at the frequency f. When f = n · f₁, every reflected wave arrives in time with the next push. The vibration grows and a clean standing wave appears: n antinodes and n + 1 nodes, spaced half a wavelength apart.
Away from resonance the waves partly cancel out — the motion is small and irregular. The tension comes from a weight on a pulley: T = m·g (Melde’s experiment).
7 Pipes
In a pipe it is the air that vibrates. At an open end the pressure equals atmospheric pressure, so there is a pressure node there. At a closed bottom there is a pressure antinode.
open: fn = n · v2L, n = 1, 2, 3…closed: fn = n · v4L, n = 1, 3, 5…So a closed pipe plays an octave lower and has only odd harmonics. The speed of sound in air at 20 °C: v ≈ 343 m/s.
⚙ How the simulation computes, and what we simplified
The string is divided into 240 segments. The program solves the wave equation with the finite-difference method, with light damping and fixed ends:
∂2y∂t2 = Tμ · ∂2y∂x2yit+1 = 2yit − yit−1 + r2(yi+1t − 2yit + yi−1t)The scheme is stable only when r = v·Δt/Δx ≤ 1 (the Courant–Friedrichs–Lewy condition). For a larger r errors snowball, so the program splits each frame into enough steps to keep r ≈ 0.9. The sound is made separately: from a sum of tones n·f₁ with amplitudes from the formula in section 4.
Simplifications: the motion is shown in slow motion and the displacement is magnified. Damping in the animation is much stronger than in a real string, so that everything happens within a few seconds. We ignore the string’s stiffness (real harmonics are slightly higher than n·f₁), the stretching of the string as it is displaced, and the pipe’s end correction. The pipe is shown in its steady state.