Acoustic Doppler
A moving sound source emits wavefronts that compress ahead and stretch behind it. Place the observer anywhere, toggle audio on, and hear the pitch shift in real time via Web Audio. At Mach 1 the wavefronts pile into a shock cone.
fobs = fsrc · vsound / (vsound ± vsource)
What you are seeing
The gold circle is a sound source emitting wavefronts at a fixed frequency. Each wavefront expands as a circle at the speed of sound. When the source moves, the wavefronts ahead are compressed (shorter wavelength, higher frequency) and those behind are stretched (longer wavelength, lower frequency).
The formula
For a stationary observer and a source moving at speed vs, the observed frequency is fobs = fsrc · v / (v − vs cos θ), where θ is the angle between the source velocity and the direction to the observer. When the source approaches, cos θ > 0 and the pitch rises. When it recedes, cos θ < 0 and the pitch drops.
Sonic boom
At Mach 1 (source speed = sound speed), the forward wavefronts pile up into a single shock front. Above Mach 1, the source outruns its own waves, producing a Mach cone with half-angle sin(θ) = v/vs. Try pushing the speed slider past 1.0 to see the cone form.
Beyond sound
The same effect applies to light (redshift and blueshift), water waves, and radar. Doppler radar uses the frequency shift of reflected microwaves to measure wind speed inside storms. Hubble’s 1929 discovery that distant galaxies are redshifted — the Doppler effect for light — was the first evidence that the universe is expanding.