Simple Rate Panning — User Guide

Stereo auto-panning driven by sine, triangle, square, or sawtooth modulation, with controllable rate, depth, centre position, phase, and wet/dry mix.

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

Simple Rate Panning creates a stereo auto-pan from one selected Sound. The wet path is first reduced to mono when necessary, duplicated to two channels, and then multiplied by complementary left/right gains derived from a periodic pan trajectory.

The pan position is

p(t) = clamp(center + depth × modulator(t), -1, +1)

where -1 is full left, 0 is centre, and +1 is full right. The clamped position is mapped to an angle from 0 to π/2; the wet left channel uses cos(angle) and the wet right channel uses sin(angle). This is a constant-power gain law for the wet mono source: L² + R² = 1 before wet/dry mixing.

Version 0.4.2 uses the same ±1 pan clamp in the DSP and in the visualization. This prevents centre-plus-depth combinations from driving the pan law beyond the legal stereo range.

Quick start

  1. In Praat, select exactly one Sound object.
  2. Run script…Simple Rate Panning.praat.
  3. Choose a preset or select Custom and set the panning parameters.
  4. Set Mix percent, and optionally disable visualization or playback.
  5. Click OK. The script creates a stereo result and scales its peak to 0.99.

Presets

The eight named presets override rate, waveform, depth, centre, and start phase. Mix percent, Draw visualization, and Play result remain user-controlled. Choose Custom to use all panning fields exactly as entered, subject to the clamps described below.

PresetRateWaveformDepthCentrePhase
CustomUser valueUser choiceUser valueUser valueUser value
Slow Drift0.25 HzSine60%0
Classic Autopan1.0 HzSine80%0
Fast Tremolo4.0 HzSine40%0
Ping Pong2.0 HzSine100%0
Subtle Movement0.5 HzSine30%0
Extreme Chopper8.0 HzSquare100%0
Slow Triangle0.3 HzTriangle70%0
Seasick0.15 HzSine95%0

Parameters

GUI fieldDefaultMeaning and enforced behavior
PresetCustomSelects Custom or one of eight named panning configurations. Named presets overwrite the five panning fields below.
Pan rate Hz1.0Positive modulation frequency in cycles per second.
WaveformSineSine, triangle, square, or sawtooth periodic modulator.
Pan depth percent100Converted to depth = percent/100. Values below 0 are clamped to 0; values above 100 are clamped to 100.
Pan center0.0Offsets the trajectory toward left or right. The entered centre is clamped to [-1,+1]. The final centre-plus-depth trajectory is independently clamped to [-1,+1] before panning.
Start phase degrees0Phase offset for the selected waveform. The value is converted to radians; it is not otherwise wrapped or clamped.
Mix percent100Linear wet/dry mix. The entered value is clamped to 0–100%; wet = mix/100 and dry = 1-wet.
Draw visualizationOnDraws the source, result, pan trajectory, and summary.
Play resultOnPlays the final Sound after processing.

Processing

1. Input preparation

The script requires exactly one selected Sound. The wet autopan is always based on a mono source: mono input is copied; any input with more than one channel is downmixed with Praat's Convert to mono. That mono source is then converted to stereo so the two channels begin identically before the pan gains are applied.

2. Modulator

The selected waveform produces a nominal modulator in approximately the range -1 to +1:

WaveformBehavior
SineSmooth sinusoidal motion.
TrianglePiecewise-linear back-and-forth motion.
SquareHard switching between the two modulation extrema.
SawtoothLinear ramp followed by a discontinuous reset.

3. Pan law

rawPan = center + depth × modulator(t)
pan = clamp(rawPan, -1, +1)
angle = (π/2) × ((pan + 1)/2)
leftGain  = cos(angle)
rightGain = sin(angle)

Because the clamp occurs before the trigonometric law, the wet gains remain non-negative and bounded between 0 and 1. When a centred full-depth trajectory reaches the endpoints, one wet channel reaches 1 while the other reaches 0.

4. Wet/dry mix

The script uses a linear wet/dry blend, not an equal-power crossfade:

output = wet × pannedSound + dry × drySound

Dry routing depends on the input: mono is duplicated to stereo; stereo is preserved as stereo; 3+ channel input is downmixed to mono and then duplicated to stereo. Thus the output is always stereo, but only a stereo input can retain its original stereo dry image.

5. Final gain

After wet/dry mixing, the result is always processed with Scale peak: 0.99. This is peak normalization, not merely a clipping guard: it can attenuate or amplify the complete result so its absolute peak becomes 0.99.

Visualization

When enabled, the script draws:

The pan plot samples the analytical trajectory for display; it is not an audio-sample-by-audio-sample trace. The centre guide is shown when the centre is non-zero.

Outputs

PropertyBehavior
Object name[original]_pan_[preset], for example voice_pan_ClassicAutopan. Custom produces the suffix _pan_Custom.
ChannelsAlways stereo.
DurationUnchanged from the selected source.
Sampling frequencyPreserved through the copy/mono/stereo conversion path.
NormalizationFinal peak normalization to 0.99 is always applied, including at 0% wet.
PlaybackThe result is selected and played when Play result is enabled.

Notes and limitations