applets.

Sound Waves

← All apps

About Sound Waves

A steady note, a sound that repeats itself exactly, is a mix of sine waves: a slow one (the 1st harmonic, which sets the pitch) and faster ones at 2, 3, 4… times its speed. (Your ear still hears that pitch when the 1st harmonic is missing but several of the next ones are there; a single harmonic on its own is just a pure tone at its own, higher pitch. Noisy sounds such as hiss don't repeat, and aren't built this way.) This page adds them together on an oscilloscope. With the right sizes they make a square, a sawtooth, a triangle or a pulse. Click a bar on the spectrum below the screen to pick a harmonic, and drag it up or down to change its size. HEAR IT plays the wave you have built, so you can hear what each harmonic adds.

Keys: Space starts or stops the sound.

THE STORY

In 1807 Joseph Fourier told the Institut de France in Paris that the way heat spreads through a solid could be worked out by writing the temperature as a sum of sine and cosine waves. Lagrange and others doubted that a sum of smooth waves could make a shape with corners, and his book, Théorie analytique de la chaleur, did not appear until 1822. Today the idea is everywhere: in music and sound files, in JPEG pictures, in radio and in the study of the tides.

Where the wave jumps, the sum overshoots, and adding more sine waves doesn't cure it: the overshoot settles at about 9% of the jump instead of shrinking away. Henry Wilbraham described this in 1848, but it was forgotten. Fifty years later Albert Michelson, who with Samuel Stratton had built a machine that added up to 80 waves with springs and levers, raised in the journal Nature the question of how a sum of smooth waves can make a jump. Josiah Willard Gibbs answered there in 1898 and 1899, and the overshoot has been called the Gibbs phenomenon ever since.

The oscilloscope grew from Karl Ferdinand Braun's cathode ray tube of 1897: a beam of electrons drawing on a phosphor screen that glows where it lands, often green.

HOW IT WORKS

The bright trace is the sum of the harmonics, shown over two periods. Each harmonic has a size (amplitude) and a starting point (phase). A square wave is 4/π × (sin x + sin 3x ÷ 3 + sin 5x ÷ 5 + …): only the odd harmonics, each smaller in step. A sawtooth uses every harmonic, and a triangle the odd ones shrinking with the square of their number, which is why it settles so quickly. The faint dashed line is the ideal wave the recipe heads for.

The overshoot is measured on the screen's sum, and heads for 8.95% of the jump (the Wilbraham–Gibbs constant); more harmonics squeeze the horn thinner but not lower. A square wave's horn comes down to it from above (13.7% with one sine wave, 9.0% with seven). A sawtooth's comes up from below: with only the first few sine waves the sum doesn't even reach the top of the jump, and its ramp leans into the horn, so it is still about 7.4% with all 32 harmonics.

The sound uses your browser's Web Audio with these harmonics at their sizes on the screen, at the pitch you choose, and nothing plays until you press HEAR IT. A wave that reaches past 1 either way is turned down just enough to keep it from clipping, and a device whose sound runs at a low sample rate leaves out harmonics above half that rate. For a steady tone your ear mostly ignores phase: slide a harmonic's PHASE and the trace changes shape a lot, while the sound changes little or not at all. On a work computer sound may be blocked; everything else still works.

Simplifications. Only whole-number harmonics, up to the 32nd, and a steady tone: real instruments change their mix of harmonics as a note starts and dies away.

The same maths can draw pictures. Turn a closed drawing into numbers, and its harmonics become a chain of circles, each spinning on the rim of the one before, that traces the drawing: try it in Fourier Circles.

FURTHER WATCHING AND READING

SOUND WAVESTYPE 32

WAVE

HARMONICS

13th

THIS HARMONIC

1st
1.00
0°

Or click a bar on the spectrum, and drag it to change its size.

OVERSHOOT

SOUND

40%

Same maths, drawing pictures: Fourier Circles