Universal Convolution Generator — User Guide
Nine algorithmic impulse-response generators in one convolution processor, with shared energy normalization, wet/dry mixing and optional reproducible randomness.
What this does
Universal Convolution Generator separates two tasks that are often combined in a single effect. First, it generates an impulse response (IR) from one of nine timing algorithms. Second, it renders that timing pattern as a band-limited pulse-train Sound and convolves the selected source with it.
The nine algorithms therefore differ mainly in where the IR impulses occur: accelerating gaps, bouncing-ball intervals, stochastic burst clouds, Euclidean spacing, Fibonacci sequences, golden-ratio distribution, random-walk spacing, independent stereo Fibonacci patterns, or a swung tempo grid. After generation, all modes use the same normalization, convolution, wet/dry and output-safety stages.
What is convolution?
Convolution applies an impulse response to an input sound. Each impulse in the IR creates a delayed, scaled contribution of the source; the complete output is the sum of all of those contributions. A sparse IR therefore behaves like a patterned multi-tap echo, while a dense IR can create a more continuous resonant or reverberant texture.
In this tool the IR is not recorded from a physical space. It is generated algorithmically from timing rules, then rendered at the source sampling rate and passed to Praat's convolution operation.
Quick start
- Select exactly one mono or stereo Sound.
- Run
Universal_Convolution_Generator.praat. - Choose one of the nine algorithms.
- Set Duration, Wet_dry_percent and, when useful, Random_seed.
- Click Next, set the algorithm-specific parameters, and run.
- Optionally keep Draw_visualization and Play_after_processing enabled.
Nine IR algorithms
| Algorithm | Timing rule | Random? | Key controls |
|---|---|---|---|
| Accelerando | Requested pulses span almost the complete IR. Successive gaps form a geometric sequence whose ratio is Gap_shrink_ratio, so intervals become progressively shorter. | No | First hit, pulse count, gap ratio |
| Bouncing Ball | Begins at the specified first bounce. Flight interval is 2v/g; rebound velocity is multiplied by the restitution coefficient after each bounce. Stops at the IR boundary, at intervals below 1 ms, or after the safety limit. | No | First bounce, gravity, initial velocity, bounce coefficient |
| Bursts and Taps | Two fixed taps are combined with randomly placed burst centres. Each burst contributes Gaussian-distributed impulse times around its centre. | Yes | Two tap times, burst count, points per burst, burst σ |
| Euclidean Rhythm | Divides the IR into N equal steps and uses the modular test ((i×K) mod N) < K to distribute K active pulses. The pattern includes a pulse at time 0. | No | Total steps, active pulses |
| Fibonacci (Mono) | Uses the sequence 1, 1, 2, 3, 5… to generate positions proportional to IR duration, then adds Gaussian timing jitter. Terms or jittered taps outside the IR are discarded. | Yes | Term count, scale divisor, jitter σ |
| Golden Angle Drift | Uses fractional parts of successive multiples of (√5−1)/2 to create a deterministic low-discrepancy distribution between the two margins. | No | Impulse count, margin |
| Random Walk | Starts near 100 ms (or 10% of very short IRs). Each new gap equals the previous gap plus Gaussian variation, then is clamped to 10…650 ms. | Yes | Initial gap, gap-variation σ |
| Stereo Fibonacci | Generates independent Fibonacci tap sequences for left and right IR channels. The left channel uses scale 100 with 10 ms jitter; the right uses scale 120 with 20 ms jitter. | Yes | Terms per channel, two Fibonacci seeds per channel |
| Swing | Builds a tempo grid with one pulse per beat, starting after the first beat interval. Every even-numbered pulse is delayed by Swing_delay_s. | No | Tempo, swing delay |
General controls
| Control | Default | Meaning |
|---|---|---|
| Algorithm | Accelerando | Selects one of the nine IR-generation rules. |
| Duration | 2.0 s | Duration of the generated impulse response. It is independent of source duration. |
| Wet_dry_percent | 70 | Linear wet/dry mix. Values are clamped to 0…100%. |
| Random_seed | 0 | 0 creates a new stochastic pattern each run. A positive integer makes the stochastic tap pattern reproducible. |
| Draw_visualization | On | Draws dry/output waveforms, the generated tap pattern and a summary. |
| Play_after_processing | On | Plays the resulting Sound. |
The script also validates algorithm-specific limits, including pulse-count ceilings, legal bounce/swing ratios, Euclidean K ≤ N, margins inside the IR, and Fibonacci-count limits.
Randomness and reproducibility
Only four algorithms use the random-number generator:
- Bursts and Taps
- Fibonacci (Mono)
- Random Walk
- Stereo Fibonacci
With Random_seed = 0, Praat is initialized unpredictably and a new pattern is expected on each run. With a positive seed, the same parameter set generates the same stochastic tap plan. After a seeded pattern is created, the script restores Praat's random generator to an unpredictable state so the predictable seed does not leak into later unrelated operations.
The remaining five algorithms are deterministic and ignore the seed.
Shared DSP pipeline
- Generate tap times. The selected algorithm creates the actual PointProcess used for rendering. Invalid or out-of-range candidate taps are not included.
- Render a band-limited pulse train. The PointProcess is converted to Sound at the source sampling rate with adaptation factor 1, adaptation time 0.05 s and sinc depth 2000.
- Normalize IR energy. The mono IR is scaled so its discrete energy is 1. For Stereo Fibonacci, both channels receive one common gain derived from the larger channel energy; this preserves their relative L/R relationship.
- Convolve. Praat performs sum convolution with zero outside the signal domain.
- Wet/dry mix. The convolved Sound is multiplied by the wet level and the original Sound is read directly by time and channel for the dry contribution. Outside the original Sound's time domain, the dry contribution is zero.
- Protect peaks once. If the final peak exceeds 0.98, it is scaled down to 0.98. Quiet results are never amplified.
Channels, duration and level
- The current script accepts mono or stereo input only.
- All algorithms except Stereo Fibonacci create a mono IR. That IR is applied across the source channels, so stereo input remains stereo.
- Stereo Fibonacci creates a true two-channel IR. With stereo input, the output remains stereo. With mono input, the wet field becomes stereo and the mono dry contribution is added equally to left and right, placing it in the centre.
- The IR is rendered at the source sampling rate; there is no separate user sampling-rate control.
- For nonzero wet, convolution extends the result beyond the dry source according to the IR. The script queries and reports the actual Praat output duration rather than forcing a separate tail length.
- At 100% Wet, no dry signal is added.
- At 0% Wet, the result is a direct copy of the source with the same duration, channels and sample data; convolution and peak protection are skipped.
- The final 0.98 peak stage is down-only safety attenuation, not target loudness normalization.
Visualization
The visualization follows the Praat AudioTools house style and contains:
- Dry waveform on the complete result timeline.
- Output waveform on the same overall timeline.
- Actual impulse pattern. For mono-IR modes, every realized tap is drawn as a vertical stem. For Stereo Fibonacci, left and right realized taps are shown separately above and below the centre line.
- Summary with algorithm parameters, actual tap count, seed status, IR energy-normalization status, output duration and output channel count.
The dry and output waveform panels use Praat's waveform drawing with automatic amplitude bounds; they should therefore be read as waveform-shape views rather than as a shared absolute-amplitude comparison.
Output
The result is named:
The Info window reports the source, selected algorithm, requested IR duration, wet percentage, deterministic/random seed status, actual tap count, final output duration, channel count and peak.