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.
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.
Base_delay_ms; each later depth multiplies that center delay by Depth_scale_factor.
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:
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.
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.
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.
Here g = Mix_amount × KernelWeight × DepthWeight. Cascade therefore behaves as a series of causal delayed blends rather than a parallel tap sum.
| Property | Swarm | Cascade |
|---|---|---|
| Architecture | Parallel sparse FIR-style delay field | Sequential recursive delayed blends |
| Praat operation | Sparse IR + Convolve | One Formula pass per active tap |
| Dry path | Unity dry plus wet send | Included in every stage as 1−g |
| Stereo_mode | Used for mono/stereo sources | Ignored |
| Character | Tap cloud / comb field | More 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 mode | Swarm placement |
|---|---|
| Centered | Every tap is placed at the center using equal-power left/right gains. |
| Wide | Kernel position determines pan: negative offsets move left, positive offsets move right, with continuous equal-power placement across the kernel. |
| Ping-pong | Odd 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.
Presets
Presets set the five fractal parameters. Processing mode, Stereo mode, Safety peak, visualization, and playback remain independent user choices.
| Preset | Depth | Width | Base delay | Scale | Mix |
|---|---|---|---|---|---|
| Custom | Form value | Form value | Form value | Form value | Form value |
| Subtle Texture | 3 | 2 | 3.0 ms | 1.4 | 0.20 |
| Ambient Swarm | 5 | 3 | 5.0 ms | 1.6 | 0.30 |
| Dense Cloud | 6 | 4 | 7.0 ms | 1.8 | 0.40 |
| Granular Dispersion | 7 | 5 | 8.0 ms | 2.0 | 0.45 |
| Extreme Fractal | 8 | 6 | 10.0 ms | 2.2 | 0.50 |
| Gentle Shimmer | 4 | 2 | 2.5 ms | 1.3 | 0.15 |
Parameters
| Parameter | Default | Implemented behavior |
|---|---|---|
| Preset | Custom | Selects one of the six fixed fractal parameter sets or leaves the form values unchanged. |
| Fractal_depth | 5 | Number of exponentially scaled center-delay groups. Internally clamped to 1–12. |
| Convolution_width | 3 | Number of active kernel positions on each side of every depth center. Internally clamped to 1–8. |
| Base_delay_ms | 5.0 ms | Center delay of Depth 1. Converted to at least one sample. |
| Depth_scale_factor | 1.6 | Multiplier from one depth center to the next. Internally clamped to 1–4. |
| Mix_amount | 0.30 | 0–1. Swarm: tap/send gain. Cascade: delayed-blend coefficient component. A value of 0 selects the dry bypass path. |
| Processing | Swarm | Parallel sparse convolution or sequential recursive cascade. |
| Stereo_mode | Ping-pong | Swarm placement for mono/stereo sources: Centered, Wide, or Ping-pong. Cascade does not use this setting. |
| Safety_peak | 0.99 | 0 disables safety. Otherwise the result is attenuated only when its absolute peak exceeds this ceiling. |
| Draw_visualization | On | Draws the process summary figure. |
| Play_result | On | Plays 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.
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.