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.
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.
- Eight copies: all derived from one mono working source.
- Three modes: Automatic symmetric ladder, Manual eight-value entry, or Random uniform speeds.
- Seven preset choices: Custom plus Subtle, Moderate, Wide, Extreme, Ascending, and Descending.
- Pitch-aware time scaling: PSOLA aims to retain perceived pitch while duration changes.
- Measured outcome: requested and achieved speed are both reported, because PSOLA duration can differ slightly from the theoretical target.
- Five output layouts: octophonic, symmetric speed pairs, two quad groups, four-channel fold-down, or stereo bank mix.
Quick start
- Select exactly one Sound.
- Run
8-channel_speed_deviations.praat. - Choose a Preset. The default is Custom.
- For Custom, choose Automatic, Manual, or Random deviation.
- Set a suitable Min_pitch and Max_pitch for the material.
- Leave Override_sampling_frequency off to preserve the source rate, unless a specific target rate is required.
- Choose the required Output_format.
- Click OK. The Info window reports requested/achieved speed, durations, routing, and normalization.
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.
Automatic symmetric ladder
Automatic mode distributes eight speed factors evenly from 1 - d to 1 + d:
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:
The drift visualization uses the measured durations, not only the requested factors.
Modes & presets
Custom modes
| Mode | How speeds are generated | Relevant controls |
|---|---|---|
| Automatic | Eight evenly spaced factors symmetric around 1.0. | Speed_deviation_factor |
| Manual | Uses the eight entered channel speeds directly. | Channel_1_speed … Channel_8_speed |
| Random deviation | Eight independent draws from a continuous uniform distribution. | Random_min_speed, Random_max_speed, Random_seed |
Presets
| Preset | Mode used | Speed set |
|---|---|---|
| Custom | Form selection | Uses the mode and values entered by the user. |
| Subtle | Automatic | 0.95 to 1.05, evenly spaced. |
| Moderate | Automatic | 0.85 to 1.15, evenly spaced. |
| Wide | Automatic | 0.70 to 1.30, evenly spaced. |
| Extreme | Automatic | 0.50 to 1.50, evenly spaced. |
| Ascending channel speeds | Manual preset | 0.7000, 0.7857, 0.8714, 0.9571, 1.0429, 1.1286, 1.2143, 1.3000. |
| Descending channel speeds | Manual preset | The same ladder in reverse order. |
Random mode
v0.5 uses Praat's random generator directly:
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.
PSOLA processing
For each of the eight channels, the mono working source is copied and passed to Praat's overlap-add Lengthen operation:
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.
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
| Parameter | Default | Actual role |
|---|---|---|
| Preset | Custom | Selects Custom or one of six fixed speed strategies. |
| Mode | Automatic | Used only when Preset is Custom. |
| Speed_deviation_factor | 0.15 | Automatic half-width around 1.0. Values are clamped to 0…0.95. |
| Channel_1_speed … Channel_8_speed | 0.85 … 1.15 | Eight positive constant factors used by Manual mode. |
| Random_min_speed | 0.80 | Lower bound for Random mode. |
| Random_max_speed | 1.20 | Upper bound for Random mode; must exceed the minimum. |
| Random_seed | 42 | Positive = reproducible eight-draw sequence; 0 = unpredictable. |
| Min_pitch | 75 Hz | Lower PSOLA pitch-analysis limit; must be below Max_pitch. |
| Max_pitch | 600 Hz | Upper PSOLA pitch-analysis limit. |
| Override_sampling_frequency | off | When off, preserves the source sample rate. |
| Target_sampling_frequency | 44100 Hz | Used only when sample-rate override is enabled. |
| Output_format | 8-channel octophonic | Selects the returned object/stem/downmix layout. |
| Scale_peak | 0.95 | Shared normalization target; invalid values reset to 0.95. |
| Draw_visualization | on | Draws the v0.5 process/outcome figure. |
| Play_result | on | Plays 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:
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.
| Format | Returned objects | Routing | Second normalization |
|---|---|---|---|
| 8 channels — octophonic | 1 × 8-channel | out1–out8 = Ch1–Ch8 | No |
| 4 symmetric speed pairs | 4 × stereo | Ch1|Ch8, Ch2|Ch7, Ch3|Ch6, Ch4|Ch5 | No |
| 2 quad groups | 2 × 4-channel | Quad 1 = Ch1–Ch4; Quad 2 = Ch5–Ch8 | No |
| 4-channel fold-down | 1 × 4-channel | 1=Ch1+Ch8, 2=Ch2+Ch7, 3=Ch3+Ch6, 4=Ch4+Ch5 | Yes |
| Stereo mix | 1 × stereo | L = Ch1+Ch2+Ch3+Ch4; R = Ch5+Ch6+Ch7+Ch8 | Yes |
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:
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.
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.
Implementation notes & limitations
- Exactly one Sound: selection is validated before the form is shown.
- Mono-derived processing: multichannel input is converted to mono using Praat's ordinary channel averaging. The original spatial image is not preserved, and there is no cancellation-safe strongest-channel fallback.
- Zero-based working copy: a source whose time domain does not begin at 0 is re-extracted so duration arithmetic and visualization start at 0.
- Deviation guard: Automatic
Speed_deviation_factoris clamped to 0…0.95. Zero is explicitly legal and produces eight unison channels. - Manual extremes: Manual speed fields are positive but otherwise not tightly bounded. Values below 0.25× or above 4× are allowed with a warning.
- Random generator hygiene: after Random mode, Praat's generator is reset to an unpredictable state.
- PSOLA is not guaranteed pitch invariance: the algorithm aims to preserve perceived pitch, but success depends on pitch tracking and source type.
- Different channel lengths are intentional: no end-locking is applied; temporal drift is the central process.
- No continuous speed modulation: terms such as wow, flutter, LFO, random walk, and envelope do not describe this implementation.