Doppler Shift Effect — User Guide

A stylized Doppler-inspired time warp whose instantaneous source-read rate controls pitch/time motion and whose separate exponential gain law creates approach/recession-like amplitude trajectories.

Author: Shai Cohen Affiliation: Department of Music, Bar-Ilan University, Israel Version: 0.4.2 (2026) License: MIT License Repo: https://github.com/ShaiCohen-ops/Praat-plugin_AudioTools
Contents:

What this does

Doppler Shift Effect is a stylized time-warp instrument. It does not solve source/listener positions and the speed of sound. Instead, it directly specifies how quickly the output reads through the source:

raw_rate(u) = Base_shift + Shift_amount × u^Acceleration\nrate(u) = raw_rate(u) / k, 0 ≤ u ≤ 1

The derivative of the source-read position is the instantaneous rate. A rate above 1 reads the source faster and raises pitch; below 1 reads slower and lowers pitch. A second, independent law controls amplitude.

The preset names are evocative, not physical guarantees. Most named vehicle presets use a positive Shift_amount, so their pitch rises monotonically while the gain falls. A real constant-velocity pass-by normally moves from a higher approaching frequency to a lower receding frequency, crossing around closest approach. The script's visualization explicitly compares the musical law with a physical reference curve.

What is the Doppler effect?

The physical Doppler effect is the change in observed frequency caused by relative motion between a wave source and an observer. For sound, an approaching source is heard at a higher frequency and a receding source at a lower one because the spacing of arriving wavefronts changes.

This script borrows the perceptual idea of motion-linked pitch and level, but it implements it as a controllable resampling trajectory. It is therefore more flexible than a physical solver: it can make strictly rising or falling glides, preserve total duration, or deliberately run off the source early.

Quick start

  1. Select exactly one Sound.
  2. Run Doppler_shift.praat.
  3. Choose a preset.
  4. For a physically intuitive falling glide, use a negative Shift_amount.
  5. Choose Free traversal for source-exhaustion effects or Duration-preserving to traverse the whole source exactly once.
  6. Use Edge_guard_ms to avoid hard source/output boundaries.

Presets

PresetBaseShiftAccelerationDecay
Custom1.00.5215
Passing Car1.00.4212
Passing Train1.00.31.58
Flyby (fast)1.00.8420
Subtle Approach1.00.21.55
Heavy Decay1.00.5230
Sci-Fi Whoosh0.81.2325
Reverse Doppler1.5-0.52-10
Ambulance Siren1.00.352.515

Presets set the musical trajectory parameters but do not change the selected traversal mode, edge guard, output peak or visualization/playback switches.

Rate law and traversal modes

The source-read position is the integral of the rate law. Two traversal modes choose the normalization constant k.

ModekResult
Free traversal1The source can be consumed before the output ends when the mean rate is greater than 1. The remaining output is closed to zero, with an optional cosine guard.
Duration-preservingMean raw rate = Base_shift + Shift_amount/(Acceleration+1)Normalizes the entire rate curve so the read map traverses the source exactly once while preserving the relative glide shape.

For hearing pitch motion directly, convert rate to semitones:

pitch_shift_st = 12 × log2(rate)

Distance-like gain

Decay_amount controls a separate exponential amplitude curve:

This is a distance-like ratio law, not inverse-square acoustic propagation. It is intentionally independent from the pitch/time trajectory.

Controls

ControlDefaultMeaning
Base_shift1.0Starting raw source-read rate.
Shift_amount0.5Difference added across the file. May be negative, but the entire instantaneous rate must remain above 0.01.
Acceleration2Exponent shaping how quickly the rate moves toward its endpoint.
Decay_amount15Distance-like amplitude ratio law; 0, ≥1 or ≤−1.
Rate_modeFree traversalChooses free or duration-normalized source traversal.
Edge_guard_ms5 ms0 = hard boundaries; positive values add short smooth guards at source exhaustion and file edges.
Scale_peak0.99Final target peak.
Draw_visualizationOnDraws source-read geometry, glide, gain and measured spectrograms.
Play_resultOnPlays the result.

Channels, interpolation and level

Output name: <source>_doppler_<preset>.

Visualization

Historical / technological / compositional context

Christian Doppler proposed the effect that bears his name in 1842. An acoustic test followed in 1845 when Christoph Buys Ballot used musicians on a moving train and listeners beside the track; the approaching and receding pitch differences provided an early experimental confirmation for sound.

Technologically, Doppler shift later became fundamental to radar, sonar, medical ultrasound, astronomy and velocity measurement. In audio and composition, the same perceptual cue is useful even when no literal moving source exists: changing read rate can create a strong impression of approach, recession, fly-by or impossible motion.

This script deliberately belongs to that compositional abstraction. Its trajectory is specified directly rather than derived from meters, source velocity and speed of sound. That freedom allows motions that a physical pass-by would not produce, and the visualization makes the difference explicit instead of presenting the preset names as acoustic simulation.

Further reading