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.
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.
The script generates sound internally; no input Sound is required. The final object is named ca_<preset-name>.
Quick start
- Run
Cellular_Automata_Synthesis.praat. - Choose a preset, or select Custom.
- 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.
- Set the generation duration and frequency range.
- Choose Mono, Stereo Wide, or Rotating output.
- Run the script. The final Sound remains selected in the Objects window; visualization and playback are optional.
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.
| Preset | CA setup | Sound mapping | Spatial override |
|---|---|---|---|
| Rule 30 Classic | 8 s; grid 32; elementary Rule 30; fixed boundary; single centre cell | 100 ms/generation; 150 Hz base; 200 Hz spread | None |
| Rule 110 Complex | 10 s; grid 40; elementary Rule 110; fixed boundary; single centre cell | 80 ms/generation; 120 Hz base; 250 Hz spread | None |
| Rule 90 Symmetric | 8 s; grid 32; elementary Rule 90; fixed boundary; single centre cell | 100 ms/generation; 180 Hz base; 180 Hz spread | None |
| Rule 184 Traffic | 8 s; grid 32; elementary Rule 184; wrap boundary; random traffic at 35% occupancy | 100 ms/generation; 200 Hz base; 150 Hz spread | None |
| Game of Life | 12 s; 18×18; B3/S23; wrap boundary; random 30% live seed | 150 ms/generation; 100 Hz base; 300 Hz spread | Stereo Wide |
| Brian's Brain | 10 s; 20×20; wrap boundary; random 22% firing + 10% refractory seed | 120 ms/generation; 130 Hz base; 200 Hz spread | Rotating |
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
| CA | Position mapping | Result |
|---|---|---|
| Elementary | u = (cell−1)/(grid−1) | First and last cells map exactly to Base and Base+Spread. |
| Game of Life | u = ((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 Brain | Row-major cell index normalized from 0 to 1 | The 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
| Parameter | Default | Behavior |
|---|---|---|
| Duration_s | 8.0 s | Requested final Sound duration. |
| Sample_rate_Hz | 44100 | Output sample rate; minimum 2000 Hz. |
| Grid_size | 32 | Clamped to 8–64 for elementary CA; 2D rules are additionally capped at 24×24. |
| Rule_type | Elementary | Elementary CA, Game of Life, or Brian's Brain. |
| Rule_number | 30 | 0–255; used only by Elementary CA. |
| Boundary_mode | Fixed | Zero outside the grid, or wrap/toroidal edges. Applies to both 1D and 2D rules. |
| Elementary_initial_condition | Single centre | Used only by Elementary CA. |
| Random_seed | 0 | 0 uses an unpredictable initial state; a positive seed reproduces random 1D/2D initialization. Deterministic initial conditions do not depend on the seed. |
| Segment_duration_s | 0.1 s | Nominal duration of each generation; the last generation may be shorter. |
| Base_frequency_Hz | 150 Hz | Bottom of the frequency map. |
| Frequency_spread_Hz | 200 Hz | Requested distance from Base to the top of the map. |
| Spatial_mode | Mono | Mono, Stereo Wide, or Rotating. |
| Normalize_output | yes | For non-silent output, scales the final absolute peak to 0.90. |
| Draw_visualization | yes | Draws the CA/mapping/QC figure after synthesis. |
| Play_result | yes | Plays the completed Sound. |
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.
| Panel | What is shown |
|---|---|
| A — Actual CA | For 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 trajectory | Actual active/firing density for every rendered generation. Brian's Brain also shows refractory density as a second trajectory. |
| C — Model → measurement | A 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 & QC | Rule 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. |
Practical notes
- CA behavior depends strongly on the finite-grid boundary condition. A pattern on a fixed finite row can die simply by reaching an edge; wrap boundaries instead make the grid topologically circular/toroidal.
- Rule 184 is paired with a random-traffic seed and wrap boundaries because that combination better exposes its transport behavior than a lone centre cell on a fixed grid.
- Rule 90 is an additive/XOR elementary rule and, from a single centre cell, produces the familiar Sierpiński-triangle structure. It is commonly classified as Class III rather than Class II.
- Rule 110 is computationally universal, but this script uses it as a sound-generating dynamical rule; it does not construct a universal computation.