Analogique B: Stochastic Sound Mass Generator
Generates a mono electronic sound mass from independently evolving bands of filtered noise, with stochastic spectral and amplitude states, equal-power state transitions, reproducible random seeds, and a Xenakis-inspired control-field visualization.
What this does
The script synthesizes a sound mass from multiple independent noise layers. Each layer occupies a time-varying frequency band whose centre frequency, bandwidth, and amplitude evolve stochastically from one control state to the next. Adjacent states are joined with overlapping equal-power-compensated transitions, and the layers are mixed to a single mono output.
Signal path:
Quick start
- Run
Analogique_B_Stochastic_Mass.praat. No input Sound is required. - Choose a morphology preset or leave Custom.
- Set the duration and, for a custom mass, the number of layers, spectral range, drift, bandwidth variation, and amplitude turbulence.
- Set Random_seed to a positive integer when you want the stochastic realization to be repeatable; leave it at 0 for a new realization.
- Use Fast_mode when a coarser 2-second control grid is appropriate.
- Run the script. The finished Sound remains selected and can optionally be played and visualized.
Signal model
Control-state timing
| Mode | State duration | Noise source | State crossfade |
|---|---|---|---|
| Normal | 1.0 s | Gaussian white noise, σ = 0.5 | 200 ms |
| Fast | 2.0 s | Uniform white noise in ±0.8660254, matched to variance 0.25 | 400 ms |
The random-walk step sizes are multiplied by √Δt, so changing the state duration changes temporal resolution while keeping the per-second diffusion scale comparable. Fast mode also uses the uniform white-noise generator shown above.
Initial layer states
- Centre frequency: drawn uniformly in log-frequency between the minimum and maximum frequency.
- Bandwidth: initially 20–80% of the centre frequency.
- Amplitude: initially uniform from 0.30 to 0.80.
State evolution
Centre frequency is reflected between the requested spectral bounds. Bandwidth remains positive and is reflected within a state-dependent range from max(30 Hz, 0.10 × centre) to min(0.80 × Nyquist, 1.50 × centre). Amplitude is reflected between 0.05 and 1.00.
Filtering and transitions
For each state, the pass band is centred on the current frequency with the current bandwidth. The lower edge is kept at or above 20 Hz and the upper edge at or below 95% of Nyquist. The Hann-band transition width is 15% of pass-band width, constrained to 8–120 Hz.
Neighbouring noise states overlap. Before Praat performs Concatenate with overlap, the short overlap regions are compensated by
so the complementary raised-cosine fades have approximately constant expected power for independent adjacent noise states. The overlap is therefore a genuine overlap-crossfade, not merely separate fade-in/fade-out envelopes.
Parameters
| Parameter | Default | Implemented behavior |
|---|---|---|
| Preset | Custom | Selects one morphology preset. Presets override only the mass parameters listed in the Presets section. |
| Duration_minutes | 7.0 | Requested output duration in minutes. |
| Number_of_layers | 5 | Independent stochastic layers; accepted range is 1–32. |
| Min_frequency_Hz | 60 | Lower centre-frequency bound; values below 20 Hz are raised to 20 Hz. |
| Max_frequency_Hz | 8000 | Upper centre-frequency bound; capped at 90% of Nyquist. At 44.1 kHz this is 19,845 Hz. |
| Spectral_drift_rate | 0.3 | Scales Gaussian steps of the log-frequency walk. Must be non-negative; the script does not impose an upper limit. |
| Bandwidth_variation | 0.5 | Scales multiplicative log-bandwidth steps. Must be non-negative; no upper limit is imposed. |
| Amplitude_turbulence | 0.4 | Scales additive amplitude-walk steps. Must be non-negative; no upper limit is imposed. |
| Random_seed | 0 | 0 uses an unpredictable seed; a positive integer fixes the stochastic draws for repeatable synthesis. |
| Fast_mode | Off | Uses 2-second control states and the matched-variance uniform noise source described above. |
| Normalize_output | On | If the result is nonzero, Scale peak: 0.90 performs target peak normalization. |
| Figure_language | English | English or French labels for the visualization. |
| Draw_visualization | On | Draws the control-field / measurement figure described below. |
| Play_result | On | Plays the completed Sound. |
layers × number of control states as filter calls and stops when this exceeds 50,000.
Presets
Presets change only Number_of_layers, Min_frequency_Hz, Max_frequency_Hz, Spectral_drift_rate, Bandwidth_variation, and Amplitude_turbulence. Duration, random seed, Fast mode, normalization, figure language, visualization, and playback remain as set in the form.
| Preset | Layers | Range (Hz) | Drift | BW var. | Turbulence |
|---|---|---|---|---|---|
| Balanced Mass | 5 | 60–8000 | 0.30 | 0.50 | 0.40 |
| Slow Narrow Drift | 4 | 120–5000 | 0.12 | 0.18 | 0.18 |
| Migrating Bands | 5 | 80–8000 | 0.65 | 0.30 | 0.22 |
| Turbulent Wide Cloud | 8 | 50–9000 | 0.45 | 0.85 | 0.75 |
| Low Dark Mass | 6 | 40–2200 | 0.28 | 0.55 | 0.45 |
| High Spectral Haze | 7 | 1500–9500 | 0.35 | 0.65 | 0.35 |
| Sparse Streams | 3 | 100–6500 | 0.35 | 0.15 | 0.30 |
Output & reproducibility
- Input: none; the script is a generator.
- Channels: mono. Layers are summed directly; there is no intermediate multichannel spatial image.
- Sample rate: fixed at 44,100 Hz.
- Duration: the assembled layers preserve the requested duration despite the state overlaps.
- Layer scaling: each layer enters the mix with a factor of
1/√N. - Global edge fade:
min(2 s, 10% of output duration), applied before normalization. - Normalization: when enabled and the signal is nonzero, the final target peak is 0.90.
- Object name:
analogique_b_<duration>min, with_fastappended in Fast mode.
Random seed
A positive Random_seed fixes the stochastic initialization, noise generation, and random-walk updates. Seed 0 initializes unpredictably. After the stochastic DSP draws finish, the script restores Praat's global random generator to unpredictable operation.
The dots used in the screen visualization are positioned by a deterministic hash of screen, cell, and dot index rather than by additional random draws, so drawing the figure does not consume or alter the synthesis random stream.
Visualization
The figure can be labelled in English or French. Panels I–IV are derived from the recorded control-state history; Panel V is an acoustic measurement of the generated Sound.
I — The Book of Screens
Up to ten control states sampled across the piece are re-plotted as 8 logarithmic frequency cells × 5 control-level cells. Dot count represents each cell's share of model energy. These dots visualize the recorded filter-band/amplitude state rather than individual synthesized grains.
II — One Screen
The middle control state is enlarged. F is logarithmic frequency. G is the layer amplitude control converted with 20·log10(amplitude); it is a control-level scale, not measured dB SPL or RMS.
III — Frequency-Register Transition Matrix
The script divides the log-frequency span into six registers and counts how each layer's centre frequency moves between adjacent control states. Each row is normalized by its observed transition count, and the row's n is printed beside it. The matrix therefore describes this realized random walk. Its diagonal mass is reported as the frequency-register self-transition probability.
IV — Spectral Ataxy
For each control state, energy is accumulated over eight frequency cells and converted to normalized Shannon entropy:
0 means the control-field energy is concentrated in one frequency cell; 1 means it is evenly spread across all eight. This is the entropy of the frequency marginal only.
V — The Sound Itself
A measured spectrogram of the final mono Sound is drawn with the actual centre-frequency control paths overlaid. This panel anchors the control-domain description to the audio that was produced.
The summary strip reports realized centre-frequency, bandwidth and amplitude ranges, boundary reflections, control parameters, crossfade duration, register self-transition, number of filter states, output peak/RMS, and normalization state.
Historical context
Iannis Xenakis composed Analogique A et B in 1958–1959 for nine string instruments and tape; Analogique B is the tape component. Xenakis's original work used short sinusoidal sound grains organized as evolving “screens” and employed Markovian stochastic procedures to control the succession of states.
This AudioTools generator takes the historical idea as a compositional reference while using a different synthesis mechanism: stochastic, continuously filtered noise bands whose states are later mapped into screen-like coordinates for analysis and visualization.
Further Reading
- Xenakis, I. (1992). Formalized Music: Thought and Mathematics in Composition, revised edition. Pendragon Press. See especially the discussion of Markovian stochastic music and Analogique A/B.
- Di Scipio, A. (1998). “Compositional Models in Xenakis's Electroacoustic Music.” Perspectives of New Music, 36(2), 201–243.