Advanced Brownian Synthesis — User Guide
Layered stochastic synthesis driven by bounded Brownian / Ornstein–Uhlenbeck frequency trajectories, with reproducible randomness, harmonic and pulsed variants, and optional stereo spatial processing.
Overview
Advanced Brownian Synthesis creates sound from several sinusoidal layers whose instantaneous frequencies move along stochastic trajectories. Each layer is updated at a 200 Hz control rate, the control trajectory is resampled to the audio sample rate, and phase is then integrated at audio rate before synthesis. This keeps the oscillator continuous while allowing the frequency path to wander.
The central control is a Brownian innovation with optional mean reversion. With drift disabled, frequency performs a bounded random walk. With drift enabled, the same stochastic motion is pulled toward a target frequency, giving a discrete Ornstein–Uhlenbeck-like process. Frequency boundaries are reflective rather than simple hard clips, reducing artificial dwelling at the limits.
Quick start
- Run
Advanced_Brownian_Synthesis.praat; no Sound selection is needed. - Choose a preset, or leave Custom to use the values shown in the form.
- Set Duration_s, Base_frequency_Hz, and Number_of_layers.
- Use Step_size for the amount of stochastic motion and Drift_force for the strength of attraction toward each mode's target frequency.
- Set Random_seed to 0 for a new realization on every run, or to a positive integer for a reproducible trajectory.
- Choose Brownian Walk, Brownian Chaos, Brownian Harmonics, or Pulsed Brownian, then choose Mono, Stereo Wide, or Rotating output.
Brownian process
At each 200 Hz control update, the script applies the following discrete rule:
Δf = k(μ − f)Δt + σ√Δt · N(0,1) f_next = f + Δf
Here f is the current layer frequency, μ is that layer's target, k is Drift_force, and Δt = 1/200 s. The implementation converts the user-facing Step_size into a rate-explicit diffusion coefficient so that, at the fixed 200 Hz control rate, the Gaussian innovation retains approximately the historical Step_size magnitude per control frame.
Boundaries
The synthesis range is 30 Hz to min(8000 Hz, 0.45 × sample_rate). The upper limit is therefore at most 90% of Nyquist. Ordinary boundary crossings are reflected back into the valid range; a final guard clamps only unusually large jumps that would cross more than one boundary in a single update.
From control trajectory to oscillator
Frequency and amplitude controls are generated at 200 Hz, resampled to the requested audio sample rate, and then frequency is integrated into phase sample by sample. The audio layer is amplitude(t) × sin(phase(t)). The layers are summed before fades and spatial processing.
Synthesis modes
Brownian Walk Mean-reverting walk
Layer n starts at Base_frequency_Hz + (n−1) × Frequency_spread_Hz. With drift enabled, each layer is attracted back toward its own starting frequency. Layer amplitude is static apart from a slight layer-index taper.
Brownian Chaos Heavy-tail variant
Layers begin with the same spread rule as Brownian Walk, but the stochastic step grows with layer number. On approximately 10% of control updates the Brownian step is multiplied by 5. With drift enabled, all Chaos layers are attracted toward 2 × Base_frequency_Hz. Amplitude falls temporarily after larger frequency jumps through a stability term exp(−|step| / step_scale).
Brownian Harmonics Harmonic targets
Layer n begins at and is attracted toward n × Base_frequency_Hz. Frequency_spread_Hz is intentionally ignored in this mode. Higher partials receive smaller amplitudes, while each harmonic retains its own stochastic detuning around the ideal integer multiple.
Pulsed Brownian Stochastic + periodic
Frequency starts with the normal layer spread, while drift pulls all layers toward Base_frequency_Hz. Each layer also receives a periodic amplitude pulse. The pulse rate is 2 + 1.5 × layer_number Hz, and the envelope retains a 20% floor rather than closing to silence.
Presets
Presets replace the synthesis, motion, fade, and spatial values shown below. Sample_rate_Hz, Random_seed, Normalize_output, Draw_visualization, and Play_result remain independently controlled by the form.
| Preset | Mode | Duration | Base / layers / spread | Step / drift | Fade | Spatial |
|---|---|---|---|---|---|---|
| Default Walk | Walk | 10 s | 150 Hz / 4 / 100 Hz | 10 / 0.10 | 2 s | Mono |
| Tight Knots | Walk | 8 s | 200 Hz / 6 / 50 Hz | 5 / 0.20 | 1 s | Stereo Wide |
| Loose Drift | Walk | 15 s | 100 Hz / 3 / 200 Hz | 20 / 0.05 | 3 s | Rotating |
| Chaotic Swarm | Chaos | 12 s | 180 Hz / 8 / 80 Hz | 15 / 0.15 | 2 s | Stereo Wide |
| Harmonic Bells | Harmonics | 10 s | 220 Hz / 5 / spread ignored | 8 / 0.10 | 2 s | Mono |
| Deep Drone | Walk | 20 s | 55 Hz / 3 / 20 Hz | 3 / 0.30 | 5 s | Rotating |
| Spectral Shimmer | Harmonics | 12 s | 440 Hz / 6 / spread ignored | 25 / 0.08 | 2 s | Stereo Wide |
| Insect Swarm | Chaos | 8 s | 800 Hz / 10 / 400 Hz | 50 / 0.05 | 1 s | Stereo Wide |
| Custom | Uses the values currently shown in the form. | |||||
Spatial modes
| Mode | Output | Processing |
|---|---|---|
| Mono | 1 channel | The summed synthesis output is retained directly. |
| Stereo Wide | 2 channels | Creates two copies of the mono synthesis and applies different Hann pass bands: the left emphasizes the lower spectrum, while the right removes the lowest region and extends higher. This is a static spectral widening method, not pan automation. |
| Rotating | 2 channels | Applies complementary equal-power gains driven by a 0.15 Hz sine trajectory. At the center position both channels receive √0.5 gain; the trajectory alternates smoothly toward the left and right extremes. |
Parameters
| Parameter | Default | Behavior |
|---|---|---|
| Duration_s | 10 s | Generated Sound duration. |
| Sample_rate_Hz | 44100 | Output sample rate. Values below 8000 Hz are rejected. |
| Base_frequency_Hz | 150 Hz | Primary reference frequency. Must be below the safe upper synthesis bound. |
| Number_of_layers | 4 | Number of voices; constrained to 1–16. |
| Frequency_spread_Hz | 100 Hz | Initial spacing between layers in Walk, Chaos, and Pulsed modes. Ignored by Harmonics. Negative values are allowed and reverse the direction of initial layer spacing. |
| Step_size | 10 | Stochastic frequency-step scale. Negative entries are converted to their absolute value. |
| Enable_drift | Yes | Enables the mean-reverting term toward each mode's target. |
| Drift_force | 0.10 | Mean-reversion coefficient in s⁻¹. Negative entries are replaced by 0. |
| Random_seed | 0 | 0 creates a new unpredictable realization; a positive integer reproduces the stochastic trajectory. The script restores unpredictable RNG state afterward. |
| Fade_time_s | 2 s | Linear fade-in and fade-out. Constrained to 0…half the duration. |
| Normalize_output | Yes | If enabled, Scale peak: 0.9 is applied. This is true peak normalization: it can raise or lower gain. If disabled, no final safety ceiling is applied. |
| Draw_visualization | Yes | Draws the process/QC figure after synthesis. |
| Play_result | Yes | Plays the generated object after processing. |
Visualization
The v0.5 figure is a process/QC view tied to the trajectories used by the synthesis rather than a decorative preview.
- Actual frequency trajectories: decimated copies of the realized 200 Hz Brownian control paths, with dotted target frequencies.
- Output waveform: the mono output, or channel 1 when the result is stereo so that stereo phase relationships cannot cancel in a fold-down display.
- Measured spectrogram + model paths: a spectrogram of that representative output channel with the Brownian trajectories overlaid.
- QC summary: requested base/spread/step/drift, realized frequency range, RMS control-step size, number of boundary reflections, spatial mode, and seed state.
The Info window also reports if any initial layer frequencies had to be constrained to the safe synthesis range.
Output behavior
- Name:
brownian_<preset-name>; Custom producesbrownian_Custom. - Channels: Mono produces one channel; Stereo Wide and Rotating produce two.
- Duration/sample rate: exactly the generated duration and requested sample rate.
- Randomness: deterministic for a fixed positive seed and the same settings; seed 0 gives a new realization.
- Normalization: optional peak normalization to 0.9. There is no separate attenuation-only safety stage.
- Fade: linear fade-in/out is applied before spatial processing.
Compositional context
Brownian and stochastic processes have a substantial compositional history. Iannis Xenakis used Brownian motion as a model for continuously changing pitch trajectories in Mikka (1971), and stochastic procedures became central to his broader work on probability, formalization, and computer music. Later, Gendy3 (1991) applied stochastic procedures directly to computer-generated sound.
This script belongs to that wider lineage of constrained randomness as compositional material, but it is not an implementation of Xenakis's GENDY algorithm or a reconstruction of Mikka. Its specific design is a layered oscillator system whose frequency controls follow bounded Brownian / mean-reverting trajectories, with contemporary controls for reproducibility, harmonic organization, pulsing, and spatialization.