This phenomenon takes place when either the sound source or the listener are moving. The classic example that is always used is an ambulance siren speeding by and disappearing into the night.
Let's take a look at the previous figure in which the ambulance is still and the siren emits a sound that, being of a certain frequency, generates wave fronts distanced at constant intervals. When, on the other hand, the vehicle is moving and is approaching the listener, that very same siren generates wave fronts that are closer to each other compared to when the vehicle was still. This is because motion has caused the wave fronts to compress. Seeing that the wave fronts are now closer to one another we perceive a higher frequency, in other words, a more acute sound. When the vehicle passes by and drives off (disappearing into the night), this causes the space between the wave fronts to increase, and therefore we perceive a lower sound because a lower frequency reaches our ears.
The following sound illustrates what we've just described
The previous example reproduces one of the most typical manifestations of the doppler effect.
In our next example the sound has been obtained by taking a single sound source (500 Hz frequency) and simulating its motion in relation to an immobile listener, by applying a mathematical algorithm[2 ].
As we can see, when the source approaches the listener, a more acute sound is perceived compared to the original one. This occurs because the wave fronts get compressed. When the source goes beyond the listener, the wave fronts distance themselves from one another and the sound is perceived as being less acute than the 500 Hz one.
[2 ] An algorithm is a calculation process that aims at obtaining a certain result beginning with a set of conditions and initial data. For a detailed description of algorithms and their use, read any introductory informatics textbook.