Allpass Diffuser — User Guide
Spreads transients and reshapes temporal detail with a cascade of Schroeder allpass sections while keeping the magnitude response essentially flat. The result can range from light phase dispersion to a dense cloud, a long smear, or an intentionally metallic echo pattern.
What this does
Allpass Diffuser sends the selected Sound through a cascade of delayed allpass sections. An ideal allpass filter has unit magnitude at every frequency: it does not intentionally boost or cut spectral bands. What it changes is phase. In the time domain, that phase redistribution turns an impulse or sharp transient into a pattern of echoes whose density grows as more sections are cascaded.
Key features:
- Six modes including Custom — Light dispersion, Phase halo, Dense cloud, Long smear and Metallic comb.
- Up to eight allpass sections with mutually different base delays scaled by a global Size control.
- Pure Praat implementation — no Python, subprocess, model download or temporary analysis engine.
- Composite impulse response — all section IRs are cascaded first, then the Sound is convolved once.
- Multichannel-safe processing — the mono allpass IR is applied across the selected Sound's channels.
- Equal-power dry/wet law — dry and wet gains follow cosine/sine panning-style curves.
- Measured flatness — the Info window reports the actual magnitude-response spread of the finite IR.
- Diagnostic visualization — shared-scale input/output waveforms, the composite IR, magnitude response and summary.
Quick start
- In Praat, select exactly one Sound.
- Run
AllpassDiffuser.praat. - Choose a preset. Custom is the form default and starts at 6 sections,
g = 0.70,Size = 1.0and fully wet output. - Leave Normalize = none for the neutral allpass result.
- Leave Draw_visualization enabled if you want to inspect the temporal spreading and measured flatness.
- Enable Play_impulse_response if you want to hear the diffuser itself as an impulse response.
- Click OK. The result appears as
originalName_apdiff.
Presets
The preset changes Sections, Diffusion_g, Size and Dry_wet. It does not override your normalization, visualization or playback choices.
| Preset | Sections | g | Size | Dry/Wet | Measured composite IR* | Character |
|---|---|---|---|---|---|---|
| Custom (default) | 6 | 0.70 | 1.0 | 1.0 | ≈2.26 s | Dense general-purpose diffuser; already highly diffuse within the first tens of milliseconds. |
| Light dispersion | 3 | 0.50 | 0.6 | 0.6 | ≈0.18 s | Short phase dispersion that preserves more of the direct attack. |
| Phase halo | 5 | 0.62 | 2.2 | 0.8 | ≈2.52 s | Sparse near the attack, then increasingly diffuse — a halo around transients rather than an immediate cloud. |
| Dense cloud | 8 | 0.75 | 1.0 | 1.0 | ≈5.74 s | Strong click-to-cloud transformation with a dense echo field. |
| Long smear | 8 | 0.85 | 1.6 | 1.0 | ≈16.25 s | Long, slower-building temporal smear with a very extended tail. |
| Metallic comb | 2 | 0.85 | 1.5 | 1.0 | ≈1.04 s | Intentionally under-diffused and periodic; demonstrates that flat magnitude can still sound coloured. |
*Values reported in the script's measured 44.1 kHz preset tests. The exact duration in a run is computed from the actual sampling rate and quantized delay lengths.
Allpass theory
One delayed Schroeder allpass section
The recursive section described by the script is:
For real |g| < 1, the numerator is the reversed/conjugate counterpart of the denominator on the unit circle, so the ideal magnitude response satisfies |H(ejω)| = 1. Frequency-dependent phase — not magnitude shaping — produces the audible transformation.
Closed-form impulse response
Rather than evaluating the recursion sample by sample in Praat script code, each section is expanded into its sparse impulse response:
The echoes occur only at integer multiples of the section delay M, while their amplitudes follow a geometric decay. Cascading several sections convolves these sparse patterns together, rapidly increasing temporal density.
What Sections, g and Size actually change
Sections
More sections combine more mutually different delay patterns. This usually raises echo density and makes individual repeats harder to hear as separate events.
Diffusion_g
g controls the geometric decay inside every section. Higher values retain significant taps for longer, lengthening the effective section IR and increasing the amount of delayed energy.
Size
Size multiplies all section delays. Larger values move echoes farther apart and lengthen the composite tail without changing the ideal allpass magnitude law.
How it is implemented
The processing is entirely inside Praat and follows this sequence:
- Validate the controls. Sections is capped at 8,
gat 0.05–0.95, Size at 0.1–8 and Dry_wet at 0–1. - Scale the section delays. The fixed base delays are 149, 211, 353, 457, 631, 823, 1123 and 1523 samples at a 44.1 kHz reference. Each is multiplied by Size and converted to the Sound's actual sampling rate, keeping the intended delay in seconds approximately sample-rate independent.
- Choose the geometric-series length. The script keeps enough taps for
g^kto fall below about 10-6, with a minimum of four taps. - Build one sparse IR per section. Only samples at 0, M, 2M, 3M… contain non-zero values.
- Cascade the IRs first. The section IRs are convolved together into one composite allpass IR.
- Convolve the Sound once. The selected Sound is convolved with that composite IR, producing the full tail.
- Apply equal-power dry/wet mixing. The dry signal stops at its original end; the remaining tail is therefore wet only.
- Apply the selected normalization.
- Measure the actual magnitude spread. Praat derives an LTAS from the composite IR and reports max-minus-min dB over 80 Hz to the smaller of 16 kHz or Nyquist minus 1 kHz.
Finite-tail safeguard
An ideal recursive allpass has an infinite impulse response. This implementation realizes it as a long but finite FIR approximation. Each section is normally limited to a maximum target of 40 seconds. If an extreme combination of high g and large Size truncates a still-significant next tap, the script reports the amplitude of that first dropped tap.
Parameters
| Parameter | Default | Effective range / options | Meaning |
|---|---|---|---|
| Preset | Custom | Custom + 5 presets | Loads a predefined combination of Sections, g, Size and Dry_wet. |
| Sections | 6 | 1–8 | Number of allpass sections in the cascade. More sections usually produce greater echo density. |
| Diffusion_g | 0.70 | 0.05–0.95 | Feedback coefficient used by every section. Higher values create longer geometric tails. |
| Size | 1.0 | 0.1–8 | Global multiplier for all delay lengths. |
| Dry_wet | 1.0 | 0–1 | Equal-power blend between the original Sound and the diffused result. |
| Normalize | none | none / peak / rms (loudness compensation) | Optional post-scaling. See the section below; none is the neutral default. |
| Draw_visualization | on | on/off | Draw diagnostic panels in the Praat Picture window. |
| Play_impulse_response | off | on/off | Audition the composite diffuser IR before it is removed. |
| Play_result | on | on/off | Play the processed Sound after completion. |
Dry/wet mixing and normalization
Equal-power dry/wet law
This gives the familiar equal-power crossfade law: Dry_wet = 0 is dry, 1 is wet, and 0.5 assigns both paths a gain of approximately 0.707. Because dry and wet signals are related rather than statistically independent, this should be understood as a mixing law, not a guarantee of constant measured loudness at every setting.
Normalize = none
No post-scaling is applied. For a non-truncated, fully wet allpass chain, this is the setting that best preserves the intended energy behavior. The output is longer because the IR tail is retained, so RMS computed across the whole output duration is naturally lower even when total energy is preserved.
Normalize = peak
The finished output is scaled so its absolute peak matches the input peak. This is useful as a level-safety or comparison option, but it changes the natural gain of the allpass result.
Normalize = rms (loudness compensation)
The finished output is scaled so its whole-file RMS matches the input RMS. Because temporal diffusion spreads energy over a longer duration, this can raise the result substantially — especially with Long smear. The script therefore labels RMS normalization explicitly as loudness compensation, not neutral normalization.
Visualization and Info report
With Draw_visualization enabled, the Picture window contains five coordinated areas:
| Panel | What it shows | How to read it |
|---|---|---|
| Input waveform | Original selected Sound. | Uses the same Y range as the output, so peak spreading is visible rather than hidden by separate auto-scaling. |
| Diffused output | Processed waveform including the convolution tail. | Compare attack concentration, peak height and temporal spread directly with the input. |
| Composite allpass IR | The actual FIR approximation used for the one final convolution. | Shows how quickly the echo pattern becomes dense and how long the tail extends. |
| Magnitude response | LTAS of the composite IR in a fixed 12 dB vertical window. | An ideal result appears essentially horizontal; the title reports the measured max-minus-min spread in dB. |
| Summary | Preset, sections, g, Size, dry/wet, normalization, IR length, magnitude spread, duration, channels, peak/RMS values and section delays. | If the finite-tail cap becomes significant, the warning is repeated here in red. |
Applications
Diffuse attacks without intentional EQ
Use Light dispersion for a modest phase blur or Dense cloud for a stronger transformation. Percussion, plucked strings and short synthetic impulses make the temporal redistribution especially clear.
Create a phase halo around a gesture
Phase halo uses fewer sections but longer delays than the default. The early response is comparatively sparse and the density builds later, allowing the original attack to remain more legible before the cloud develops.
Turn a short event into a long temporal smear
Long smear combines eight sections, high g and enlarged delays. The full convolution tail is retained, so a short source can produce an output many seconds longer than the original.
Demonstrate temporal colouration
Metallic comb intentionally uses only two high-g sections. Its sparse periodic structure can sound strongly coloured even though its magnitude response remains close to flat — useful both compositionally and pedagogically.
Use the diffuser as an impulse-response object
Enable Play_impulse_response to audition the composite allpass IR itself. The script does not leave that IR in the Object List after processing, but the visualization displays the exact IR used for the Sound convolution.
Troubleshooting
none for neutral processing or peak if you only need peak matching.