CA Convolution Reverb — Cellular Automaton IR Generator
Builds a mono convolution impulse response by unfolding an elementary cellular automaton into audio samples, then shapes it with filtering, exponential decay and an end fade.
What this does
The script evolves a one-dimensional binary elementary cellular automaton with periodic boundaries. The resulting generation × cell matrix is read row by row into a requested-duration IR. Dead cells contribute zero; live cells are multiplied by a seeded ±1 sign vector. The IR is high-pass cleaned below about 25 Hz, multiplied by exp(-t / Decay_time), faded at the end, normalized, and convolved with the selected Sound.
The selected source sample rate is used throughout. A mono IR is broadcast by Praat across all source channels.
What is CA?
CA stands for Cellular Automaton. It is a grid of simple cells that change state step by step according to a local rule. In an elementary cellular automaton, each cell is either 0 or 1, and its next state is determined by three cells from the previous generation: its left neighbour, itself and its right neighbour.
The Rule value (0–255) defines the complete set of local decisions. Different rules produce very different patterns: some die out quickly, some form regular or self-similar structures, and others generate dense, irregular activity. In this tool, those visual patterns are not merely displayed — they become the structure of the impulse response. A live cell can contribute an impulse; a dead cell contributes silence.
What is Convolution Reverb?
Convolution reverb applies an impulse response (IR) to a sound. An IR is a short signal that describes how an acoustic space or signal-processing system responds to a single impulse. Convolution combines every moment of the input sound with that response, so the temporal and spectral structure of the IR is imposed on the source.
In conventional convolution reverb, the IR is often a recording made in a real room. Here, the IR is generated algorithmically from the cellular automaton instead. The result is therefore not a measurement of a physical room: it is a synthetic convolution space whose echo density, periodicity, decay and resonance emerge from the CA-derived IR.
Quick start
- Select exactly one Sound.
- Run
CA_Reverb_IR.praat. - Choose one of five presets or Custom.
- For Custom, choose Rule, width, seed mode/seed, IR duration, decay time and frame decorrelation.
- Set Wet/Dry and optional IR/CA retention or playback.
Output: <source>_CAreverb_<preset>.
CA → IR mapping
For a width W and target sample count round(Ir_duration × sampleRate), the number of CA generations is ceil(targetSamples / W). The IR uses exactly the requested target sample count; the final CA row may therefore be only partly represented.
- Seed mode: single centre cell or a 50% random row.
- Rule: standard elementary-CA rule 0–255; each next cell depends on left/self/right from the previous generation.
- Live-cell sign: a fixed seeded ±1 value per physical column; dead cells are silence.
- Frame decorrelation ON: each generation is read through a seeded circular rotation. This breaks the repeated row-boundary spacing.
- Frame decorrelation OFF: rows are read in natural order, preserving a strong structural spacing at approximately
sampleRate / CA_width.
Random_seed initializes all CA/sign/rotation randomness, so identical settings, source sample rate and seed produce the same IR. The script restores Praat to an unpredictable RNG state after generating these structures.
Presets
| Preset | Rule | Width | Seed mode | IR | Decay | Decorrelation |
|---|---|---|---|---|---|---|
| Chaotic Room | 30 | 256 | random | 1.2 s | 0.35 s | ON |
| Sierpinski Plate | 90 | 512 | centre | 2.0 s | 0.6 s | OFF |
| Complex Bloom | 110 | 256 | centre | 2.5 s | 0.9 s | ON |
| Granular Traffic | 184 | 128 | random | 0.8 s | 0.2 s | ON |
| Cathedral Chaos | 45 | 1024 | random | 4.0 s | 1.4 s | ON |
Random_seed, Wet/Dry and output/visualization switches keep the values entered in the form.Controls
| Control | Default / limit | Meaning |
|---|---|---|
| Rule | 30; clamped 0–255 | Elementary CA rule. |
| Ca_width | 256; clamped 16–8192 | Cells per generation. It changes CA structure and the undecorrelated spacing; it does not change requested IR duration. |
| Seed_mode | random row | Centre cell or seeded 50%-density random row. |
| Random_seed | 42 | Seed for random initial row, sign vector and decorrelation rotations. |
| Ir_duration | 1.5 s; clamped 0.25–10 s | Requested IR duration. |
| Decay_time | 0.35 s; positive | Time constant in exp(-t/Decay_time); it is not RT60. |
| Frame_decorrelation | ON | Rotate each generation during IR readout. |
| Wet_dry_percent | 100; clamped 0–100% | Final wet/dry blend. |
| Keep_IR_and_CA | no | Keep the generated IR and CA matrix. |
Output, level and visualization
- 0% wet: exact copy of the selected dry Sound; no convolution or forced normalization.
- Wet path: Praat convolution uses
peak 0.99, so the wet convolution is normalized to 0.99. - Mixed path: wet and dry are combined linearly; if the mixed peak exceeds 0.99, only then is it attenuated to 0.99.
- Tail: when wet is present, the convolution tail remains after the dry source ends.
- Channels/sample rate: preserved; one mono IR is applied to all channels.
The visualization contains the CA matrix, IR waveform, IR spectrum capped at min(10 kHz, Nyquist), a first-channel wet waveform, and a summary strip.