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.

Author: Shai CohenAffiliation: Department of Music, Bar-Ilan University, IsraelVersion: 0.5.1 (2026)License: MIT LicenseRepo: https://github.com/ShaiCohen-ops/Praat-plugin_AudioTools
Contents:

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.

Why use a CA for reverb? The CA provides a repeatable way to generate complex temporal patterns from a very small set of parameters. Changing the rule, width, seed or decorrelation changes the distribution of impulses in the IR and therefore changes the resulting resonance and reverberation character.

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.

Signal path: source Sound → CA-generated impulse response → convolution → Wet/Dry mix. The same mono IR is applied across the source channels, so the original channel count is preserved.

Quick start

  1. Select exactly one Sound.
  2. Run CA_Reverb_IR.praat.
  3. Choose one of five presets or Custom.
  4. For Custom, choose Rule, width, seed mode/seed, IR duration, decay time and frame decorrelation.
  5. 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.

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

PresetRuleWidthSeed modeIRDecayDecorrelation
Chaotic Room30256random1.2 s0.35 sON
Sierpinski Plate90512centre2.0 s0.6 sOFF
Complex Bloom110256centre2.5 s0.9 sON
Granular Traffic184128random0.8 s0.2 sON
Cathedral Chaos451024random4.0 s1.4 sON
Preset override scope: presets set Rule, CA_width, Seed_mode, Ir_duration, Decay_time and Frame_decorrelation. Random_seed, Wet/Dry and output/visualization switches keep the values entered in the form.

Controls

ControlDefault / limitMeaning
Rule30; clamped 0–255Elementary CA rule.
Ca_width256; clamped 16–8192Cells per generation. It changes CA structure and the undecorrelated spacing; it does not change requested IR duration.
Seed_moderandom rowCentre cell or seeded 50%-density random row.
Random_seed42Seed for random initial row, sign vector and decorrelation rotations.
Ir_duration1.5 s; clamped 0.25–10 sRequested IR duration.
Decay_time0.35 s; positiveTime constant in exp(-t/Decay_time); it is not RT60.
Frame_decorrelationONRotate each generation during IR readout.
Wet_dry_percent100; clamped 0–100%Final wet/dry blend.
Keep_IR_and_CAnoKeep the generated IR and CA matrix.

Output, level and visualization

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.