Chaotic Granular Synthesis — User Guide
A from-scratch granular synthesizer in which deterministic nonlinear systems control the timing, duration, frequency, amplitude, and spatial position of Hann-windowed sine grains.
What this does
Chaotic Granular Synthesis creates a new sound; it does not require or granulate an input Sound. Every grain is a sine oscillator shaped by a Hann envelope. A Logistic map, Hénon map, or Lorenz system supplies bounded control values that determine when grains occur and how each grain is rendered.
The script renders one to eight layers. Each layer follows the same selected dynamical law but begins from its own initial condition. A small fixed octave offset separates layers spectrally. The layers are then summed, optionally rendered in stereo, faded at the outer edges, and optionally normalized.
Quick start
- Run
Chaotic Granular Synthesis.praat. No input Sound is required. - Choose Custom, Logistic Sparse, Henon Texture, or Lorenz Atmospheric.
- For Custom, set duration, sample rate, base frequency, density, number of layers, grain-duration range, and frequency span.
- Choose the nonlinear system and decide whether its initial state should be randomized.
- Choose Mono or Stereo Wide, then set the edge fade, normalization, visualization, and playback options.
- The result remains in the Objects window as
chaotic_granular_<preset>.
How the synthesis works
1. The state becomes five controls
For every grain the selected system produces five values in the range 0–1: mFreq, mDur, mAmp, mDensity, and mPan. The exact extraction differs between Logistic, Hénon, and Lorenz, but the downstream mappings are shared.
2. Timing is chaos-controlled
The local density is
inter-onset interval = 1 / local density
Thus the requested density is a center value rather than a fixed event rate. Depending on the trajectory, instantaneous density spans approximately 0.55× to 1.45× the nominal value. The first event is placed at half of its first interval; later events advance by the current interval.
3. Duration, frequency, amplitude, phase, and pan
frequency = base × 2^(layerOffset + spanOctaves × (mFreq − 0.5))
layerOffset = 0.18 octave × (layer − 1)
amplitude = baseGrainAmplitude × (0.45 + 0.55 × mAmp)
phase = 2π × mPan
Frequency is mapped logarithmically in octaves around the base frequency. The amplitude base value compensates approximately for expected grain overlap and the number of layers, so increasing density or layers is less likely to become an accidental gain control.
4. Each event is a true Hann grain
Here age is time since the grain onset. This matters at internal chunk boundaries: the oscillator phase and Hann envelope continue from the same grain age instead of restarting.
Nonlinear systems
Logistic Map
x[n+1] = 3.97 × x[n] × (1 − x[n]). After a 250-iteration burn-in, each grain consumes five successive map states: frequency, duration, amplitude, density, and pan. The governing parameter r is fixed at 3.97; randomization changes the initial state, not the law.
Hénon Map
x[n+1] = 1 − 1.4x[n]^2 + y[n], y[n+1] = 0.3x[n], with a 600-iteration burn-in. The first new state supplies frequency and duration, the second amplitude and density, and the third pan. The state is mapped into bounded 0–1 controls; the underlying map itself is not hard-clamped.
Lorenz System
Uses the classical parameters σ=10, ρ=28, β=8/3 with explicit Euler integration at dt = 0.005. After a 4000-step burn-in, eight integration substeps lead to the state used for frequency, duration, and amplitude; another eight lead to density and pan. Logistic functions map the unbounded state coordinates smoothly into 0–1 controls.
Parameters
| GUI field | Default | What it controls |
|---|---|---|
| Preset | Custom | Loads one of three predefined configurations or leaves the form values unchanged. |
| Duration_s | 10 | Exact output duration in seconds. |
| Sample_rate_Hz | 44100 | Output sampling rate; accepted range 8000–192000 Hz. |
| Base_frequency_Hz | 120 | Center of the octave-based frequency mapping. It may be reduced automatically for Nyquist safety. |
| Grain_density_grains_per_s | 8 | Nominal density per layer. The nonlinear density control moves locally between about 0.55× and 1.45× this value. |
| Number_of_layers | 3 | Parallel nonlinear grain layers; allowed range 1–8. |
| Min_grain_duration_ms | 60 | Lower end of the chaos-controlled Hann-grain duration range. |
| Max_grain_duration_ms | 220 | Upper end; limited to 2000 ms and must be ≥ the minimum. |
| Frequency_span_octaves | 2.5 | Total logarithmic span around the base frequency; allowed range >0 to 8 octaves. |
| Synthesis_mode | Logistic Map | Chooses Logistic, Hénon, or Lorenz control dynamics. |
| Randomize_initial_state | yes | Chooses whether each layer starts from a random or fixed deterministic initial condition. |
| Random_seed | 0 | With randomized initial states: positive = reproducible; 0 = unpredictable. |
| Spatial_mode | Mono | Mono sum or per-grain equal-power stereo panning. |
| Edge_fade_s | 0.05 | Linear fade applied only to the outer edges of the completed output; capped at 49% of total duration. |
| Normalize_output | yes | If non-silent, target peak normalization to 0.90. |
| Draw_visualization | yes | Draws the four-part control/measurement figure. |
| Play_after | yes | Plays the final Sound after generation. |
Presets
| Preset | Main values loaded |
|---|---|
| Logistic Sparse | 10 s, 44.1 kHz, base 120 Hz, density 7, 3 layers, 55–180 ms grains, 2.5-octave span, Logistic, Mono, 0.05 s edge fade. |
| Henon Texture | 12 s, 44.1 kHz, base 100 Hz, density 8, 4 layers, 70–240 ms grains, 3-octave span, Hénon, Stereo Wide, 0.05 s edge fade. |
| Lorenz Atmospheric | 15 s, 44.1 kHz, base 80 Hz, density 6, 3 layers, 110–360 ms grains, 3.5-octave span, Lorenz, Stereo Wide, 0.08 s edge fade. |
The presets do not override Randomize_initial_state, Random_seed, Normalize_output, Draw_visualization, or Play_after; those retain the current form values.
Chunk continuity
The current engine uses synthesis chunks of at most 1 second. Chunking is only an implementation strategy for keeping Praat formula sizes manageable; it does not quantize the nonlinear schedule or shorten a grain.
The script no longer discards grains because a chunk is “full.” Instead it stops with an explicit message if more than 180 overlapping grain terms would be required in one layer/chunk. A separate workload guard rejects settings estimated to exceed 6000 grains.
Spatial rendering & reproducibility
Mono
All layers are summed into one channel. The chaos-derived mPan value still supplies the grain's initial oscillator phase, but no spatial panning is performed.
Stereo Wide
Every grain is placed independently with equal-power gains:
right = sin(π/2 × pan)
There is no complementary EQ, injected noise, Haas delay, or post-hoc widening stage. Stereo structure comes directly from the nonlinear grain control.
Initial state and seed
With Randomize initial state = off, each layer uses a deterministic layer-dependent starting state and the seed has no effect. With randomization on, a positive seed reproduces the initial states exactly; seed 0 leaves them unpredictable. After fixed-seed synthesis, the script returns Praat's RNG to an unpredictable state.
Visualization: quantum → law → statistics → sound
The current visualization deliberately separates control-domain plots from the measured acoustic output.
| Panel | What is drawn |
|---|---|
| I — The Information Diagram | Every actually scheduled grain is shown in the linear time–frequency plane. Rectangle width is the grain duration; height is 1.5 / duration, the equivalent noise bandwidth of a Hann window. Amplitude controls the shade. This is a Gabor-inspired information-plane visualization; the Hann ENBW cell is not claimed to be Gabor's Gaussian minimum-uncertainty cell. |
| II — The Dynamical Law | Logistic mode shows a bifurcation diagram with the operating r = 3.97. Hénon and Lorenz show a long attractor re-run with the layer-1 states that actually drove the synthesis marked on top. A Lyapunov exponent is estimated from a separate long run of the law, not from the short musical trajectory. |
| III — The Invariant Measure | Upper plot: histogram of the realized layer-1 state coordinate with a long-run density of the same law overlaid. Lower plot: histogram of the frequencies of all rendered grains, showing the audible consequence of the state distribution. |
| IV — The Sound Itself | A measured spectrogram of the final rendered Sound. This is the only panel that directly measures the acoustic result. |
Output & safeguards
- Object:
chaotic_granular_<preset>. - Duration: the requested
Duration_s. - Sample rate: the selected
Sample_rate_Hz. - Channels: one for Mono, two for Stereo Wide.
- Normalization: when enabled and the sound is nonzero,
Scale peak: 0.90performs target peak normalization. - Edge fade: linear fade-in/out on the completed mix; this is not a grain crossfade.
- Nyquist guard: the frequency map is designed around 45% of the sample rate. The base frequency may be reduced before synthesis so the requested span and layer offsets fit safely.
- Low-frequency floor: individual mapped carriers are not allowed below 20 Hz.
- Workload limits: density ≤150 grains/s/layer, layers 1–8, estimated total ≤6000 grains, and ≤180 overlapping grain terms per one-second layer chunk.
Further Reading
- Gabor, D. (1946). “Theory of communication. Part 1: The analysis of information.” Journal of the Institution of Electrical Engineers — Part III: Radio and Communication Engineering, 93(26). doi:10.1049/ji-3-2.1946.0074.
- Lorenz, E. N. (1963). “Deterministic Nonperiodic Flow.” Journal of the Atmospheric Sciences, 20(2), 130–141. DOI.
- May, R. M. (1976). “Simple mathematical models with very complicated dynamics.” Nature, 261, 459–467. doi:10.1038/261459a0.
- Hénon, M. (1976). “A two-dimensional mapping with a strange attractor.” Communications in Mathematical Physics, 50(1), 69–77. doi:10.1007/BF01608556.
- Roads, C. (2001). Microsound. MIT Press. A direct reference for granular and microsound synthesis practice.