Spectral Drift — User Guide

Stacked recursive comb-like stages with randomized harmonic-delay drift, cosine modulation and wet/dry mixing.

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

What this does

Spectral Drift applies a stack of recursive comb-like stages. Each cycle is associated with a harmonic design frequency, but its actual delay is randomly stretched or compressed before rendering. A cosine coefficient at the cycle frequency makes the feedback contribution change sign and strength over time, producing moving metallic coloration and sidebands.

The random delay offsets are calculated once per run and then reused by both the DSP and visualization. There is no fixed seed, so a new run can produce a different drift pattern.

Quick start

  1. Select one mono or stereo Sound.
  2. Run Spectral_Drift.praat.
  3. Choose a preset or Custom.
  4. Set Wet/Dry and run.
The output includes an appended tail. 0% wet yields the dry source plus that silent tail.

Presets

PresetTailCyclesBase frequencyStrengthFade*
Subtle0.3 s2150 Hz0.200.8 s
Medium0.5 s4100 Hz0.401.2 s
Heavy0.8 s675 Hz0.601.5 s
Extreme1.2 s1050 Hz0.802.0 s

*Effective fade is capped to the tail duration.

Wet/Dry, visualization and playback remain user-controlled.

Parameters

ParameterDefaultMeaning
Tail_duration_s0.5Silent extension in which the recursive effect can decay.
Number_of_cycles4Number of stacked recursive stages.
Base_frequency_Hz100Cycle k uses design frequency k × base_frequency. Stereo right uses 1.05× this value.
Effect_strength0.4Recursive contribution coefficient. Must remain below 1. Stereo right uses 95% of the entered value.
Wet_dry_percent60Linear processed/dry mix, clamped to 0…100%.
Fadeout_duration_s1.2Fade applied only in the appended tail.

Drift calculation and recursive stage

For each left/mono cycle:

f[k] = base_frequency × k ideal_delay_samples[k] = sample_rate / f[k] drift[k] ~ Uniform(0.5, 2.0) actual_delay[k] = round(ideal_delay × drift)

Stereo right uses 1.05 × base_frequency × k and drift drawn from 0.6…1.9.

Each cycle then applies:

if col > delay: y = self + strength × (self[col-delay] - self) × cos(2π col f / sample_rate)

Because the formula is evaluated left-to-right and reads earlier samples of the already modified Sound, each cycle is recursive rather than a feed-forward tap.

The script rejects Effect_strength ≥ 1. It also checks that the highest design frequency (including the 1.05 stereo factor) stays below Nyquist.

Channels, tail and level

Visualization

The display includes dry and processed waveform panels, a frequency-versus-delay map, and a summary. The map plots the ideal harmonic delay curve and the actual realized left/mono random delay points; arrows show the displacement from ideal to realized delay.

Orange points represent drift factors above 1 (longer delay); blue points represent factors below 1 (shorter delay).

The processed waveform panel displays the source-duration portion of the result. The Sound object itself still contains the complete appended tail.

Output

Object name: <source>_drift_<Custom|Subtle|Medium|Heavy|Extreme>.