Fractal Convolution Swarm — User Guide

Deterministic multi-scale delay processing built from self-similar delay groups. Swarm mode renders the structure as a parallel sparse delay field; Cascade mode applies the same tap structure sequentially as a causal recursive dissolver.

Author: Shai Cohen Affiliation: Department of Music, Bar-Ilan University, Israel Version: 0.6 (2026) License: MIT License Repo: Praat AudioTools
Contents:

What this does

Fractal Convolution Swarm builds a family of delayed copies of the selected Sound at several exponentially related time scales. Every depth contributes a cluster of nearby delay taps, with progressively lower gain for deeper levels and for taps farther from the center of each cluster.

The same tap structure can be rendered in two different ways. Swarm treats all taps as a parallel sparse impulse response and adds the resulting delayed field to the dry signal. Cascade applies the taps one after another, so every stage operates on the result of the previous stage and the delayed material recursively accumulates.

Meaning of “fractal” in this tool: the delay groups repeat the same structural idea at successively scaled time intervals. Depth 1 starts at Base_delay_ms; each later depth multiplies that center delay by Depth_scale_factor.
Depth 1 center = Base delay Depth d center = Base delay × Scale^(d−1) Depth weight = 1 / sqrt(d) Kernel weight = 1 / (1 + |k|), k ≠ 0 Tap gain = Mix amount × Depth weight × Kernel weight

The processing is offline and deterministic: the same source and settings produce the same result.

How the delay structure is built

1. Depth centers

For each depth d, the script calculates a center delay in samples:

center(d) = round(BaseDelaySamples × DepthScaleFactor^(d−1))

This means Depth 1 is exactly the requested base delay. Later depths expand from that reference.

2. Kernel offsets around each center

Each depth contains 2 × Convolution_width active offsets: negative and positive kernel indices, with k = 0 reserved as the center reference and excluded from processing.

For widths up to 3, adjacent kernel positions are separated by approximately 30% of the current center delay. For wider kernels, the spacing is compressed so the complete kernel remains within approximately ±90% of the center delay and does not create negative delays.

spread = min(1, 3 / ConvolutionWidth) kernelStep = round(center × 0.3 × spread) tapDelay = max(1, center + k × kernelStep)

Taps whose delay would be as long as, or longer than, the source Sound are skipped. The Info window reports both the number of active operations and the number skipped.

3. Weighting

Depth weighting follows 1/sqrt(depth). Kernel weighting follows 1/(1+|k|). The nearest offsets therefore contribute more strongly than the outer offsets, while later depth levels remain present with reduced weight.

Two processing modes

Swarm — parallel sparse delay sum

All valid taps are first written into a sparse impulse response. Praat then convolves the source with that impulse response once per required wet channel. The convolved field is added to the dry signal.

output = dry + Σ delayed(source, tapDelay) × tapGain × spatialGain

Important: in Swarm mode, Mix_amount is a tap/send gain. The dry signal remains at unity; it is not reduced as the wet amount rises.

Cascade — causal recursive dissolver

The same valid tap list is processed sequentially. Every operation reads an earlier sample from the current evolving output, so later operations contain the accumulated result of earlier ones.

stage output = current × (1 − g) + delayed(current) × g

Here g = Mix_amount × KernelWeight × DepthWeight. Cascade therefore behaves as a series of causal delayed blends rather than a parallel tap sum.

PropertySwarmCascade
ArchitectureParallel sparse FIR-style delay fieldSequential recursive delayed blends
Praat operationSparse IR + ConvolveOne Formula pass per active tap
Dry pathUnity dry plus wet sendIncluded in every stage as 1−g
Stereo_modeUsed for mono/stereo sourcesIgnored
CharacterTap cloud / comb fieldMore cumulative and dissolving

Channel and stereo behavior

Mono input

A mono source is intentionally duplicated to stereo before processing. In Swarm mode this gives the tap field a left/right destination for Wide and Ping-pong placement. In Cascade mode both duplicated channels receive the same recursive processing.

Stereo input

The original stereo dry signal is preserved. For Swarm processing, a mono copy of the source is used to generate the wet delay field, which is then distributed to the left and right output channels according to Stereo_mode.

Stereo modeSwarm placement
CenteredEvery tap is placed at the center using equal-power left/right gains.
WideKernel position determines pan: negative offsets move left, positive offsets move right, with continuous equal-power placement across the kernel.
Ping-pongOdd and even depth groups alternate hard left and hard right.

More than two channels

Multichannel sources with more than two channels retain their channel count. Swarm uses one centered sparse impulse response independently on every source channel, avoiding assumptions about a particular speaker layout. Cascade processes every channel independently with the same recursive structure.

Duration and timing: processing is causal and the result keeps the source duration. Convolution tails beyond the original number of samples are not appended to the output.

Presets

Presets set the five fractal parameters. Processing mode, Stereo mode, Safety peak, visualization, and playback remain independent user choices.

PresetDepthWidthBase delayScaleMix
CustomForm valueForm valueForm valueForm valueForm value
Subtle Texture323.0 ms1.40.20
Ambient Swarm535.0 ms1.60.30
Dense Cloud647.0 ms1.80.40
Granular Dispersion758.0 ms2.00.45
Extreme Fractal8610.0 ms2.20.50
Gentle Shimmer422.5 ms1.30.15

Parameters

ParameterDefaultImplemented behavior
PresetCustomSelects one of the six fixed fractal parameter sets or leaves the form values unchanged.
Fractal_depth5Number of exponentially scaled center-delay groups. Internally clamped to 1–12.
Convolution_width3Number of active kernel positions on each side of every depth center. Internally clamped to 1–8.
Base_delay_ms5.0 msCenter delay of Depth 1. Converted to at least one sample.
Depth_scale_factor1.6Multiplier from one depth center to the next. Internally clamped to 1–4.
Mix_amount0.300–1. Swarm: tap/send gain. Cascade: delayed-blend coefficient component. A value of 0 selects the dry bypass path.
ProcessingSwarmParallel sparse convolution or sequential recursive cascade.
Stereo_modePing-pongSwarm placement for mono/stereo sources: Centered, Wide, or Ping-pong. Cascade does not use this setting.
Safety_peak0.990 disables safety. Otherwise the result is attenuated only when its absolute peak exceeds this ceiling.
Draw_visualizationOnDraws the process summary figure.
Play_resultOnPlays the finished Sound.

Output and safety

Exact dry bypass

When Mix_amount = 0, no delay processing is applied and Safety peak is bypassed with the dry path. For mono input, the documented mono-to-stereo expansion still occurs.

Safety peak

Safety_peak is an attenuation-only ceiling. The script measures the finished peak and calls Scale peak only when that peak is above the requested ceiling. Signals already below the ceiling are left at their existing level.

if Mix = 0: dry bypass else if SafetyPeak > 0 and peak > SafetyPeak: attenuate to SafetyPeak else: leave level unchanged

The result keeps the source sample rate, start time, and duration. Stereo and multichannel inputs retain their channel count; mono input becomes stereo. The output is named from the source plus the selected preset name.

Visualization

The v0.6 figure shows the actual processing structure rather than an abstract fractal diagram.

Input and Output

The first two panels show the source waveform and the measured processed waveform.

Depth Delays

One bar per depth shows the center delay in milliseconds. This directly displays the exponential scale progression used by the engine.

Depth Weights

One bar per depth shows 1/sqrt(depth), making the reduction in deeper-level contribution visible.

Kernel Weights

The kernel panel shows the 1/(1+|k|) weighting. The gray k = 0 bar is a visual center reference; the actual processing loop excludes kernel 0.

Summary

The summary reports processing mode, effective stereo behavior, depth, width, mix, base delay, scale factor, maximum depth-center delay, active operations, Safety action, and measured output peak.