Lorenz Deep Analog — User Guide
Chaos‑based audio synthesis: maps the Lorenz attractor's X‑axis to pitch and Z‑axis to timbre, creating evolving, organic, chaotic soundscapes with deterministic unpredictability.
What this does
This script implements chaos‑based audio synthesis using the Lorenz attractor — a classic system of three coupled nonlinear differential equations discovered by meteorologist Edward Lorenz in 1963. The system exhibits deterministic chaos: sensitive dependence on initial conditions, non‑periodic trajectories, and the iconic butterfly‑shaped strange attractor. Here, the Lorenz equations are numerically integrated, and the resulting X‑coordinate modulates pitch while the Z‑coordinate influences timbral aspects, yielding a sound that is mathematically deterministic yet perceptually unpredictable and organic.
Key Features:
- Four Preset Behaviors — Standard Butterfly, Deep Drone, Nervous Insect, Unstable Giant
- Custom Parameter Control — Adjust duration, base pitch, chaos speed, and ρ (Rho)
- Dual Mapping — X‑axis → pitch modulation, Z‑axis → timbre/filter character
- Real‑time Visualization — Draws the Lorenz attractor (X vs Z) as it evolves
- High‑Quality Audio Output — Resampled to 44.1 kHz for clean playback
- Debug Mode — Logs parameters for experimentation
Technical Implementation: (1) Numerical integration: Euler method with fixed time‑step (chaos_speed). (2) Audio mapping: X‑value → instantaneous frequency via sin(2π·(base_pitch + X·mod_depth)·t). (3) Control‑rate processing: Simulation runs at 500 Hz, then resampled to 44.1 kHz. (4) Visualization: X‑Z plot updates in real‑time, showing the attractor's evolution. (5) Parameter groups: σ (Sigma) = 10.0 (Prandtl number), β (Beta) = 2.6667 (aspect ratio), ρ (Rho) = variable (Rayleigh number) — primary chaos control. The magic lies in ρ: below ≈24.74 the system settles to fixed points; above, it becomes chaotic. Higher ρ increases turbulence and expands the attractor's wings.
Quick start
- In Praat, ensure no objects are selected.
- Run script… →
lorenz_deep_analog.praat. - Choose a Preset (Standard Butterfly, Deep Drone, Nervous Insect, or Unstable Giant).
- Or select Custom and adjust parameters manually.
- Enable Debug_mode to see parameter values in Info window.
- Click OK — script runs, draws attractor, generates and plays sound.
- Result appears in Objects list as "Sound Lorenz_Chaos".
step variable.
Chaos Theory & Lorenz Equations
The Lorenz System
🔬 Original Equations (1963)
Differential form:
Numerical Integration (Euler Method)
Physics Interpretation
Original meteorological meaning:
- x: Convection velocity (rate of fluid motion)
- y: Horizontal temperature gradient
- z: Vertical temperature gradient
- σ: Prandtl number (viscosity vs thermal diffusivity)
- ρ: Rayleigh number (buoyancy vs damping)
- β: Aspect ratio of fluid layer
🎯 Chaos Threshold
Critical ρ ≈ 24.74
- ρ < 1: Origin stable (no motion)
- 1 < ρ < 24.74: Two stable fixed points (steady convection)
- ρ > 24.74: Chaotic regime (butterfly attractor)
- ρ ≈ 28.0: Classic Lorenz parameter (Standard Butterfly preset)
- ρ > 50: Highly turbulent, expanded wings
- ρ > 100: Hyper‑chaotic, complex patterns
The Strange Attractor
Audio Mapping Strategy
Complete Processing Pipeline
Preset Behaviors
Preset 1: Standard Butterfly (ρ = 28.0)
🦋 Classic Lorenz Attractor
Parameters:
- Duration: 15.0 s
- Base pitch: 200 Hz
- Chaos speed: 0.005
- Rho (ρ): 28.0
- Visual scale: X: ±25, Z: 0‑50
Sonic character: Medium pitch, slow evolution, recognizable butterfly pattern. The sound gracefully orbits between two pitch centers (left/right wings), with smooth transitions and organic swells. Ideal for introducing chaos synthesis — predictable enough to follow, chaotic enough to stay interesting.
Visualization: Clear butterfly shape with balanced wings. System spends roughly equal time in each wing.
Preset 2: Deep Drone (ρ = 28.0)
🌀 Slow‑Evolving Bass Texture
Parameters:
- Duration: 30.0 s
- Base pitch: 60 Hz
- Chaos speed: 0.001
- Rho (ρ): 28.0
- Visual scale: X: ±25, Z: 0‑50
Sonic character: Sub‑bass drone with glacial movement. Very slow chaos speed means the attractor evolves gradually, creating subtle pitch bends and timbral shifts over tens of seconds. Feels like tectonic plates shifting or deep ocean currents.
Visualization: Dense, slow‑drawn attractor — points are close together due to small integration step.
Preset 3: Nervous Insect (ρ = 28.0)
🐝 High‑Speed Buzzing
Parameters:
- Duration: 10.0 s
- Base pitch: 350 Hz
- Chaos speed: 0.015
- Rho (ρ): 28.0
- Visual scale: X: ±25, Z: 0‑50
Sonic character: Fast, erratic buzzing reminiscent of insect swarms or electrical interference. High pitch + fast chaos speed creates rapid pitch jumps and nervous energy. The attractor switches wings frequently, producing staccato‑like transitions.
Visualization: Sparse, rapid trajectory — large jumps between points, attractor fills quickly.
Preset 4: Unstable Giant (ρ = 90.0)
🌪️ Turbulent Expanded Chaos
Parameters:
- Duration: 20.0 s
- Base pitch: 120 Hz
- Chaos speed: 0.004
- Rho (ρ): 90.0
- Visual scale: X: ±50, Z: 0‑160 (auto‑expanded)
Sonic character: Wild, expansive pitch sweeps with turbulent behavior. High ρ expands the attractor wings dramatically, causing extreme X‑values that map to wide pitch excursions. The modulation depth is automatically reduced (mod_depth = 5) to keep audio range reasonable. Sounds like a unstable giant machine or atmospheric turbulence.
Visualization: Huge butterfly shape — wings extend to ±50 in X, up to 160 in Z.
Parameters & Mapping
Custom Parameters (When Preset = "Custom")
🎛️ User‑Adjustable Settings
| Parameter | Type | Default | Range | Description |
|---|---|---|---|---|
| Duration | real | 15.0 | 1.0‑300.0 | Length of generated sound (seconds) |
| Base_pitch | real | 200 | 20‑2000 | Fundamental frequency (Hz) |
| Chaos_speed | real | 0.005 | 0.0001‑0.05 | Integration step size Δt (larger = faster evolution) |
| Rho | real | 28.0 | 10‑200 | Rayleigh number (chaos intensity) |
| Debug_mode | boolean | 0 | 0/1 | Print parameters to Info window |
Fixed Parameters (Not User‑Adjustable)
| Parameter | Value | Description |
|---|---|---|
| Sigma (σ) | 10.0 | Prandtl number (viscosity vs thermal diffusivity) |
| Beta (β) | 2.6667 | Aspect ratio (8/3) |
| Control_rate | 500 Hz | Simulation sampling rate |
| Audio_rate | 44100 Hz | Output audio sampling rate |
| Initial conditions | (0.1, 0.1, 0.1) | Starting point (lx, ly, lz) |
Parameter Interactions & Effects
Automatic Scaling Rules
Sonic Applications
Ambient Textures & Soundscapes
🌫️ Evolving Backgrounds
Technique: Use Deep Drone preset with extended duration (60+ seconds). Layer multiple instances with different base pitches (e.g., 60 Hz, 120 Hz, 180 Hz) for rich harmonic clouds.
Post‑processing: Add reverb (large hall), slow low‑pass filter modulation, subtle amplitude tremolo.
Result: Living, breathing atmospheric pads that never repeat exactly.
Experimental Music & Composition
Use case: Generative composition with chaotic control signals
Workflow:
- Generate multiple Lorenz sequences with different parameters
- Use X‑output as pitch automation for synthesizers
- Use Z‑output as filter cutoff or resonance modulation
- Slice and rearrange attractor segments
- Create rhythmic structures by thresholding X‑values
Sound Design for Media
Sci‑fi effects: Nervous Insect preset for alien communications, robot chatter, electrical malfunctions.
Nature sounds: Deep Drone with very slow chaos_speed for earthquake rumbles, distant thunder.
Horror textures: Unstable Giant with pitch shifted down an octave for unsettling, unstable machinery.
Algorithmic Performance
Live manipulation: Map physical controllers to parameters:
- Knob 1 → Base pitch (harmonic progression)
- Knob 2 → Chaos speed (energy level)
- Knob 3 → Rho (chaos intensity)
- Button → Reset initial conditions (instant change)
Result: Performative control over chaotic system — deterministic enough to rehearse, unpredictable enough to surprise.
Scientific Sonification
Use case: Making chaos theory audible for education/research
Demonstrations:
- Sensitive dependence: Two nearly identical parameters produce completely different melodies
- Attractor structure: Hear wing transitions as pitch‑center shifts
- Bifurcations: Slowly increase ρ through 24.74 to hear onset of chaos
- Fractal time‑scale: Zoom into attractor reveals similar patterns at different speeds
Practical Workflow Examples
🎬 Sci‑fi Spaceship Interior
Goal: Complex, alive machinery hum
Settings:
- Preset: Standard Butterfly
- Base pitch: 180 Hz (fundamental)
- Duration: 45 seconds
- Post‑process: Band‑pass filter (150‑250 Hz), light distortion, stereo widener
Layering: Add second instance at 90 Hz (octave below) for weight.
🎵 Generative Melodic Patterns
Goal: Chaotic but tonal melodic material
Settings:
- Preset: Custom
- Base pitch: 440 Hz (A4)
- Chaos speed: 0.003
- Rho: 30.0
- Post‑process: Quantize X‑values to nearest semitone (external script)
Result: Evolving melodies that hover around A major but introduce surprising intervals.
🔬 Chaos Education Demo
Goal: Demonstrate sensitive dependence on initial conditions
Procedure:
- Run script with ρ=28.0, chaos_speed=0.005, duration=10
- Note the resulting melody
- Change chaos_speed to 0.005001 (tiny change!)
- Run again — completely different melody emerges
- Students hear how deterministic chaos differs from randomness
Visualization
The X‑Z Plot
Why X vs Z (not X vs Y or Y vs Z)?
- X (horizontal): Pitch modulation signal (most perceptually salient)
- Z (vertical): "Timbre" dimension — correlates with system energy
- Y: Less visually interesting for audio mapping
- Iconic butterfly shape is clearest in X‑Z projection
Drawing Optimization
Color Coding
- Blue lines: Attractor trajectory (historical path)
- Red circle: Current system state (final position)
- Black axes: X (pitch) and Z (timbre) scales
- Gray background: Clean contrast for attractor
Scale Auto‑Adjustment
For high ρ (>50): Visualization scales expand automatically:
This ensures the expanded attractor remains visible within the plot bounds.
Advanced Modifications
Custom Initial Conditions
To change starting point: Modify these lines in the script:
Effect: Different starting points converge to the same attractor (transient period varies).
Additional Audio Mappings
Map Y to amplitude: Create tremolo/volume modulation:
Map Z to filter cutoff: External processing with automation.
Multi‑Attractor Layering
Generate multiple Lorenz systems with different parameters:
Creates rich, beating textures from interacting chaotic systems.
Exporting Control Data
Save X, Y, Z arrays to text file for use in other software (DAWs, Max/MSP, Pure Data):