Resonant Effect — Delay Feedback Processor

Iterative delay feedback effect — creates echoes, reverb-like textures, comb filtering, and metallic resonances through repeated delayed feedback of a single random delay value.

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

What this does

This script implements a resonant delay feedback effect — a simple but powerful audio processor that creates echoes, reverb-like textures, comb filters, and metallic resonances through iterative delayed feedback. Unlike standard delay lines with tap outputs, this algorithm applies feedback repeatedly in a loop, building up a complex resonance pattern.

How it works: A single random delay value (between 1 and max_delay_samples) is generated. The script then applies an iterative formula: signal = signal + feedback × delayed_signal, repeated for a specified number of iterations. This builds a decaying echo train where each echo is summed rather than pipelined, creating a unique resonant character. The effect ranges from subtle thickening (few iterations, low feedback) to extreme metallic chaos (many iterations, high feedback, short delay).

Key Features:

What makes this different from standard delay? Standard delay lines feed the output back into the input (pipeline). This algorithm sums multiple delayed copies directly into the original signal using a loop. The effect is more like a "resonant comb" where the sound builds up in a cumulative rather than recursive manner. Short delays + high feedback = metallic ringing. Long delays + moderate feedback = spacious echoes.

Quick start

  1. In Praat, select exactly one Sound object.
  2. Run script…Resonant.praat.
  3. Choose a preset from the dropdown (12 options).
  4. Or select "Custom" and adjust Iterations (3–30), Feedback_amount (0–0.9), Max_delay_samples (delay range).
  5. Set Dry_wet_mix (0 = dry only, 1 = wet only).
  6. Click OK — script processes and creates output originalname_presetname.
Quick tip: Start with Light Echo (5 repeats) for gentle echoes. Comb Filter (Metallic) uses very short delay (50 samples) for resonator effects. Small Room (500 samples) creates subtle ambience. Cathedral (3000 samples, 25 repeats) produces long, spacious decays. Enable Draw_visualization to see the feedback decay curve and spectrum.
Important: Feedback_amount should stay below 0.9 to prevent runaway amplification. The script clamps values >0.9 to 0.9. Each iteration adds a delayed copy multiplied by feedback. After N iterations, the contribution from the earliest echo is feedback^N, which decays exponentially. Short delays produce dense, comb-like textures; long delays produce discrete echoes. The algorithm uses a single random delay per run — run multiple times for variation.

12 Presets

PresetIterationsFeedbackMax Delay (samples/ms at 44.1k)Dry/WetCharacter
Light Echo50.51000 (=22.7 ms)0.7Gentle, distinct echoes
Medium Reverb100.51500 (=34 ms)0.7Denser echoes, smooth decay
Dense Space200.52000 (=45.4 ms)0.7Very dense, reverb-like
Extreme Chaos300.62500 (=56.7 ms)0.7High density, metallic ringing
Subtle Texture30.4800 (=18.1 ms)0.7Very subtle thickening
Comb Filter (Metallic)200.650 (=1.1 ms)0.6Short delay = metallic resonator
Flanger-like100.530 (=0.68 ms)0.5Very short delay, phase combing
Slapback30.42000 (=45.4 ms)0.5Classic slapback echo
Cathedral250.553000 (=68 ms)0.7Long, spacious decay
Small Room80.45500 (=11.3 ms)0.5Subtle room ambience
Tape Echo50.53000 (=68 ms)0.5Warm, distinct repeats
CustomuseruseruseruserFull manual control
Sample rate note: Delay in milliseconds = (delay_samples / sample_rate) × 1000. For 44.1 kHz, 1000 samples ≈ 22.7 ms. At 48 kHz, the same delay samples represent a shorter time. The script reports both sample count and milliseconds in the Info window.

Theory of Operation

Algorithm

For an input signal x[n] and a single delay value D (randomly chosen): y₀[n] = x[n] (copy sound as starting point) For iteration i = 1 to N: yᵢ[n] = yᵢ₋₁[n] + g × yᵢ₋₁[n - D] Where: N = number of iterations g = feedback amount (0 ≤ g ≤ 0.9) D = delay in samples (1 to max_delay_samples) Final output: mix = (1 - mix_wet) × x[n] + mix_wet × y_N[n]

Expansion (what the loop builds)

After N iterations, the wet signal contains: y_N = x[n] + g·x[n-D] + g²·x[n-2D] + g³·x[n-3D] + ... + g^N·x[n - N·D] Each iteration adds a new delayed copy of the current cumulative signal, not just the original. This creates a cascade where later echoes also contain earlier echoes — a recursive structure similar to a feedback comb filter but implemented as a sum of weighted, progressively delayed copies.

Impulse response

If the input is a single impulse at time 0, the output after N iterations is:

h[n] = 1 at n = 0

h[n] = g at n = D

h[n] = g + g² at n = 2D

h[n] = g + g² + g³ at n = 3D

... (each echo is the sum of all previous feedback coefficients)

This produces a cumulative build-up rather than simple exponential decay, giving the effect a unique "swelling" character.

Frequency domain: Comb filtering

For a fixed delay D, the frequency response has peaks at f = k/D (k integer) and nulls at f = (k+0.5)/D. Short delays (D < 100 samples) produce widely spaced comb notches in the audible range — resulting in metallic, resonant, or "telephone" timbres. Long delays produce dense frequency-domain ripples, perceived as discrete echoes.

Parameters

Core parameters

ParameterRangeDefaultDescription
Iterations1–30+20Number of feedback loops. Higher = denser texture, longer decay.
Feedback_amount0–0.90.5Gain per iteration. Higher = slower decay, more resonance. Clamped to 0.9.
Max_delay_samples1–5000+1000Upper bound for random delay. Actual delay chosen randomly within 1 to this value each run.
Scale_peak0–10.99Final peak normalization (prevents clipping).
Dry_wet_mix0–10.70 = dry only (original), 1 = wet only (effect only), 0.7 = 30% dry, 70% wet.
Random delay behaviour: The script picks one random delay value at the start of processing (between 1 and max_delay_samples). Each iteration uses the same delay. Run the script multiple times with the same settings to hear different delay lengths — this is a feature, not a bug! To make the delay deterministic, edit the script and replace randomInteger(1, max_delay_samples) with a fixed number.

Applications

Echo / Slapback (Light Echo, Slapback, Tape Echo)

Use case: Add distinct, warm echoes to vocals, guitar, or percussion.

Settings: 3–5 iterations, feedback 0.4–0.5, delay 2000–3000 samples. Dry/wet ~0.5.

Reverb-like Ambience (Small Room, Cathedral)

Use case: Create dense, smooth decay that emulates room or hall acoustics.

Settings: 8–25 iterations, feedback 0.45–0.55, delay 500–3000 samples. Dry/wet ~0.5–0.7.

Comb Filter / Metallic Resonance (Comb Filter, Flanger-like)

Use case: Create robotic, metallic, or "telephone" timbres from any input.

Settings: Very short delay (30–200 samples), moderate to high feedback (0.5–0.7), iterations 10–20. The short delay creates comb notches spaced far apart in frequency.

Extreme / Chaotic Textures (Extreme Chaos)

Use case: Experimental sound design — clangorous, dissonant resonance.

Settings: 30 iterations, feedback 0.6, delay 2000–2500 samples. The cumulative build-up creates a dense, ringing texture that can overwhelm the original sound.

Workflow: Voice → Metallic Resonator

Target: Spoken word or sung phrase.
Settings: Comb Filter preset (delay ~50 samples, 20 iterations, feedback 0.6). Dry/wet = 0.6.
Result: Voice takes on a metallic, robotic character — like speaking through a metal pipe or telephone.

Workflow: Guitar → Ambient Wash

Target: Clean guitar arpeggio.
Settings: Cathedral preset (delay ~3000 samples, 25 iterations, feedback 0.55). Dry/wet = 0.7.
Result: Each note triggers a long, swelling decay that fills the space — like a hall reverb with character.

Workflow: Percussion → Sparse Echoes

Target: Drum loop or single drum hit.
Settings: Light Echo preset (5 iterations, delay ~1000 samples, feedback 0.5). Dry/wet = 0.6.
Result: Clear, spaced echoes that decay smoothly.

Troubleshooting:
Output is silent or very quiet: Check that wet signal wasn't silent — the script shows a warning. Reduce iterations or increase feedback.
Clipping / distortion: The script automatically scales the mix to 0.99 peak. If still clipping, reduce feedback or dry/wet mix.
Effect not noticeable: Increase dry/wet mix toward 1.0, or increase iterations and feedback.
Too much ringing / metallic sound: Short delays cause comb filtering. For smoother reverb-like textures, use longer delays (2000–4000 samples).
Different delay each run: This is intentional. To fix a delay, edit the script line: delay = randomInteger(1, max_delay_samples)delay = 1000.

Visualization details

When Draw_visualization is enabled, the script generates a Praat picture with: • Original waveform (gray) • Processed waveform (blue) • Spectrum of original vs. processed (gray vs. blue overlay) • Feedback decay curve — bar chart showing amplitude per iteration (g^i) • Info panel with iterations, feedback, delay, and mix percentages

Mathematical note: Stability

The algorithm is unconditionally stable for |g| < 1 because the sum of a geometric series converges. However, the cumulative nature means the total gain can exceed 1 even for moderate g when N is large. The script normalises the wet signal to 0.99 peak before mixing to prevent clipping, and also scales the final mix.