Doppler Shift & Pass-by
Frequency shift for a moving source or observer - with an audible pass-by simulation.
Inputs
The Doppler effect
When a source moves towards a listener, each successive wavefront is emitted closer than the previous one, so crests arrive more often: the perceived frequency rises. Moving away, wavefronts are stretched and pitch drops. For motion along the line between source and observer in still air:
with v_s the source speed and v_o the observer speed (positive towards each other in the first line). The effect is asymmetric: a source moving at Mach 0.5 raises pitch by an octave approaching but lowers it by only a fifth receding.
Pass-by signature
For a vehicle passing at closest distance d, only the velocity component along the line of sight matters, so the frequency glides smoothly through f₀ at the moment of closest approach:
The closer the pass, the more abrupt the glide. This pass-by curve is used in railway and road noise to separate tonal components and estimate vehicle speed. (The simulation ignores the small propagation-delay correction.)
Sonic boom
When v_s \ge c the source outruns its own wavefronts; they pile up into a conical shock (the Mach cone, half-angle\sin\alpha = 1/M). Ahead of the source nothing is heard until the cone sweeps past. Raise the source speed above 343 m/s to see it.