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.

Author: Shai Cohen Affiliation: Department of Music, Bar-Ilan University, Israel Version: 0.4 (2026) License: MIT License Repo: Praat AudioTools
Contents:

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:

X → instantaneous oscillator frequency
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

  1. Run Lorenz_Deep_Analog.praat. No input Sound is required.
  2. Choose Custom or one of the five presets.
  3. Set Duration, Audio sample rate, Base pitch, Lorenz model-time speed, rho, sigma, beta, and Spatial mode.
  4. Open Edit integration / mapping details for control rate, burn-in, initial conditions, pitch span, amplitude floor, second-harmonic depth, master amplitude, and edge fade.
  5. 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.
Non-Custom presets override Duration, Base pitch, model-time speed, rho, sigma, beta, burn-in, and in some cases Pitch span. Sample rate, Spatial mode, Peak protection, visualization, playback, and unlisted advanced controls remain user-controlled.

The Lorenz system

dx/dt = sigma × (y - x)
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:

sigma = 10
rho = 28
beta = 8/3

Equilibria and the rho stability boundary

For rho > 1, the system has two non-zero equilibria:

x = y = ±sqrt(beta × (rho - 1))
z = rho - 1

When sigma > beta + 1, the script also calculates the local stability boundary of these equilibria:

rho_H = sigma × (sigma + beta + 3) / (sigma - beta - 1)

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.

This is why the rho=20 preset is called Stable Spiral to Equilibrium, while rho=28 with the classic sigma/beta values is explicitly identified as the classic Lorenz-63 chaotic parameter set.

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:

modelStep = Lorenz time units per audio second / Control rate

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:

dynamicRate = max(sigma, rho, beta)
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:

xScale = yScale = max(1, 1.5 × equilibrium |x|)

zCenter = rho - 1 (when rho > 1)
zScale = max(1, 0.75 × |zCenter|)

After audio-rate resampling:

xNorm = tanh(x / xScale)
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:

f = effectiveBase × 2^(0.5 × PitchSpanOctaves × xNorm)

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:

phase[k] = phase[k-1] + 2π × f[k] / Fs

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:

amp = AmplitudeFloor + (1 - AmplitudeFloor) × (0.5 + 0.5 × yNorm)

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:

H2 = MaximumSecondHarmonic × (0.5 + 0.5 × zNorm)

The oscillator is:

sin(phase) + H2 × sin(2 × phase)

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:

frequencyScale = min(1, safeTop / (harmonicFactor × requestedFundamentalTop))

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

ControlDefault / rangeBehavior
Duration15 s; max 180 sExact output Sound duration.
Audio sample rate44.1 kHz; 8–192 kHzFinal synthesis rate and audio-rate phase integration.
Base pitch200 HzLogarithmic center of the X-controlled pitch mapping before possible common headroom scaling.
Lorenz time units per second2.5; max 30How much model time is traversed during one audio second.
Rho28; 0–250Lorenz rho parameter.
Sigma10; 0–100Lorenz sigma parameter.
Beta8/3; 0–50Lorenz beta parameter.
Spatial modeMonoMono, Stereo Z-axis pan, or Stereo X-Y oscillator split.

Integration / mapping details

ControlDefaultBehavior
Control rate500 HzStored XYZ trajectory rate; allowed 100–4000 Hz.
Burn-in5 Lorenz-time unitsModel time integrated before the output trajectory begins.
Initial x / y / z.1 / .1 / .1Starting point before burn-in.
Pitch span1.40 octavesTotal bounded X-controlled pitch span; allowed 0–6 octaves.
Amplitude floor.22Minimum Y-controlled amplitude multiplier; allowed 0–1.
Maximum second harmonic.34Maximum Z-controlled second-harmonic amplitude; allowed 0–1.
Master amplitude.52Global source gain before final peak protection.
Edge fade.035 sCommon linear fade-in/out, capped at 20% of Duration.

Presets

PresetOverridesPurpose
Classic Chaotic Butterfly15 s; 200 Hz; 2.5 Lorenz units/s; sigma 10; rho 28; beta 8/3; burn-in 5Classic Lorenz-63 chaotic parameter set.
Deep Butterfly30 s; 60 Hz; .5 Lorenz units/s; rho 28; burn-in 5; pitch span 1.15 octSame classic parameter set traversed more slowly and mapped lower in pitch.
Fast Butterfly10 s; 350 Hz; 7.5 Lorenz units/s; rho 28; burn-in 5; pitch span 1.55 octSame classic parameter set traversed rapidly and mapped higher.
High-Rho Wide Field20 s; 120 Hz; 2 Lorenz units/s; rho 90; burn-in 6; pitch span 1.55 octExplores a much larger-rho trajectory without assuming that high rho alone proves a specific chaotic regime.
Stable Spiral to Equilibrium20 s; 150 Hz; 1 Lorenz unit/s; rho 20; burn-in 0; pitch span 1.10 octPreserves 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:

pan = 0.5 + 0.45 × zNorm
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:

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

PropertyBehavior
InputNo selected Sound is required.
DurationExactly the requested Duration.
Sample rateExactly the selected 8–192 kHz rate.
ChannelsMono for Mono; stereo for the two stereo modes.
Edge fadeOne common linear fade at the beginning and end, capped at 20% of Duration.
Peak protectionIf enabled and the final peak exceeds .92, the complete output is scaled down once to .92.
NormalizationNo upward normalization. If peak ≤ .92, the generated level is preserved.
Output nameLorenz_<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.

PanelWhat it shows
A — Actual X-Z trajectoryMeasured post-burn trajectory with the relevant Lorenz equilibrium point(s) marked. The final sampled trajectory point is highlighted.
B — Actual control signalsNormalized X, Y, and Z control trajectories across the full Duration using the same parameter-scale normalization as the audio mapping.
C — X → instantaneous frequencyThe actual X-derived mapped fundamental over time, including the effective Base pitch after sampling-headroom scaling.
D — Model → measurementMeasured 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: