Dynamic Stochastic Synthesis — User Guide

Time-evolving granular synthesis: creates textures that transform over time with controlled density and frequency evolution, from gentle blooms to intense storms, using optimized chunking for ultra-fast performance.

Author: Shai Cohen Affiliation: Department of Music, Bar-Ilan University, Israel Version: 0.1 (2025) License: MIT License Repo: https://github.com/ShaiCohen-ops/Praat-plugin_AudioTools
Contents:

What this does

This script implements dynamic stochastic synthesis — generating evolving granular textures where density and frequency systematically change over time. Unlike static granular synthesis, this creates textures with narrative arcs: starting sparse and building to dense climaxes, or starting high and decaying to whispers. Process: (1) Pre-generates grain parameters with time-dependent properties, (2) Implements density evolution (sparse→dense or dense→sparse), (3) Applies frequency evolution (rising, falling, or complex trajectories), (4) Uses chunking optimization for ultra-fast synthesis, (5) Applies sophisticated spatial processing with time-varying stereo effects.

Key Features:

What is dynamic stochastic synthesis? Traditional granular synthesis: static parameters or random variations. Dynamic stochastic synthesis: parameters evolve systematically over time according to mathematical functions. Key evolutions: (1) Density evolution: Grains per second changes over time (e.g., sparse→dense for builds, dense→sparse for decays). (2) Frequency evolution: Center frequency shifts over time (e.g., rising for tension, falling for resolution). (3) Amplitude evolution: Overall loudness changes (e.g., fade in/out, crescendo/diminuendo). (4) Spatial evolution: Stereo image changes over time (e.g., narrow→wide, static→rotating). Result: textures with direction, narrative, and emotional arc. Applications: Film tension builds, musical crescendos, environmental transformations, emotional storytelling through sound.

Technical Implementation: (1) Parameter pre-generation: Calculate total grains based on average density. For each grain: assign random time (uniform), calculate normalized_time (0→1), compute current_density and current_freq using evolution functions, apply preset-specific grain characteristics (duration, amplitude variations). (2) Chunking synthesis: Split duration into 1.5-second chunks, build formula for each chunk with grains whose times fall in chunk, limit to 40 grains per chunk for performance. (3) Concatenation: Concatenate all chunks into final mono sound. (4) Spatial processing: Apply one of four spatial modes with time-varying stereo effects. (5) Final processing: Normalize peak amplitude. Key innovations: Time-dependent parameter calculation before synthesis, efficient chunking with grain limits, sophisticated spatial processing with evolution.

Quick start

  1. In Praat, ensure no objects selected (generates from scratch).
  2. Run script…dynamic_stochastic_synthesis.praat.
  3. Choose Preset (Gentle Bloom recommended for first try).
  4. Select Spatial_mode (Stereo Evolution creates immersive movement).
  5. Adjust Duration (6 seconds typical, longer for slow evolution).
  6. Set Base_frequency for overall pitch range.
  7. Define Initial_density and Final_density for evolution arc.
  8. Set Frequency_evolution_speed for pitch change rate.
  9. Click OK — synthesis runs with chunk-by-chunk progress.
  10. Output named "stochastic_presetname" appears in Objects window.
  11. Output automatically played when complete.
Quick tip: Start with Gentle Bloom preset to hear clear evolution from sparse to dense. Try Storm Build for intense crescendo effects. Use Cosmic Drift for slow, atmospheric evolution. Duration controls evolution time — 3-5s for quick changes, 10-15s for gradual evolution. Base_frequency sets starting pitch — 80-120Hz for bass/mid evolution. Initial_density/Final_density define texture evolution — large differences create dramatic builds/decays. Frequency_evolution_speed > 1.0 creates rising tension, < 1.0 creates falling resolution. Spatial_mode Stereo Evolution adds moving stereo image that evolves with the texture.
Important: EVOLUTION IS DETERMINISTIC — same parameters produce same evolution (good for composition). DENSITY EVOLUTION LINEAR — grains/sec changes linearly from initial to final. FREQUENCY EVOLUTION EXPONENTIAL — frequency changes by 2^speed factor over duration. GRAIN LIMIT PER CHUNK — limited to 40 grains per 1.5-second chunk for performance. HIGH DENSITIES may exceed grain limit → some grains skipped. EVOLUTION SPEED > 2.0 can create extreme frequency ranges. SPATIAL EVOLUTION adds significant processing time. LONG DURATIONS with high density can be slow — monitor grain count in info window.

Dynamic Evolution Theory

Evolution Functions

Time Normalization

⏱️ Time Normalization

Normalized time: t_norm = t / duration

Where: t = current time (0 to duration)

duration = total sound length

Result: t_norm ∈ [0, 1] (start to end)

Purpose: Makes evolution functions independent of absolute duration

Same evolution curve works for any duration

5-second and 30-second versions have same proportional evolution

Density Evolution

Linear density evolution: current_density(t) = initial_density + (final_density - initial_density) × t_norm Where: t_norm = t / duration (normalized time) initial_density = grains/sec at start final_density = grains/sec at end Examples: 1. Build-up: initial=20, final=200 Starts sparse (20 grains/sec), ends dense (200 grains/sec) 2. Decay: initial=150, final=30 Starts dense, ends sparse 3. Constant: initial=final=80 Static density throughout Grain timing: Grains placed at random times (uniform distribution) Average density determined by current_density at that time No correlation between grain time and evolution calculation
Density Evolution Examples
Build-up (20 → 200 grains/sec)
Decay (150 → 30 grains/sec)
Constant (80 grains/sec)
Arc (30 → 180 → 50 grains/sec)

Frequency Evolution

Exponential frequency evolution: current_freq(t) = base_frequency × 2^(frequency_evolution_speed × t_norm) Where: base_frequency = frequency at t=0 (start) frequency_evolution_speed = controls rate of change t_norm = normalized time (0 to 1) Interpretation: frequency_evolution_speed = number of octaves change over duration Examples: speed = 1.0: rises 1 octave (2× frequency) from start to end speed = 0.5: rises half octave (√2 ≈ 1.414× frequency) speed = 2.0: rises 2 octaves (4× frequency) speed = -1.0: falls 1 octave (½ frequency) speed = 0.0: constant frequency Musical interpretation: Positive speed: rising tension, build-up Negative speed: falling resolution, decay Zero speed: stable tonality
Frequency Evolution (Exponential)
Rising tension: speed = 1.5 (1.5 octaves up)
Falling resolution: speed = -1.0 (1 octave down)
Moderate rise: speed = 0.7 (0.7 octaves up)
Stable: speed = 0.0 (constant frequency)

Grain Parameter Evolution

Amplitude Evolution

Preset-specific amplitude envelopes: General form: grain_amp = A × (1 - t_norm^B) Where: A = maximum amplitude (preset-specific: 0.3-0.7) B = decay exponent (preset-specific: 0.3-0.8) t_norm = normalized grain time Preset examples: Gentle Bloom: 0.4 × (1 - t_norm^0.5) // Slow decay Storm Build: 0.7 × (1 - t_norm^0.8) // Faster decay Cosmic Drift: 0.5 × (1 - t_norm^0.3) // Very slow decay Whisper Cloud: 0.3 × (1 - t_norm^0.6) // Medium decay Interpretation: B < 0.5: amplitude stays high for longer B > 0.7: amplitude decays quickly Creates amplitude arc that complements density/frequency evolution

Duration Evolution

Grain duration ranges by preset: General: grain_dur = min + range × random() Preset ranges: Gentle Bloom: 0.03-0.11s (medium-long grains) Storm Build: 0.01-0.05s (very short grains) Cosmic Drift: 0.05-0.17s (long grains) Digital Cascade: 0.02-0.08s (short-medium) Whisper Cloud: 0.04-0.14s (medium-long) Effect on texture: Short grains (0.01-0.05s): crisp, granular, noisy Medium grains (0.03-0.10s): balanced, natural Long grains (0.05-0.20s): smooth, tonal, drone-like Frequency correlation: Higher frequencies often paired with shorter grains Lower frequencies often paired with longer grains Creates coherent spectral evolution

Total Grain Calculation

Estimating Total Grains

Average density approach: average_density = (initial_density + final_density) / 2 total_grains = round(average_density × duration) Exact integral (linear evolution): If density(t) = a + (b-a)×t/duration Total grains = ∫₀ᵈᵘʳᵃᵗⁱᵒⁿ density(t) dt = duration × (a+b)/2 Same as average method for linear evolution Example: duration = 10s, initial=20, final=200 average = (20+200)/2 = 110 grains/sec total_grains = 110 × 10 = 1100 grains Memory considerations: Each grain stores: time, frequency, amplitude, duration (4 values) 1100 grains × 4 × 8 bytes = ~35KB (negligible) Pre-generation efficient for thousands of grains

Evolution Visualization

TIME: 0% ──────────────────────────────────────────────→ 100%

DENSITY: ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
Sparse → Dense (linear progression)

FREQUENCY: ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
Low → High (exponential rise)

AMPLITUDE: ████████████████████████████████████████████████████
Loud → Soft (power-law decay)

GRAIN DURATION: ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
Random within preset range

SPATIAL WIDTH: ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
Narrow → Wide (time-varying)

Result: Multi-dimensional evolution creates complex narrative arc

Preset Evolutions

Preset Overview

1 Custom

User-defined evolution

Arc: User-controlled

2 Gentle Bloom

Slow, organic growth

Arc: Sparse→Moderate

3 Storm Build

Intense crescendo

Arc: Moderate→Intense

4 Cosmic Drift

Slow atmospheric shift

Arc: Very sparse→Sparse

5 Digital Cascade

Fast digital build

Arc: Dense→Very dense

6 Organic Growth

Natural expansion

Arc: Moderate→Dense

7 Harmonic Swarm

Focused frequency band

Arc: Dense→Very dense

8 Metallic Storm

Extreme density build

Arc: Dense→Extreme

9 Whisper Cloud

Quiet, delicate evolution

Arc: Very sparse→Sparse

Preset Details

🌸 Gentle Bloom (Preset 2)

Evolution character: Slow, organic growth like flowers opening

Parameters:

  • Base frequency: 80 Hz (warm, bass-oriented)
  • Initial density: 15 grains/sec (very sparse start)
  • Final density: 60 grains/sec (moderate density)
  • Frequency evolution speed: 0.5 (gentle half-octave rise)

Grain characteristics:

  • Frequency: base × (0.9-1.1) (narrow variation)
  • Amplitude: 0.4 × (1 - t^0.5) (slow decay)
  • Duration: 0.03-0.11s (medium-long grains)

Narrative arc: Begins with isolated, warm tones that gradually multiply and rise gently in pitch, creating a sense of organic growth and emergence.

Best for: Natural environments, gentle transitions, meditative backgrounds

🌩️ Storm Build (Preset 3)

Evolution character: Intense crescendo like approaching storm

Parameters:

  • Base frequency: 100 Hz (mid-range tension)
  • Initial density: 20 grains/sec (moderate start)
  • Final density: 200 grains/sec (very dense climax)
  • Frequency evolution speed: 1.2 (strong 1.2-octave rise)

Grain characteristics:

  • Frequency: base × (0.7-1.3) (wide variation)
  • Amplitude: 0.7 × (1 - t^0.8) (fast decay)
  • Duration: 0.01-0.05s (very short grains)

Narrative arc: Starts with ominous rumbles that rapidly increase in density and pitch, creating intense tension and climax in a dense granular storm.

Best for: Tension builds, dramatic transitions, intense film scenes

🌌 Cosmic Drift (Preset 4)

Evolution character: Slow, atmospheric spatial drift

Parameters:

  • Base frequency: 60 Hz (deep, sub-bass)
  • Initial density: 10 grains/sec (extremely sparse)
  • Final density: 80 grains/sec (still sparse)
  • Frequency evolution speed: 2.0 (dramatic 2-octave rise)

Grain characteristics:

  • Frequency: base × (0.5-1.5) (very wide variation)
  • Amplitude: 0.5 × (1 - t^0.3) (very slow decay)
  • Duration: 0.05-0.17s (long grains)

Narrative arc: Deep, isolated tones slowly multiply and rise dramatically through frequency space, creating sense of vast cosmic movement and spatial travel.

Best for: Space/sci-fi atmospheres, deep ambient, spatial effects

💻 Digital Cascade (Preset 5)

Evolution character: Fast, digital accumulation like data stream

Parameters:

  • Base frequency: 180 Hz (bright, digital)
  • Initial density: 40 grains/sec (already dense)
  • Final density: 180 grains/sec (extremely dense)
  • Frequency evolution speed: 1.5 (strong 1.5-octave rise)

Grain characteristics:

  • Frequency: base × (0.8-1.2) (moderate variation)
  • Amplitude: 0.6 × (1 - t^0.7) (medium decay)
  • Duration: 0.02-0.08s (short-medium grains)

Narrative arc: Starts with bright digital texture that rapidly accumulates into dense data cascade, rising in pitch for sense of digital overload or information flood.

Best for: Digital interfaces, data visualization, cyberpunk scenes

🌿 Organic Growth (Preset 6)

Evolution character: Natural, biological growth process

Parameters:

  • Base frequency: 90 Hz (natural, earthy)
  • Initial density: 25 grains/sec (moderate start)
  • Final density: 100 grains/sec (rich density)
  • Frequency evolution speed: 0.8 (moderate rise)

Grain characteristics:

  • Frequency: base × (0.8-1.4) (organic variation)
  • Amplitude: 0.6 × (1 - t^0.7) (balanced decay)
  • Duration: 0.02-0.06s (balanced grains)

Narrative arc: Natural-sounding texture grows steadily in density and rises gently in pitch, like biological expansion or ecological development.

Best for: Nature documentaries, organic interfaces, growth metaphors

🐝 Harmonic Swarm (Preset 7)

Evolution character: Focused frequency band swarm

Parameters:

  • Base frequency: 110 Hz (harmonic, musical)
  • Initial density: 35 grains/sec (dense start)
  • Final density: 120 grains/sec (very dense)
  • Frequency evolution speed: 1.0 (exact octave rise)

Grain characteristics:

  • Frequency: base × (0.8-1.4) (musical variation)
  • Amplitude: 0.6 × (1 - t^0.7) (standard decay)
  • Duration: 0.02-0.06s (focused grains)

Narrative arc: Harmonic texture starts dense and becomes even denser while rising exactly one octave, creating musical swarm effect with clear pitch center.

Best for: Musical textures, harmonic backgrounds, tuned effects

⚡ Metallic Storm (Preset 8)

Evolution character: Extreme metallic density build

Parameters:

  • Base frequency: 140 Hz (metallic, bright)
  • Initial density: 50 grains/sec (very dense start)
  • Final density: 250 grains/sec (extreme density)
  • Frequency evolution speed: 1.8 (near 2-octave rise)

Grain characteristics:

  • Frequency: base × (0.8-1.4) (metallic variation)
  • Amplitude: 0.6 × (1 - t^0.7) (standard decay)
  • Duration: 0.02-0.06s (metallic grains)

Narrative arc: Starts as dense metallic texture and builds to extreme density with dramatic pitch rise, creating overwhelming metallic storm effect.

Best for: Industrial scenes, mechanical overload, extreme tension

☁️ Whisper Cloud (Preset 9)

Evolution character: Delicate, quiet evolution

Parameters:

  • Base frequency: 70 Hz (soft, subtle)
  • Initial density: 8 grains/sec (extremely sparse)
  • Final density: 40 grains/sec (still very sparse)
  • Frequency evolution speed: 0.3 (very gentle rise)

Grain characteristics:

  • Frequency: base × (0.8-1.1) (narrow, delicate)
  • Amplitude: 0.3 × (1 - t^0.6) (quiet, medium decay)
  • Duration: 0.04-0.14s (long, smooth grains)

Narrative arc: Extremely sparse, quiet texture that gently increases in density and very slightly rises in pitch, like distant whispers gradually becoming audible.

Best for: Subtle backgrounds, delicate transitions, whisper effects

Spatial Modes

Spatial Processing Overview

🎧 Spatial Evolution Concept

Key innovation: Spatial processing evolves over time alongside density/frequency

Unlike static stereo: Width, balance, filtering change systematically

Synchronized evolution: Spatial changes complement sonic evolution

Psychoacoustic effect: Creates immersive, moving sound field

Implementation: Different amplitude/filtering for L/R that changes over time

Spatial Mode Details

🔊 Mono (Mode 1)

Processing: No spatial processing

Characteristics: Centered, focused, mono-compatible

Evolution: None (static mono)

Best for: Further processing, mono systems, simple applications

Implementation: Direct output with no modification

🔄 Stereo Evolution (Mode 2)

Concept: Stereo image evolves from left-focused to right-focused

Left channel evolution: 0.8 → 0.5 (decreases over time)

Right channel evolution: 0.5 → 0.8 (increases over time)

Filtering:

  • Left: 0-3500 Hz (fuller low-mid)
  • Right: 100-6000 Hz (brighter)

Evolution formula:

Left: "self * (0.8 - 0.3 * (x/duration))" Right: "self * (0.5 + 0.3 * (x/duration))"

Narrative: Sound gradually moves from left to right while brightening

Best for: Moving textures, panoramic sweeps, evolving spaces

🌀 Rotating Cloud (Mode 3)

Concept: Sound rotates in stereo field with accelerating rotation

Left channel: 0.5 + 0.4×cos(2π×0.1×x×(1+x/duration))

Right channel: 0.5 + 0.4×sin(2π×0.1×x×(1+x/duration))

Rotation rate: Starts at 0.1 Hz, accelerates to 0.2 Hz by end

Phase relationship: 90° difference (cos vs sin) creates circular rotation

Evolution formula:

Left: "self * (0.5 + 0.4 * cos(2*pi*0.1*x * (1 + x/duration)))" Right: "self * (0.5 + 0.4 * sin(2*pi*0.1*x * (1 + x/duration)))"

Narrative: Sound swirls around listener with increasing speed

Best for: Spinning effects, vortex sounds, dynamic movement

🌊 Wide Field (Mode 4)

Concept: Stereo field widens over time with frequency separation

Left channel evolution: 0.7 → 0.5 (decreases slightly)

Right channel evolution: 0.5 → 0.8 (increases significantly)

Filtering:

  • Left: 0-2000 Hz (low-mid focused, narrow)
  • Right: 200-7000 Hz (wide bright range)

Evolution formula:

Left: "self * (0.7 - 0.2 * (x/duration))" Right: "self * (0.5 + 0.3 * (x/duration))"

Narrative: Sound starts centered, widens significantly with highs moving right

Best for: Expanding textures, opening up spaces, wide cinematic effects

Spatial Evolution Visualization

Stereo Evolution (Mode 2)
Left Channel
0.8 → 0.5 amplitude
Right Channel
0.5 → 0.8 amplitude
Rotating Cloud (Mode 3)
Rotation accelerates over time
Wide Field (Mode 4)
Left (Narrow)
0-2000 Hz, 0.7→0.5
Right (Wide)
200-7000 Hz, 0.5→0.8

Chunking Optimization

The Chunking Strategy

⚡ Ultra-Fast Performance Architecture

Chunk duration: 1.5 seconds (optimized balance)

Grains per chunk limit: 40 grains (prevents formula overflow)

Calculation: 40 grains × ~150 chars = ~6,000 characters (safe)

Praat limit: ~1,000,000 characters practical

Safety margin: 166× safety factor (6K vs 1M)

Performance benefit: Many small formulas instead of one huge formula

Memory benefit: Smaller strings in memory during synthesis

Chunking Algorithm

DYNAMIC CHUNKING ALGORITHM:

chunk_duration = 1.5 seconds
num_chunks = ceil(total_duration / chunk_duration)
max_grains_per_chunk = 40

For chunk = 1 to num_chunks:
chunk_start = (chunk-1) × chunk_duration
chunk_end = min(chunk × chunk_duration, total_duration)
chunk_formula$ = "0"
grains_in_chunk = 0

For each pre-generated grain:
If grain_time in [chunk_start, chunk_end):
If grains_in_chunk < max_grains_per_chunk:
# Build grain term
local_time = grain_time - chunk_start
term$ = "+if x>=" + local_time$ + " and x<" + end$ +
" then " + amp$ + "*sin(2*pi*" + freq$ + "*x)*" +
"sin(pi*(x-" + local_time$ + ")/" + dur$ + ") else 0 fi"
chunk_formula$ = chunk_formula$ + term$
grains_in_chunk = grains_in_chunk + 1
Else:
# Skip remaining grains (safety limit)
Continue to next chunk

Create Sound from formula: chunk_formula$

Concatenate all chunks → final sound

Grain Distribution Considerations

Grain skipping in dense evolutions:
Problem: High final densities may exceed 40 grains/1.5s limit
Example: Final density = 200 grains/sec
1.5s chunk should have ~300 grains, but limited to 40
Effect: Only 40 grains included, rest skipped
Audible result: Texture less dense than expected in later chunks
Solution: Reduce final_density or increase chunk_duration in script
Calculation: Max supported density = 40/1.5 ≈ 26.7 grains/sec per chunk
Note: Random timing means actual grains per chunk varies

Concatenation Process

Chunk concatenation: # Select first chunk selectObject: "Sound C1" # Add remaining chunks for chunk from 2 to num_chunks plusObject: "Sound C" + string$(chunk) endfor # Concatenate all final_id = Concatenate Rename: "stochastic_output" # Cleanup chunks for chunk from 1 to num_chunks removeObject: "Sound C" + string$(chunk) endfor Praat's Concatenate function: - Joins sounds end-to-end - Maintains sample rate - No crossfade (sharp boundaries) - Boundaries at chunk edges (1.5s intervals) - Grain envelopes prevent clicks at boundaries Alternative approach: Could use Formula to sum chunks at overlapping positions But concatenation is simpler and preserves phase continuity

Performance Analysis

ScenarioDurationAvg DensityTotal GrainsChunksGrains/ChunkPerformance
Gentle Bloom6s37.52254~56Fast (some skipping)
Storm Build6s1106604~165Medium (heavy skipping)
Whisper Cloud10s242407~34Very fast
Metallic Storm8s15012006~200Slow (extreme skipping)
Custom Dense15s200300010~300Very slow (severe skipping)

Parameters & Effects

Core Evolution Parameters

ParameterTypeDefaultRangeDescription
Durationreal6.01-30 secondsTotal evolution time length
Base_frequencyreal12020-500 HzStarting frequency at time 0
Initial_densityreal301-100 grains/secGrains per second at start
Final_densityreal1501-300 grains/secGrains per second at end
Frequency_evolution_speedreal1.0-2.0 to 3.0Octaves change over duration (2^speed)

Mode Selection Parameters

ParameterTypeOptionsDescription
PresetoptionmenuCustom + 8 evolution presetsPre-defined evolution characteristics
Spatial_modeoptionmenuMono, Stereo Evolution, Rotating Cloud, Wide FieldSpatial processing with time evolution
Play_afterboolean0/1Auto-play result after processing

Parameter Interaction Guide

Duration vs Evolution Speed:
  • Short duration (1-3s): Quick, dramatic changes
  • Medium duration (3-10s): Natural evolution, good for most applications
  • Long duration (10-30s): Gradual, subtle evolution
  • Evolution speed perception: Speed/Duration ratio matters
  • Example: speed=2.0 over 2s = very fast, over 20s = very slow

Consider evolution rate = speed/duration for consistent perception

Density Range Design:
  • Sparse texture: 1-30 grains/sec (isolated events)
  • Medium texture: 30-100 grains/sec (continuous texture)
  • Dense texture: 100-200 grains/sec (thick cloud)
  • Extreme texture: 200-300 grains/sec (noise-like)
  • Practical limit: 40 grains/1.5s chunk = ~26.7 grains/sec supported
  • Higher densities: Grains skipped, texture less dense than expected

For very dense textures, increase chunk_duration in script or accept skipping

Frequency Evolution Design:
  • Falling tension (negative speed): -2.0 to -0.2 (resolution, decay)
  • Stable: -0.2 to 0.2 (minimal change)
  • Rising tension (positive speed): 0.2 to 3.0 (build-up, intensity)
  • Octave interpretation: speed=1.0 = 2× frequency (one octave up)
  • Musical intervals: speed=0.5 ≈ tritone, speed=0.33 ≈ minor third
  • Extreme ranges: >2.0 can create very high frequencies

Combine with base_frequency for desired pitch range

Preset Parameter Summary

PresetBase FreqInitial DensityFinal DensitySpeedDensity RatioOctave Change
Gentle Bloom8015600.54.0×0.5 oct
Storm Build100202001.210.0×1.2 oct
Cosmic Drift6010802.08.0×2.0 oct
Digital Cascade180401801.54.5×1.5 oct
Organic Growth90251000.84.0×0.8 oct
Harmonic Swarm110351201.03.4×1.0 oct
Metallic Storm140502501.85.0×1.8 oct
Whisper Cloud708400.35.0×0.3 oct

Applications

Film & Video Sound Design

Use case: Create tension builds, transitions, atmospheric evolution

Technique: Match evolution arc to visual narrative

Examples:

Music Production

Use case: Evolving pads, risers, transition effects

Technique: Sync evolution duration to musical timing

Workflow:

Game Audio

Use case: Dynamic environments, spell charging, UI feedback

Technique: Parameter control for game state

Applications:

Generative Art & Installations

Use case: Never-repeating evolving soundscapes

Technique: Long durations, parameter randomization

Advantages: Deterministic yet complex, parameter control

Therapeutic & Meditative Audio

Use case: Guided meditation, focus enhancement, relaxation

Technique: Gentle evolution, slow changes, soothing frequencies

Examples:

Practical Workflow Examples

🎬 Film: Tension Build Before Reveal

Scene: 10-second shot building to monster reveal

Settings:

  • Preset: Storm Build (modified)
  • Duration: 10 seconds (match shot length)
  • Base frequency: 90 Hz (ominous low end)
  • Initial density: 15 → Final: 180 (dramatic increase)
  • Frequency speed: 1.5 (rising tension)
  • Spatial mode: Stereo Evolution (sound moves right)

Integration: Start quiet, peak at reveal moment with hit sound

Result: Intense tension build that culminates at exact reveal moment

🎵 Music: 8-Bar Riser Before Drop

Context: Electronic track at 128 BPM, 8-bar buildup

Settings:

  • Duration: (8×4×60)/128 = 15 seconds (8 bars at 128 BPM)
  • Preset: Digital Cascade
  • Base frequency: 110 Hz (musical A)
  • Initial density: 30 → Final: 160
  • Frequency speed: 2.0 (2-octave rise to drop key)
  • Spatial mode: Rotating Cloud (spinning effect)

Processing: Add high-pass filter sweep, side-chain to kick

Result: Perfectly timed riser that leads exactly into drop

🎮 Game: Spell Charging Effect

Mechanic: Player holds button to charge spell, 3 charge levels

Implementation: Generate 3 versions with different endpoints

  • Level 1 (quick): Duration=1s, Final density=60
  • Level 2 (medium): Duration=2s, Final density=120
  • Level 3 (full): Duration=3s, Final density=200

Common settings: Preset=Metallic Storm, Base=140Hz, Speed=1.5

Game integration: Play corresponding sound based on charge time

Result: Audio feedback that clearly indicates charge level

Advanced Techniques

Parameter automation through scripting:
  • Multi-section evolution: Generate multiple sounds with different parameter sets
  • Crossfade composition: Blend between different evolution stages
  • Real-time parameter control: Modify script for interactive control
  • External data mapping: Use data (MIDI, OSC, sensor) to control parameters

Script can be modified for dynamic parameter changes during evolution

Spatial layering techniques:
  • Multi-channel evolution: Different evolution for each speaker
  • Height channel evolution: Add vertical movement (for surround systems)
  • Distance simulation: Evolution includes near→far or far→near
  • Complex trajectories: Custom spatial paths through 3D space

Spatial processing can be extended for immersive audio formats

Hybrid synthesis approaches:
  • Evolution + samples: Use evolving parameters to process samples
  • Multi-evolution layers: Different evolutions for different frequency bands
  • Feedback evolution: Output feeds back to influence evolution parameters
  • Cross-modal evolution: Sync with visual or other media evolution

Evolution synthesis as control source for other processes

Troubleshooting Common Issues

Problem: Evolution too fast/slow
Causes: Speed/duration mismatch, extreme parameter values
Solutions: Adjust speed parameter, change duration, use presets as reference
Problem: Texture too sparse at end (skipping)
Causes: Final density too high, exceeds chunk grain limit
Solutions: Reduce final density, increase chunk_duration in script, accept skipping
Problem: Frequency range unpleasant or extreme
Causes: Speed too high, base frequency inappropriate
Solutions: Reduce speed, adjust base frequency, use milder presets
Problem: Spatial effects too extreme or unnatural
Causes: Spatial mode too aggressive for material
Solutions: Use Mono mode, milder spatial mode, custom spatial processing
Problem: Processing very slow
Causes: High grain count, many chunks, spatial processing
Solutions: Reduce parameters, be patient, use faster computer

Creative Parameter Explorations

ExplorationParameter SettingsExpected ResultCreative Use
Reverse evolutionInitial>Final density, speed negativeTexture decays and falls in pitchResolution effects, endings
Arc evolutionGenerate multiple sectionsBuild then decay narrative arcComplete story sounds
Micro-evolutionDuration=0.5s, extreme parametersUltra-fast transformation burstImpact sounds, stings
Static textureInitial=Final, speed=0Constant granular textureBackground beds, sustained tones
Spatial focus shiftCombine different spatial modesComplex 3D movementImmersive environments

Technical Implementation Details

Grain Formula Optimization

Simplified Sine Envelope

Grain formula in chunks: " + if x >= start and x < end then amp * sin(2*pi*freq*x) * sin(pi*(x-start)/dur) else 0 fi" Sine envelope vs Hanning: sin(π·(x-start)/dur) for 0 ≤ (x-start) ≤ dur Properties: - sin(0) = 0 (starts at zero) - sin(π/2) = 1 (peak at middle) - sin(π) = 0 (ends at zero) - Smooth fade in/out - Simpler than Hanning: (1-cos(2π·(x-start)/dur))/2 Phase continuity: sin(2*pi*freq*x) uses absolute time x Maintains phase across chunk boundaries No phase jumps between chunks Performance: Simpler formula = shorter string = more grains possible sin() instead of (1-cos())/2 saves ~20 characters per grain

Parameter Pre-generation Algorithm

PARAMETER PRE-GENERATION:

total_grains = round(average_density × duration)

For i = 1 to total_grains:
# Random time placement
t = randomUniform(0, duration)
normalized_time = t / duration

# Current evolution state
current_density = initial + (final-initial) × normalized_time
current_freq = base × 2^(speed × normalized_time)

# Preset-specific variations
If preset = GentleBloom:
freq_variation = 0.9 + 0.2×random()
amp = 0.4 × (1 - normalized_time^0.5)
dur = 0.03 + 0.08×random()
Elsif preset = StormBuild:
freq_variation = 0.7 + 0.6×random()
amp = 0.7 × (1 - normalized_time^0.8)
dur = 0.01 + 0.04×random()
# ... other presets

grain_freq[i] = current_freq × freq_variation
grain_amp[i] = amp × 0.15 # Overall scaling
grain_time[i] = t
grain_dur[i] = dur
End For

Key insight: All parameters computed before synthesis
No chaotic systems, simple deterministic evolution

Spatial Processing Implementation

Time-Varying Spatial Formulas

Stereo Evolution (Mode 2): Left channel: Formula: "self * (0.8 - 0.3 * (x/duration))" Filter: 0-3500 Hz, 100 Hz smoothing Right channel: Formula: "self * (0.5 + 0.3 * (x/duration))" Filter: 100-6000 Hz, 100 Hz smoothing Implementation details: - duration variable converted to string: s_dur$ = fixed$(duration, 6) - Formula string built: "self * (0.8 - 0.3 * (x/" + s_dur$ + "))" - Filter uses Hann band for smooth transitions - 0.8 and 0.5 coefficients prevent clipping when summed (~1.3 max) - Linear evolution complements linear density evolution Rotating Cloud (Mode 3): Left: "self * (0.5 + 0.4 * cos(2*pi*0.1*x * (1 + x/duration)))" Right: "self * (0.5 + 0.4 * sin(2*pi*0.1*x * (1 + x/duration)))" Accelerating rotation: 0.1 Hz × (1 + x/duration) Starts at 0.1 Hz (10s period), ends at 0.2 Hz (5s period) 90° phase difference creates circular motion

Performance Optimization Details

Why Pre-generation is Efficient

Advantages of parameter pre-generation:
  • Separation: Evolution calculation separate from synthesis
  • Efficiency: Compute once, not during formula building
  • Flexibility: Can modify parameters before synthesis
  • Debugging: Can inspect parameter arrays
  • Memory: Arrays (4×total_grains) smaller than formula strings
  • Deterministic: Same parameters = same evolution

Memory example: 1000 grains × 4 parameters × 8 bytes = 32KB (negligible)

Chunk Size Optimization

Chunk duration optimization: chunk_duration = 1.5 seconds (not 2.0 as in chaotic script) Why 1.5 seconds? 1. Shorter chunks = smaller formulas = less memory 2. But too short = many chunks = overhead 3. 1.5s balances these factors Grains per chunk limit: max_grains_per_chunk = 40 (not 30 as in chaotic script) Why 40 grains? 40 × ~150 characters = ~6,000 characters Well within Praat's ~1,000,000 character limit Safety factor: 166× (6K vs 1M) Maximum supported density: 40 grains / 1.5 seconds = ~26.7 grains/sec per chunk But: random timing means actual varies And: grains may be concentrated in part of chunk Practical: up to ~50 grains/sec may work Higher densities: grains skipped