Fast Waveset Distortion — v1.6 User Guide

Stereo‑aware, chunk‑based audio distortion inspired by waveset processing. Ten operation modes: Stutter, Gaps, Reverse, Shuffle, Stretch, Compress, Pumping, Ring modulator, Bitcrush, Tremolo. Processes left and right channels with independent parameters for a wide stereo image. Hann window fades eliminate clicks between chunks.

Author: Shai Cohen Affiliation: Department of Music, Bar‑Ilan University, Israel Version: 1.6 (2025) License: MIT License Repo: GitHub
Contents:

What this does

Fast Waveset Distortion applies chunk‑based audio effects inspired by waveset processing, but uses fixed‑length chunks rather than zero‑crossing segmentation for speed. The audio is divided into overlapping chunks (with Hann window fades), each chunk is processed independently, and the results are concatenated. Left and right channels are processed with slightly different parameters to create a wide stereo image.

Key features v1.6:
  • 10 operation modes covering classic waveset effects (stutter, gaps, reverse, shuffle, stretch/compress, pumping, ring mod, bitcrush, tremolo).
  • 10 named presets (Glitch Stutter, Rhythmic Gaps, Backwards Chunks, Random Shuffle, Slow Motion, Fast Forward, Sidechain Pump, Robot Voice, Lo‑Fi Crush, Wobble Tremolo).
  • Stereo processing: left and right channels processed separately with Stereo_spread offset for width.
  • Hann window fades (attack and release) eliminate clicks at chunk boundaries.
  • Wet/dry mix control to blend with original.
  • Normalisation and visualisation matching other AudioTools scripts.

Quick start

  1. In Praat, select exactly one Sound object (mono or stereo).
  2. Run script…Fast_Waveset_Distortion.praat.
  3. Choose a Preset:
    • Glitch Stutter, Rhythmic Gaps, Backwards Chunks, Random Shuffle, Slow Motion, Fast Forward, Sidechain Pump, Robot Voice, Lo‑Fi Crush, Wobble Tremolo
  4. For custom mode (preset = Custom), select a Mode (1–10) and adjust parameters:
    • Amount – strength of the effect (mode‑dependent).
    • Chunk_ms – chunk duration in milliseconds.
    • Fade_ms – Hann fade duration (must be ≤ chunk/2).
    • Stereo_spread – difference in parameters between L/R (0 = identical).
    • Mix – blend between processed and original (0–1).
  5. Click OK. The script processes left and right channels independently, combines them, and creates a new Sound object named originalname_WSD_preset.
Tip: Start with Glitch Stutter (Stutter mode, amount 4, chunk 30 ms) for a classic glitch effect. For rhythmic processing, try Rhythmic Gaps. For a wide stereo image, increase Stereo_spread to 0.3–0.5.
Important: This effect is implemented entirely in Praat – no Python required. Processing time depends on the number of chunks; for a 10‑second file with 40 ms chunks (250 chunks), processing takes 1–2 seconds.

The 10 presets (+ Custom)

PresetModeAmountChunk (ms)Fade (ms)SpreadDescription Glitch StutterStutter4.03030.3Fast repeating chunks – classic glitch. Rhythmic GapsGaps3.05050.1Regularly spaced silences – rhythmic pattern. Backwards ChunksReverse1.08080.15Each chunk played backward – speech‑like effects. Random ShuffleShuffle1.06060.25Random chunk order – chaotic texture. Slow MotionStretch4.0100100.1Time‑stretched chunks – ethereal, lower pitch. Fast ForwardCompress3.05050.1Time‑compressed chunks – higher pitch, faster. Sidechain PumpPumping4.0125100.05Alternating gain – sidechain‑like pumping. Robot VoiceRing modulator2.52020.4Ring modulation – metallic, robotic. Lo‑Fi CrushBitcrush4.03030.2Aggressive quantisation – crunchy, low‑fi. Wobble TremoloTremolo5.04050.3Amplitude modulation – wobbling texture.

Operation modes (10)

Amountth chunk is silenced. Creates rhythmic gaps. Amount (SR override + resample). Lowers pitch. Amount. Raises pitch. self × sin(2π × (50 + Amount×80) × t). Metallic, robotic. round(self × levels) / levels, where levels = max(2, round(16 / Amount)). Aggressive quantisation. self × (1 – depth × (0.5+0.5×sin(2π×freq×t))), depth = min(0.9, Amount×0.15).
ModeAmount meaningEffect description
1. StutterNumber of repeats (rounded, 2–8)Each chunk is repeated Amount times, with exponential decay (×0.85 per repeat). Produces classic glitch stutters.
2. GapsSkip denominator
3. ReverseIgnored
4. ShuffleIgnored
5. StretchTime factor (1.1–∞)
6. CompressTime factor (1.1–∞)
7. Pumping
8. Ring modulator
9. Bitcrush
10. Tremolo

All modes apply Hann window fades to each chunk (attack and release) to eliminate clicks at boundaries. The fade duration is clamped to ≤ chunk_ms/2.

Parameters & defaults

Preset & Mode

Select a preset to load pre‑configured settings, or choose “Custom” to set manually.

Amount

Interpretation depends on mode (see table above). Typical range 1–10.

Chunk_ms

Duration of each processing chunk in milliseconds. Smaller chunks = more detailed, more CPU.

Fade_ms

Hann fade duration at start and end of each chunk. Must be ≤ chunk_ms/2. Larger fades = smoother crossfades, but may alter transient clarity.

Stereo_spread

Controls the difference between left and right channel processing:

Spread = 0 → identical channels (mono). Spread = 0.3 → noticeable stereo width.

Mix

Wet/dry blend: 0 = original only, 1 = fully processed. Allows parallel processing and subtle effects.

Output

Stereo processing

🎧 Wide stereo image

Fast Waveset Distortion processes left and right channels independently. The right channel uses modified parameters:

  • amount_R = amount × (1 + stereo_spread × 0.5)
  • chunk_ms_R = chunk_ms × (1 + stereo_spread)

This creates a natural, decorrelated stereo image. For a mono output (identical channels), set Stereo_spread = 0. For extreme width, try spread = 0.5–1.0.

The processing pipeline:

  1. Convert stereo source to mono (downmix).
  2. Process two copies of the mono signal with different parameters → left and right processed channels.
  3. Trim both to the same duration (shorter of the two).
  4. Combine to stereo.
  5. Optionally blend with original stereo source (if Mix < 1).

Visualization (Praat picture)

When Show_visualization = 1, the script draws a 4‑panel figure:

Tip: Compare the left and right waveforms to see the effect of stereo spread. The right channel’s chunk boundaries will be shifted, creating a wide, diffuse stereo image.

FAQ / troubleshooting

Clicks / pops at chunk boundaries

The script applies Hann window fades to each chunk by default. If you still hear clicks, increase Fade_ms. The fade is applied as a formula part (C‑level), so it’s fast and click‑free when long enough. Ensure fade_ms ≤ chunk_ms/2.

Stretch / Compress mode fails or sounds wrong

The script uses SR override + resample to time‑stretch. If the new sample rate exceeds 96 kHz (for compress) or falls below 100 Hz (for stretch), the operation is skipped for that chunk. Reduce Amount to keep within safe bounds.

Processing is slow for very small chunks

Chunk_ms = 10 ms gives 1000 chunks per 10 seconds. Each chunk involves multiple Praat operations (extract, formula, concatenate). For real‑time preview, use larger chunks (50–100 ms). For offline processing, smaller chunks are fine but slower.

Why “fast” waveset distortion?

Traditional waveset distortion uses zero‑crossing boundaries, which requires per‑wave processing and can be slow for sounds with many zero crossings. This script uses fixed‑length chunks, which are faster to extract and process, and the result is similar in character for many applications. The name distinguishes it from the “true” waveset distortion script in the collection.

Bitcrush mode levels

The formula levels = max(2, round(16 / amount)) means:

  • Amount = 1 → levels = 16 (4‑bit)
  • Amount = 2 → levels = 8 (3‑bit)
  • Amount = 4 → levels = 4 (2‑bit)
  • Amount = 8 → levels = 2 (1‑bit)

Higher amount = more aggressive quantisation.