Lorenz Deep Analog — User Guide
Continuous-control synthesis driven by a numerically integrated Lorenz system. The Lorenz coordinates are converted into bounded audio controls: X drives instantaneous frequency, Y drives amplitude, and Z controls second-harmonic brightness; stereo modes additionally use Z for pan or Y for a second oscillator.
Scope
Despite the historical filename Deep Analog, this script is not an analog-circuit emulation. It numerically integrates the Lorenz differential equations and uses the resulting coordinates as compositional control signals.
The Lorenz equations themselves come from Lorenz's convection model; the sound mappings are specific to this AudioTools engine:
Y → amplitude
Z → second-harmonic brightness
Z → stereo pan in Z-axis Pan mode
Y → second independently integrated oscillator in X/Y Split mode
The sound should therefore be understood as a sonification/synthesis mapping of the Lorenz trajectory, not as an acoustic model of atmospheric convection.
Quick start
- Run
Lorenz_Deep_Analog.praat. No input Sound is required. - Choose Custom or one of the five presets.
- Set Duration, Audio sample rate, Base pitch, Lorenz model-time speed, rho, sigma, beta, and Spatial mode.
- Open Edit integration / mapping details for control rate, burn-in, initial conditions, pitch span, amplitude floor, second-harmonic depth, master amplitude, and edge fade.
- Run the script. The Lorenz system is integrated first at a control rate with RK4 substeps, then the coordinates are resampled to the audio rate and mapped to synthesis controls.
The Lorenz system
dy/dt = x × (rho - z) - y
dz/dt = x × y - beta × z
The classic Lorenz-63 parameter set used by the main butterfly presets is:
rho = 28
beta = 8/3
Equilibria and the rho stability boundary
For rho > 1, the system has two non-zero equilibria:
z = rho - 1
When sigma > beta + 1, the script also calculates the local stability boundary of these equilibria:
For sigma=10 and beta=8/3 this is approximately 24.7368. The script uses this only as a regime note: unstable equilibria above this boundary do not by themselves prove that every parameter combination is chaotic.
Numerical integration and traversal speed
Version 0.4 uses fourth-order Runge-Kutta rather than the Euler update described in the old guide.
Lorenz model time per audio second
The main speed control has a specific meaning:
If the control rate is 500 Hz and the speed is 2.5 Lorenz-time units per audio second, each stored control interval represents 0.005 Lorenz-time units.
Adaptive internal substeps
The script does not necessarily take one RK4 step per stored control sample. It derives a target internal step from sigma, rho, and beta and subdivides each control interval when necessary:
targetStep = min(0.004, 0.25 / dynamicRate)
substeps = ceil(modelStep / targetStep)
h = modelStep / substeps
This separates musical traversal speed from the numerical step more effectively than the previous Euler design. If a requested parameter/speed combination would require more than 100 RK4 substeps per stored control interval, the script stops rather than silently using a very coarse integration.
Burn-in
For the chaotic presets, the system is integrated for a configurable amount of Lorenz model time before the audible trajectory begins. This removes an arbitrary startup transient. The Stable Spiral preset deliberately uses zero burn-in so its approach toward equilibrium remains part of the sound and visualization.
Control-rate trajectory
After burn-in, X, Y, and Z are stored in a three-channel control Sound at the selected Control rate. Those coordinate channels are then resampled with Praat's sinc resampling to the requested audio sample rate before synthesis mapping.
Coordinate normalization and audio mapping
Parameter-scale normalization
The engine does not min/max-normalize every realization. Instead, normalization scales are derived from the current Lorenz parameters:
zCenter = rho - 1 (when rho > 1)
zScale = max(1, 0.75 × |zCenter|)
After audio-rate resampling:
yNorm = tanh(y / yScale)
zNorm = tanh((z - zCenter) / zScale)
This keeps all three controls bounded approximately to -1…+1 while preserving more of the effect of changing Lorenz parameters than realization-by-realization min/max normalization would.
X → instantaneous frequency
X controls pitch logarithmically:
At xNorm=-1 and +1, the full bounded range spans exactly the selected number of octaves around Base pitch in logarithmic frequency.
Audio-rate phase integration
The mapped frequency is converted into oscillator phase sample by sample:
This gives true instantaneous-frequency control with phase continuity. The engine does not use the older shortcut sin(2π × f(t) × t).
Y → amplitude
Y controls a bounded amplitude multiplier:
The Amplitude floor therefore sets the minimum possible control gain. With the default .22, Y can vary this multiplier approximately from .22 to 1.
Z → harmonic brightness
Z controls the level of a second harmonic:
The oscillator is:
An energy-compensation factor is applied as H2 changes so brightness variation does not merely become an equivalent increase in source level.
Frequency headroom
The script reserves 0.45 × Fs as its top sampling region. If the second harmonic is active, the headroom calculation includes twice the highest possible mapped fundamental:
The same scale is applied to the Base pitch, preserving the shape of the whole pitch mapping. If this would move the bounded lower fundamental below 20 Hz, the script stops.
Controls
| Control | Default / range | Behavior |
|---|---|---|
| Duration | 15 s; max 180 s | Exact output Sound duration. |
| Audio sample rate | 44.1 kHz; 8–192 kHz | Final synthesis rate and audio-rate phase integration. |
| Base pitch | 200 Hz | Logarithmic center of the X-controlled pitch mapping before possible common headroom scaling. |
| Lorenz time units per second | 2.5; max 30 | How much model time is traversed during one audio second. |
| Rho | 28; 0–250 | Lorenz rho parameter. |
| Sigma | 10; 0–100 | Lorenz sigma parameter. |
| Beta | 8/3; 0–50 | Lorenz beta parameter. |
| Spatial mode | Mono | Mono, Stereo Z-axis pan, or Stereo X-Y oscillator split. |
Integration / mapping details
| Control | Default | Behavior |
|---|---|---|
| Control rate | 500 Hz | Stored XYZ trajectory rate; allowed 100–4000 Hz. |
| Burn-in | 5 Lorenz-time units | Model time integrated before the output trajectory begins. |
| Initial x / y / z | .1 / .1 / .1 | Starting point before burn-in. |
| Pitch span | 1.40 octaves | Total bounded X-controlled pitch span; allowed 0–6 octaves. |
| Amplitude floor | .22 | Minimum Y-controlled amplitude multiplier; allowed 0–1. |
| Maximum second harmonic | .34 | Maximum Z-controlled second-harmonic amplitude; allowed 0–1. |
| Master amplitude | .52 | Global source gain before final peak protection. |
| Edge fade | .035 s | Common linear fade-in/out, capped at 20% of Duration. |
Presets
| Preset | Overrides | Purpose |
|---|---|---|
| Classic Chaotic Butterfly | 15 s; 200 Hz; 2.5 Lorenz units/s; sigma 10; rho 28; beta 8/3; burn-in 5 | Classic Lorenz-63 chaotic parameter set. |
| Deep Butterfly | 30 s; 60 Hz; .5 Lorenz units/s; rho 28; burn-in 5; pitch span 1.15 oct | Same classic parameter set traversed more slowly and mapped lower in pitch. |
| Fast Butterfly | 10 s; 350 Hz; 7.5 Lorenz units/s; rho 28; burn-in 5; pitch span 1.55 oct | Same classic parameter set traversed rapidly and mapped higher. |
| High-Rho Wide Field | 20 s; 120 Hz; 2 Lorenz units/s; rho 90; burn-in 6; pitch span 1.55 oct | Explores a much larger-rho trajectory without assuming that high rho alone proves a specific chaotic regime. |
| Stable Spiral to Equilibrium | 20 s; 150 Hz; 1 Lorenz unit/s; rho 20; burn-in 0; pitch span 1.10 oct | Preserves the settling trajectory toward locally stable non-zero equilibria. |
All presets use sigma=10 and beta=8/3. Only Custom exposes the full current form values without preset replacement.
Spatial modes
Mono
One phase-integrated X-driven oscillator. Y controls amplitude and Z controls second-harmonic brightness.
Stereo Z-axis pan
The same mono synthesis is placed in stereo using Z as an equal-power position control:
left = source × sqrt(1 - pan)
right = source × sqrt(pan)
Because zNorm is bounded by tanh, pan remains between approximately .05 and .95.
Stereo X-Y oscillator split
This mode creates two genuinely separate phase-integrated oscillators:
- Left: X drives pitch; Y drives amplitude.
- Right: Y drives pitch; X drives amplitude.
- Both: Z controls the same second-harmonic brightness law.
Each side uses its own instantaneous-frequency Sound and its own phase accumulator. A fixed 0.80 factor is applied to Master amplitude in this stereo mode to provide extra level margin.
Output and level
| Property | Behavior |
|---|---|
| Input | No selected Sound is required. |
| Duration | Exactly the requested Duration. |
| Sample rate | Exactly the selected 8–192 kHz rate. |
| Channels | Mono for Mono; stereo for the two stereo modes. |
| Edge fade | One common linear fade at the beginning and end, capped at 20% of Duration. |
| Peak protection | If enabled and the final peak exceeds .92, the complete output is scaled down once to .92. |
| Normalization | No upward normalization. If peak ≤ .92, the generated level is preserved. |
| Output name | Lorenz_<preset name>, with spaces replaced by underscores. |
Visualization and QC
The current figure is an analysis of the actual generated mechanism and output, not a decorative real-time attractor display.
| Panel | What it shows |
|---|---|
| A — Actual X-Z trajectory | Measured post-burn trajectory with the relevant Lorenz equilibrium point(s) marked. The final sampled trajectory point is highlighted. |
| B — Actual control signals | Normalized X, Y, and Z control trajectories across the full Duration using the same parameter-scale normalization as the audio mapping. |
| C — X → instantaneous frequency | The actual X-derived mapped fundamental over time, including the effective Base pitch after sampling-headroom scaling. |
| D — Model → measurement | Measured output spectrogram with the actual mapped fundamental trajectory overlaid as a guide. |
For stereo output, Panel D analyzes whichever complete output channel has the higher RMS. Its frequency ceiling also leaves room for the second harmonic where sampling headroom permits.
The QC block reports the regime note, X-sign lobe crossings, RK4 control rate/model step/substeps, observed fundamental range, X/Y/Z mapping summary, common frequency scale, pre-protection peak/RMS, spatial mode, and whether down-only peak protection was applied.
Further reading
The primary reference for the dynamical system used here is:
- Lorenz, E. N. (1963). “Deterministic Nonperiodic Flow.” Journal of the Atmospheric Sciences, 20(2), 130–141. DOI: 10.1175/1520-0469(1963)020<0130:DNF>2.0.CO;2.