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.
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
- In Praat, select exactly one Sound object.
- Run script… →
Simple Rate Panning.praat. - Choose a preset or select Custom and set the panning parameters.
- Set Mix percent, and optionally disable visualization or playback.
- 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.
| Preset | Rate | Waveform | Depth | Centre | Phase |
|---|---|---|---|---|---|
| Custom | User value | User choice | User value | User value | User value |
| Slow Drift | 0.25 Hz | Sine | 60% | 0 | 0° |
| Classic Autopan | 1.0 Hz | Sine | 80% | 0 | 0° |
| Fast Tremolo | 4.0 Hz | Sine | 40% | 0 | 0° |
| Ping Pong | 2.0 Hz | Sine | 100% | 0 | 0° |
| Subtle Movement | 0.5 Hz | Sine | 30% | 0 | 0° |
| Extreme Chopper | 8.0 Hz | Square | 100% | 0 | 0° |
| Slow Triangle | 0.3 Hz | Triangle | 70% | 0 | 0° |
| Seasick | 0.15 Hz | Sine | 95% | 0 | 0° |
Parameters
| GUI field | Default | Meaning and enforced behavior |
|---|---|---|
| Preset | Custom | Selects Custom or one of eight named panning configurations. Named presets overwrite the five panning fields below. |
| Pan rate Hz | 1.0 | Positive modulation frequency in cycles per second. |
| Waveform | Sine | Sine, triangle, square, or sawtooth periodic modulator. |
| Pan depth percent | 100 | Converted to depth = percent/100. Values below 0 are clamped to 0; values above 100 are clamped to 100. |
| Pan center | 0.0 | Offsets 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 degrees | 0 | Phase offset for the selected waveform. The value is converted to radians; it is not otherwise wrapped or clamped. |
| Mix percent | 100 | Linear wet/dry mix. The entered value is clamped to 0–100%; wet = mix/100 and dry = 1-wet. |
| Draw visualization | On | Draws the source, result, pan trajectory, and summary. |
| Play result | On | Plays 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:
| Waveform | Behavior |
|---|---|
| Sine | Smooth sinusoidal motion. |
| Triangle | Piecewise-linear back-and-forth motion. |
| Square | Hard switching between the two modulation extrema. |
| Sawtooth | Linear 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:
- Original — the selected input waveform.
- Panned — the final stereo result waveform.
- Pan Position — the time-varying pan trajectory with L=-1 and R=+1. The plotted trajectory uses the same ±1 clamp as the DSP.
- Summary — preset, waveform, rate, depth, centre, phase, mix, and duration.
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
| Property | Behavior |
|---|---|
| Object name | [original]_pan_[preset], for example voice_pan_ClassicAutopan. Custom produces the suffix _pan_Custom. |
| Channels | Always stereo. |
| Duration | Unchanged from the selected source. |
| Sampling frequency | Preserved through the copy/mono/stereo conversion path. |
| Normalization | Final peak normalization to 0.99 is always applied, including at 0% wet. |
| Playback | The result is selected and played when Play result is enabled. |
Notes and limitations
- The wet signal is intentionally mono before panning. Stereo or multichannel spatial relationships are therefore not preserved in the wet branch.
- The effect is amplitude-based stereo panning only. It does not model HRTFs, interaural time differences, distance, Doppler shift, room acoustics, or loudspeaker geometry.
- Constant-power behavior describes the mathematical wet gain pair. Perceived loudness can still vary with source material, listening setup, room, and the wet/dry combination.
- At non-zero centre with large depth, part of the raw trajectory may exceed ±1; v0.4.2 deliberately saturates that portion at the corresponding speaker endpoint.
- The square and sawtooth modes contain abrupt control discontinuities by design.