Cellular Automata Synthesis — User Guide

Sonifies cellular-automaton states as short additive sound generations. Active cells become sine oscillators whose frequencies are determined by cell position; the evolving CA therefore becomes an evolving spectrum.

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

What this does

Cellular Automata Synthesis generates audio from three cellular-automaton families: elementary one-dimensional rules, Conway's Game of Life, and Brian's Brain. Each CA generation occupies one short time segment. Cells in the active/firing state become sine oscillators; their positions determine their frequencies. The segment is then followed by the next CA generation, so changes in cellular structure become changes in spectral population over time.

Signal path: initialize CA → evolve one generation at a time → map active cells to frequencies → sum oscillators with density compensation → apply short edge tapers → concatenate generations → optional stereo render → optional peak normalization.

The script generates sound internally; no input Sound is required. The final object is named ca_<preset-name>.

Quick start

  1. Run Cellular_Automata_Synthesis.praat.
  2. Choose a preset, or select Custom.
  3. For an elementary CA, choose the rule number, boundary mode, and initial condition. For the 2D rules, the script supplies the appropriate random initial state.
  4. Set the generation duration and frequency range.
  5. Choose Mono, Stereo Wide, or Rotating output.
  6. Run the script. The final Sound remains selected in the Objects window; visualization and playback are optional.
Useful distinction: Segment_duration_s is the duration assigned to one CA generation. The script uses ceiling(Duration / Segment_duration) generations and shortens the final segment when necessary, so the final Sound still matches Duration_s.

Presets

Presets replace only the fields listed below. Sample_rate_Hz, Random_seed, normalization, visualization, and playback remain as entered unless explicitly stated.

PresetCA setupSound mappingSpatial override
Rule 30 Classic8 s; grid 32; elementary Rule 30; fixed boundary; single centre cell100 ms/generation; 150 Hz base; 200 Hz spreadNone
Rule 110 Complex10 s; grid 40; elementary Rule 110; fixed boundary; single centre cell80 ms/generation; 120 Hz base; 250 Hz spreadNone
Rule 90 Symmetric8 s; grid 32; elementary Rule 90; fixed boundary; single centre cell100 ms/generation; 180 Hz base; 180 Hz spreadNone
Rule 184 Traffic8 s; grid 32; elementary Rule 184; wrap boundary; random traffic at 35% occupancy100 ms/generation; 200 Hz base; 150 Hz spreadNone
Game of Life12 s; 18×18; B3/S23; wrap boundary; random 30% live seed150 ms/generation; 100 Hz base; 300 Hz spreadStereo Wide
Brian's Brain10 s; 20×20; wrap boundary; random 22% firing + 10% refractory seed120 ms/generation; 130 Hz base; 200 Hz spreadRotating

CA types

Elementary CA (1D)

A row of binary cells is updated from left, centre, and right neighbours. The three bits form a number from 0 to 7; the corresponding bit of Rule_number becomes the next cell state. Rules 0–255 are accepted.

Boundary: Fixed treats cells outside the finite row as zero. Wrap connects the left and right edges.

Initial condition: single centre cell, random 35% traffic, alternating 1010, or random sparse 10%.

Game of Life (2D)

Binary B3/S23 Life: a dead cell is born with exactly three live neighbours; a live cell survives with two or three. The script begins from a random 30% live field. Only live cells are sonified.

Brian's Brain (2D)

Three states are used: dead → firing → refractory → dead. A dead cell fires when exactly two neighbours are firing. Only firing cells generate oscillators; refractory cells affect later evolution and appear in the visualization, but are not themselves sounded.

Sound mapping

One generation = one additive sound state

For every generation, the script first counts the active cells. If there are N active cells, each oscillator receives gain 0.65 / sqrt(N). This keeps changing CA density primarily audible as changing spectral population, rather than allowing dense generations to become simple gain boosts.

Position → frequency

CAPosition mappingResult
Elementaryu = (cell−1)/(grid−1)First and last cells map exactly to Base and Base+Spread.
Game of Lifeu = ((row−1)+√2(column−1)) / ((grid−1)(1+√2))Uses both axes and spans the requested range exactly, with a near-injective projection that reduces repeated frequencies.
Brian's BrainRow-major cell index normalized from 0 to 1The complete 2D grid is distributed exactly across Base…Base+Spread.

Phase and segment edges

Each cell receives a deterministic phase offset derived from its cell index and a golden-ratio fractional step. The same cell therefore keeps the same phase identity across generations, while simultaneously active cells are less likely to pile up coherently.

Each generation is mostly flat in amplitude. Only the first and last up to 5 ms use a raised-cosine edge taper (also limited to 20% of a very short segment). Generations are concatenated; this is not a crossfade. A second global fade of up to 10 ms protects the final Sound endpoints.

Parameters

ParameterDefaultBehavior
Duration_s8.0 sRequested final Sound duration.
Sample_rate_Hz44100Output sample rate; minimum 2000 Hz.
Grid_size32Clamped to 8–64 for elementary CA; 2D rules are additionally capped at 24×24.
Rule_typeElementaryElementary CA, Game of Life, or Brian's Brain.
Rule_number300–255; used only by Elementary CA.
Boundary_modeFixedZero outside the grid, or wrap/toroidal edges. Applies to both 1D and 2D rules.
Elementary_initial_conditionSingle centreUsed only by Elementary CA.
Random_seed00 uses an unpredictable initial state; a positive seed reproduces random 1D/2D initialization. Deterministic initial conditions do not depend on the seed.
Segment_duration_s0.1 sNominal duration of each generation; the last generation may be shorter.
Base_frequency_Hz150 HzBottom of the frequency map.
Frequency_spread_Hz200 HzRequested distance from Base to the top of the map.
Spatial_modeMonoMono, Stereo Wide, or Rotating.
Normalize_outputyesFor non-silent output, scales the final absolute peak to 0.90.
Draw_visualizationyesDraws the CA/mapping/QC figure after synthesis.
Play_resultyesPlays the completed Sound.
Nyquist guard: the script reserves the band below 0.45 × Sample_rate_Hz. If Base+Spread would exceed that limit, the effective spread is reduced while Base is preserved. If Base itself reaches the safety limit, synthesis stops. Runs requesting more than 2000 generations are also rejected.

Spatial output

Mono

Keeps the concatenated CA synthesis as one channel.

Stereo Wide

The left channel is the mono signal. The right channel is a delayed copy. The delay is min(7 ms, 0.25 × Segment_duration_s). This produces temporal decorrelation without spectral splitting. The original source is mono, so there is no pre-existing stereo image to preserve.

Rotating

Creates complementary equal-power left/right gains at 0.15 Hz (about 6.67 seconds per cycle). The signal begins in the centre and moves smoothly across the stereo field.

Normalization

When enabled and the Sound is non-silent, Scale peak: 0.90 is applied after spatial rendering. This is target peak normalization, not an attenuate-only ceiling.

Visualization & QC

The figure combines the actual CA realization with measurements of the final Sound.

PanelWhat is shown
A — Actual CAFor elementary CA: the complete evolution, downsampled to at most 200 display columns when needed. For 2D CA: true first, middle, and final snapshots. In Brian's Brain, firing and refractory states are distinguished.
B — Activity trajectoryActual active/firing density for every rendered generation. Brian's Brain also shows refractory density as a second trajectory.
C — Model → measurementA measured spectrogram of the final output with the realized per-generation mean frequency and min/max frequency guides overlaid. For stereo output, the channel with the higher whole-file RMS is displayed rather than folding L+R to mono.
D — Mechanism & QCRule summary, frequency mapping law, mean/max activity, first silent generation, realized frequency range, Nyquist adjustment status, edge-taper duration, output peak/RMS/channels, spatial mode, and seed.
Interpretation: Panel A and B are model-state views; Panel C is measured audio with model guides. The blue mean-frequency trace is therefore a control-derived descriptor of the active cells, not a pitch track estimated from the Sound.

Practical notes