8-Channel Speed Deviations

Creates eight mono-derived copies of one source, each rendered at one constant speed factor for its complete duration using Praat's overlap-add Lengthen process. The eight versions drift apart in time because duration is inversely related to speed.

Author: Shai Cohen Affiliation: Department of Music, Bar-Ilan University, Israel Version: 0.5 (2026) Praat
Contents:

What this does

The script generates eight parallel speed variations of the selected Sound. Each channel is assigned one speed factor and keeps that factor for its entire length. The source is time-scaled by 1 / speed with Praat's Lengthen (overlap-add), so slower channels become longer and faster channels become shorter. The result can be returned as an eight-channel object, stems, or a downmix.

Constant per channel, not time-varying: there is no LFO, wow/flutter trajectory, random walk over time, imported envelope, end-locked warp, or changing playback-rate curve. Random mode means that each channel receives a randomly chosen constant speed for the whole file.

Quick start

  1. Select exactly one Sound.
  2. Run 8-channel_speed_deviations.praat.
  3. Choose a Preset. The default is Custom.
  4. For Custom, choose Automatic, Manual, or Random deviation.
  5. Set a suitable Min_pitch and Max_pitch for the material.
  6. Leave Override_sampling_frequency off to preserve the source rate, unless a specific target rate is required.
  7. Choose the required Output_format.
  8. Click OK. The Info window reports requested/achieved speed, durations, routing, and normalization.
Default Custom settings: Automatic mode, ±15% speed spread, PSOLA pitch range 75–600 Hz, source sampling rate preserved, 8-channel octophonic output, and Scale_peak = 0.95.

Speed & duration

Speed factor

A speed factor of 1.0 is unison. Values below 1 produce a longer result; values above 1 produce a shorter result.

target duration = source duration / speed factor s = 0.85 → duration = D / 0.85 = 1.1765 D s = 1.15 → duration = D / 1.15 = 0.8696 D
Speed percentage is not duration percentage. A -15% speed deviation produces approximately +17.65% duration, while +15% speed produces approximately -13.04% duration. A speed ladder symmetric around 1.0 therefore does not produce durations symmetric around the source length.

Automatic symmetric ladder

Automatic mode distributes eight speed factors evenly from 1 - d to 1 + d:

speed[i] = 1 - d + (i - 1) × (2d / 7) for i = 1 ... 8

For the default d = 0.15, channels 1 and 8 are equally far below and above unison, channels 2 and 7 form the next mirrored pair, and so on. The mean speed is exactly 1.0, but the mean duration is slightly longer than the source because 1/s is nonlinear.

Requested vs achieved speed

After each PSOLA render the script measures the actual duration and derives an achieved speed:

achieved speed = original duration / rendered duration speed error = achieved speed - requested speed

The drift visualization uses the measured durations, not only the requested factors.

Modes & presets

Custom modes

ModeHow speeds are generatedRelevant controls
AutomaticEight evenly spaced factors symmetric around 1.0.Speed_deviation_factor
ManualUses the eight entered channel speeds directly.Channel_1_speed … Channel_8_speed
Random deviationEight independent draws from a continuous uniform distribution.Random_min_speed, Random_max_speed, Random_seed

Presets

PresetMode usedSpeed set
CustomForm selectionUses the mode and values entered by the user.
SubtleAutomatic0.95 to 1.05, evenly spaced.
ModerateAutomatic0.85 to 1.15, evenly spaced.
WideAutomatic0.70 to 1.30, evenly spaced.
ExtremeAutomatic0.50 to 1.50, evenly spaced.
Ascending channel speedsManual preset0.7000, 0.7857, 0.8714, 0.9571, 1.0429, 1.1286, 1.2143, 1.3000.
Descending channel speedsManual presetThe same ladder in reverse order.

Random mode

v0.5 uses Praat's random generator directly:

speed[i] = randomUniform(Random_min_speed, Random_max_speed)

A positive seed initializes a predictable sequence; seed 0 initializes safely and unpredictably. After the eight draws, the script restores the global random generator to an unpredictable state so that a fixed seed does not leak into subsequent scripts.

Random_min_speed must be below Random_max_speed. Both form fields are positive, so Random mode cannot generate zero or negative speeds.

PSOLA processing

For each of the eight channels, the mono working source is copied and passed to Praat's overlap-add Lengthen operation:

targetDur = originalDur / speedFactor durationRatio = targetDur / originalDur = 1 / speedFactor Lengthen (overlap-add): Min_pitch Max_pitch durationRatio

The intention is to alter duration while retaining perceived pitch. This depends on the pitch analysis working adequately within the supplied range. It is not a phase-vocoder mode and there is no alternative varispeed/resampling mode in this script.

Material matters: PSOLA is most appropriate when periodic structure can be tracked. Polyphonic, noisy, strongly percussive, or poorly tracked material can produce artifacts. The script allows extreme factors but reports a warning when any speed is below 0.25× or above 4×.

Sampling frequency

The source sampling rate is preserved by default. If Override_sampling_frequency is enabled, each processed channel is resampled to Target_sampling_frequency with precision 50 after the Lengthen stage.

Parameters

ParameterDefaultActual role
PresetCustomSelects Custom or one of six fixed speed strategies.
ModeAutomaticUsed only when Preset is Custom.
Speed_deviation_factor0.15Automatic half-width around 1.0. Values are clamped to 0…0.95.
Channel_1_speed … Channel_8_speed0.85 … 1.15Eight positive constant factors used by Manual mode.
Random_min_speed0.80Lower bound for Random mode.
Random_max_speed1.20Upper bound for Random mode; must exceed the minimum.
Random_seed42Positive = reproducible eight-draw sequence; 0 = unpredictable.
Min_pitch75 HzLower PSOLA pitch-analysis limit; must be below Max_pitch.
Max_pitch600 HzUpper PSOLA pitch-analysis limit.
Override_sampling_frequencyoffWhen off, preserves the source sample rate.
Target_sampling_frequency44100 HzUsed only when sample-rate override is enabled.
Output_format8-channel octophonicSelects the returned object/stem/downmix layout.
Scale_peak0.95Shared normalization target; invalid values reset to 0.95.
Draw_visualizationonDraws the v0.5 process/outcome figure.
Play_resultonPlays the returned object, or a temporary stereo bank monitor for stem formats.

Level handling

Shared gain across all eight working channels

Each channel is measured after the PSOLA/resample stage. The largest peak across the complete eight-channel bank determines one common scale factor:

peakAll = max(peak Ch1 ... peak Ch8) sharedGain = Scale_peak / peakAll all eight channels *= sharedGain

This preserves relative levels between channels. If all eight channels are effectively silent, the shared normalization stage is skipped.

Downmix normalization

The octophonic and stem formats receive only the shared stage above. The 4-channel fold-down and Stereo mix sum channels together and therefore receive a second Scale peak operation after the sums are formed.

Output formats

The eight channels intentionally have different durations. When channels are combined, Praat pads shorter channels with silence, so each combined object runs to the longest channel contained in that object.

FormatReturned objectsRoutingSecond normalization
8 channels — octophonic1 × 8-channelout1–out8 = Ch1–Ch8No
4 symmetric speed pairs4 × stereoCh1|Ch8, Ch2|Ch7, Ch3|Ch6, Ch4|Ch5No
2 quad groups2 × 4-channelQuad 1 = Ch1–Ch4; Quad 2 = Ch5–Ch8No
4-channel fold-down1 × 4-channel1=Ch1+Ch8, 2=Ch2+Ch7, 3=Ch3+Ch6, 4=Ch4+Ch5Yes
Stereo mix1 × stereoL = Ch1+Ch2+Ch3+Ch4; R = Ch5+Ch6+Ch7+Ch8Yes

Why the pairs are mirrored

In Automatic mode the speed ladder is symmetric around unison. Pairing the outer ends of that ladder places one slower and one faster version together:

Pair 1 = Ch1 | Ch8 Pair 2 = Ch2 | Ch7 Pair 3 = Ch3 | Ch6 Pair 4 = Ch4 | Ch5

At ±15%, for example, the four pair means are exactly 1.0 even though their individual durations are asymmetric.

Playback monitor for stems

For the four-stereo-pair and two-quad-group formats, Play_result builds a temporary stereo preview with Ch1–Ch4 mixed to the left and Ch5–Ch8 mixed to the right. It peak-scales and plays that monitor, then removes it. The monitor is not one of the returned output objects.

Duration reporting caveat in v0.5: for multi-object stem formats, the Info/summary variable labelled finalDur is read from the first returned object. In Manual or Random mode another stem can contain a slower channel and therefore be longer. The audio objects themselves are correct; only that single reported/visualized duration value need not represent the longest stem. In the one-object formats, it does represent the full output duration.

Visualization

The v0.5 figure uses the eight working channels before output-format cleanup, so its channel analysis remains consistent across output layouts.

TITLE • source, preset/mode, source duration • requested speed range • selected output format PANEL A — Drift diagram • x = output time • y = source time consumed • one line per channel • endpoint uses the measured rendered duration • slope therefore represents achieved speed • grey diagonal = unison reference PANEL B — Speed deviation • horizontal bars for Ch1–Ch8 • deviation in percent around 1.0 • slower channels shown toward the negative side • faster channels shown toward the positive side PANEL C — Duration outcome • rendered duration for each channel • dotted reference = original source duration • makes the nonlinear D/s relationship visible PANEL D — Channel examples • blue = Ch1 • orange = Ch8 • shared amplitude scale • these are two individual speed variations, not an 8-channel mix PANEL E — Summary • preset/source and source/output duration • mean requested speed and mean rendered duration • all eight requested speed factors • PSOLA pitch range • output format, object count, channel count and routing
Colour meaning: blue shades indicate factors below 1.0, orange/red shades indicate factors above 1.0, and unison is neutral grey. Colour represents speed direction only.

Implementation notes & limitations