# Simulating the Doppler effect

Is there a way - with Audacity or by some other means - of processing the continuous sound of a siren to produce the effect of it approaching, passing and then receding with the characteristic Doppler effect? I can do the movement, but the pitch change is beyond me.

A search of the forum turns up a lot of references to the effect but - so far, at least - I haven’t found the sort of step-by-step guide to achieving it which I’m after.

I’m using Audacity 2.4.2 running under Windows 7.

Many thanks.

I’ll make a couple of assumptions:

1. The siren is mounted on a car.
2. The car is travelling in a straight line.
• As the car approaches, the pitch will be higher by a fixed amount.
• As the car moves away, the pitch will be lower by a fixed amount.
• As the car passes, the pitch will transition from the higher pitch to the lower pitch.
• The speed of the transition depends on how close / far away the car is to the observer when it passes. If it passes close the observer, the pitch will change quickly. If it passes at a greater distance, the pitch change will take longer.

So we need to process the sound in three sections; (A) the approach, (B) the pass-by, (C) the departure.

Section A and C we can do with the “Change Pitch” effect (https://manual.audacityteam.org/man/change_pitch.html).
Section B we can do with the “Sliding Stretch” effect (https://manual.audacityteam.org/man/sliding_stretch.html).

If the siren is continuous, then the tricky part is making the three sections fit together nicely. To do this we need to crossfade the sections (https://manual.audacityteam.org/man/crossfade_tracks.html). You will need to experiment with this step to make the transition as smooth as possible.

So what we would do is to duplicate the track, and edit like this (the labels are for illustration and are not required).

and this is after processing and fading:

Steve, thanks so much: that’s splendid. The siren (not perhaps the best term - hooter is closer, or maybe even whistle) is on a steam locomotive heading an express train, but I can process the whistle/whatever separately from the rest of the effect if the pitch change proves too marked for the mechanical sounds and clatter of wheels as they pass.

I’m after dramatic impact rather than strict scientific accuracy.