A siren that leaves a trail of circles
The stage shows an ambulance, or a train, moving to the right along a straight road. It gives out one steady note. Every crest of the sound wave is drawn as a circle that grows from the point where the vehicle was at the moment that crest set off. One listener stands in front, the other behind. Press Play and the motion runs in very slow motion, so you can follow single crests across the screen.
The distances are drawn in wavelengths. The bar in the corner shows the wavelength the note would have if the vehicle stood still, which is 0.680 m for a 500 Hz note in air at 340 m/s.
Why the crests bunch up
Once a crest has left, it travels through the air at the speed of sound. It does not care how the vehicle moves afterwards. But the vehicle keeps going, so it sends the next crest from a point a little further along. In front, that point is closer to the crest that has just left, so the gaps shrink. Behind, the vehicle has moved away, so the gaps grow.
Shorter gaps, still moving at 340 m/s, pass the listener in front more often. More crests each second means a higher frequency, which sounds like a higher pitch. Behind, fewer crests arrive each second, so the pitch is lower. Neither note changes while the speed stays steady. The note in front does not creep upwards as the ambulance gets nearer; it just gets louder. You hear the familiar drop only at the moment it goes past.
Working out the new note
This step goes beyond GCSE and IGCSE. For a source moving at speed towards a listener who is standing still, the heard frequency is . Moving away, the minus becomes a plus. With the default 500 Hz at 30 m/s, the listener in front hears 548 Hz and the one behind hears 459 Hz.
The two changes are not equal. Ahead, the bottom of the fraction shrinks towards zero as the source speeds up, so the pitch climbs ever more steeply. The model stops at 250 m/s, below the 340 m/s speed of sound. That is far faster than any ambulance (rarely above about 40 m/s) or passenger train (about 100 m/s at most), so the top speeds exaggerate the effect to make it easy to see. A source faster than sound would overtake its own waves and pile them into a shock wave, heard as a sonic boom.
The same effect in light
Choose the galaxy and the sound is replaced by light. A galaxy moving away from a telescope stretches every wave it sends that way, so each line in its spectrum appears at a longer wavelength than the same line measured in a laboratory. That is red-shift. A telescope it is moving towards sees the lines squeezed towards blue, which is blue-shift. For speeds well below the speed of light, the shift is , also beyond GCSE.
Most distant galaxies are red-shifted, and the further away they are, the bigger the shift. That pattern is a key piece of evidence for an expanding universe. You can measure it yourself in the red-shift and expanding universe simulation. To hear how frequency sets pitch, try the sound waves and oscilloscope simulation.
Where this fits in your course
Red-shift of light from receding galaxies is in AQA GCSE Physics (4.8.2, separate physics only) and Cambridge IGCSE (6.2.3). The Doppler effect for sound, blue-shift and both formulas go beyond those courses, and the Punjab Class 10 book covers only the link between frequency and pitch. Treat the sound version as a way to understand red-shift, and as a preview of A-level waves.