Brownian Motion Texture Generator — User Guide
Generates granular textures using Brownian motion for temporal and spatial positioning, creating evolving soundscapes with natural stochastic movement.
What this does
This script implements Brownian motion granular synthesis — a stochastic approach to texture generation using random walks for grain positioning. Unlike regular granular synthesis with fixed spacing, this method uses: (1) Temporal Brownian motion: Grain timing follows random walk with drift. (2) Spatial Brownian motion: Stereo panning follows independent random walk. (3) Natural clustering: Grains naturally cluster and disperse over time. (4) Stochastic density: Irregular spacing creates organic textures. Process extracts short grains from source sound, positions them using Brownian motion in time and space, mixes into evolving stereo texture. Result: natural-sounding textures with emergent patterns and organic movement rather than mechanical repetition.
Key Features:
- 6 Built-in Presets — Dense Cloud, Sparse Field, Wild Drift, Subtle Shimmer, Rhythmic Pulse, Frozen Moment
- Dual Brownian Motion — Independent control of temporal and spatial randomness
- Natural Clustering — Grains naturally form clusters and voids over time
- Stereo Spatialization — Constant-power panning with Brownian motion
- Organic Textures — Emergent patterns from stochastic processes
- Flexible Source Material — Works with any sound as grain source
Technical Implementation: (1) Source preparation: Extract grains from input sound with specified duration. (2) Temporal Brownian motion: Base grain time = regular spacing + accumulated random steps. Random step = Gaussian(mean=time_drift, std=time_step_size). (3) Spatial Brownian motion: Pan position follows independent random walk. Random step = Gaussian(mean=spatial_drift, std=spatial_step_size). (4) Grain processing: Apply fades, amplitude scaling, constant-power panning. (5) Granular mixing: Add grains to output buffer at calculated positions. (6) Final processing: Apply global fade-out, normalize peak. Key insight: Two independent Brownian motions (temporal and spatial) create complex emergent behavior from simple stochastic processes. Clustering occurs naturally due to random walk properties.
Quick start
- In Praat, select exactly one Sound object as grain source.
- Run script… →
brownian_motion_texture.praat. - Choose Preset or select "Custom" to specify all parameters manually.
- Adjust Grain_duration (typical 0.03-0.15s for texture).
- Set Output_duration and Density (grains per second).
- Configure Temporal Brownian motion parameters.
- Enable/configure Spatial Brownian motion for stereo movement.
- Set general parameters (amplitude, fades, grain positioning).
- Click OK — texture generated, result named "originalname_brownian".
Brownian Motion Theory
Brownian Motion Fundamentals
Mathematical Definition
Brownian motion (random walk):
Why Brownian Motion for Granular Synthesis?
Natural clustering behavior:
- Organic textures: Mimics natural particle systems
- Emergent rhythms: Clusters create implicit rhythmic patterns
- Smooth evolution: Gradual movement between regions
- Memory effects: Current density depends on recent history
Vs other random distributions:
- Uniform random: Even spreading, no clustering
- Gaussian random: Central clustering but no temporal coherence
- Brownian motion: Natural clustering with smooth evolution
Temporal Brownian Motion
Time Positioning Algorithm
Grain timing calculation:
Temporal Clustering Behavior
Emergent temporal patterns:
Gentle clustering, mostly regular spacing with slight variations
Result: Smooth texture with subtle density variations
Medium time_step_size (0.1-0.2):
Clear clustering, distinct dense and sparse regions
Result: Pulsating texture with evolving density
Large time_step_size (0.3+):
Strong clustering, most grains in beginning/end
Result: Burst-like texture with central void
With time_drift ≠ 0:
Systematic migration of clusters over time
Result: Evolving texture with directional movement
Spatial Brownian Motion
Stereo Panning Algorithm
Spatial positioning calculation:
Spatial Evolution Patterns
Stereo field behavior:
Gentle panning movement, mostly centered with slight wandering
Result: Subtle stereo animation, stable image
Medium spatial_step_size (0.15-0.25):
Clear panning movement, explores stereo field naturally
Result: Organic spatial evolution, natural movement
Large spatial_step_size (0.3+):
Rapid panning jumps, extreme left-right movements
Result: Dramatic spatial effects, potentially disorienting
With spatial_drift ≠ 0:
Systematic migration across stereo field
Result: Panoramic sweeps, directional spatial movement
Complete Processing Pipeline
Texture Presets
Preset Characteristics
🌫️ Texture Type Selection
Range: Dense cloud-like to sparse open textures
Character: Pre-configured combinations for specific texture types
Best for: Quick exploration, consistent texture qualities
Built-in presets:
| Preset | Grain Duration | Density | Time Step | Spatial Step | Texture Character |
|---|---|---|---|---|---|
| Dense Cloud | 0.03s | 40 Hz | 0.08 | 0.20 | Thick, cloud-like, active stereo |
| Sparse Field | 0.15s | 8 Hz | 0.20 | 0.10 | Open, spacious, gentle movement |
| Wild Drift | 0.06s | 25 Hz | 0.25 | 0.30 | Active, unpredictable, dramatic pans |
| Subtle Shimmer | 0.04s | 30 Hz | 0.05 | 0.08 | Delicate, shimmering, subtle motion |
| Rhythmic Pulse | 0.08s | 15 Hz | 0.02 | 0.25 | Pulsing, rhythmic, spatial jumps |
| Frozen Moment | 0.40s | 6 Hz | 0.15 | 0.12 | Long grains, sparse, glacial movement |
| Custom | User | User | User | User | Full parameter control |
Preset Applications
🎵 Sound Design Applications
Dense Cloud: Thick backgrounds, atmospheric pads, noise textures
Sparse Field: Ambient spaces, environmental backgrounds, subtle atmospheres
Wild Drift: Experimental textures, chaotic environments, special effects
Subtle Shimmer: Delicate accents, magical effects, light reflections
Rhythmic Pulse: Rhythmic textures, percussive backgrounds, pulse waves
Frozen Moment: Drone textures, frozen time effects, ambient drones
Parameters
Basic Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| Preset | option | Custom | 6 texture presets + Custom |
| Grain_duration_(s) | positive | 0.05 | Duration of individual grains |
| Output_duration_(s) | positive | 10.0 | Total duration of output texture |
| Density_(grains/s) | positive | 20 | Grains per second (base density) |
Temporal Brownian Motion
| Parameter | Type | Default | Description |
|---|---|---|---|
| Time_step_size_(s) | positive | 0.1 | Standard deviation of time steps |
| Time_drift | real | 0.0 | Systematic drift in time (s/step) |
Spatial Brownian Motion
| Parameter | Type | Default | Description |
|---|---|---|---|
| Enable_spatial_brownian | boolean | 1 (on) | Enable stereo panning Brownian motion |
| Spatial_step_size | positive | 0.15 | Standard deviation of pan steps |
| Spatial_drift | real | 0.0 | Systematic drift in pan position |
General Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| Amplitude_scaling | positive | 0.7 | Grain amplitude multiplier |
| Random_grain_positions | boolean | 1 (on) | Random vs systematic source exploration |
| Fade_duration_(s) | positive | 0.005 | Grain fade in/out duration |
| Fade_out_time_(s) | positive | 2.0 | Global output fade-out duration |
Applications
Sound Design Textures
Use case: Creating evolving background textures and atmospheres
Technique: Use noisy or complex sounds as source with medium-high density
Example: "Dense Cloud" with noise source for thick atmospheric pad
Environmental Soundscapes
Use case: Naturalistic environmental backgrounds
Technique: Use field recordings with sparse settings
Example: "Sparse Field" with forest recording for ambient background
Experimental Music
Use case: Evolving texture-based compositions
Technique: Multiple layers with different Brownian parameters
Workflow:
- Layer 1: "Dense Cloud" for foundation
- Layer 2: "Wild Drift" for movement
- Layer 3: "Subtle Shimmer" for highlights
- Different source sounds for each layer
Film and Game Audio
Use case: Dynamic background textures for scenes/environments
Advantages:
- Continuous evolution avoids repetition
- Spatial movement enhances immersion
- Natural clustering creates organic feel
- Flexible duration for any scene length
Example: Spaceship interior with mechanical source sounds
Installation Art
Use case: Continuous evolving sound for spaces
Technique: Long output durations with subtle parameters
Application: Gallery soundscapes, architectural sound
Practical Workflow Examples
🎬 Sci-Fi Spaceship Interior
Goal: Complex mechanical background with spatial movement
Settings:
- Source: Mechanical sounds, servo motors, electrical hum
- Preset: Dense Cloud (modified)
- Grain duration: 0.04s
- Density: 35 Hz
- Time step: 0.12 (moderate clustering)
- Spatial step: 0.18 (active but controlled movement)
- Output: 30.0s (loopable)
Result: Believable spaceship interior atmosphere
🌲 Forest Ambience
Goal: Natural forest background with subtle movement
Settings:
- Source: Forest recording with birds, leaves, distant sounds
- Preset: Sparse Field
- Grain duration: 0.2s (longer for recognizability)
- Density: 6 Hz (very sparse)
- Time step: 0.25 (strong clustering for natural distribution)
- Spatial step: 0.08 (gentle stereo movement)
- Output: 60.0s (extended ambience)
Result: Naturalistic forest environment
⚡ Experimental Texture
Goal: Unpredictable, evolving texture for experimental music
Settings:
- Source: Complex synthesized sounds, noise bursts
- Preset: Wild Drift
- Grain duration: 0.1s
- Density: 20 Hz
- Time step: 0.4 (extreme clustering)
- Spatial step: 0.35 (rapid panning movement)
- Time drift: 0.01 (gradual forward movement)
- Output: 15.0s
Result: Dynamic, unpredictable texture with directional evolution
Advanced Techniques
- Noisy sounds: Create cloud-like textures (noise, wind, water)
- Transient-rich sounds: Create rhythmic textures (percussion, clicks)
- Tonal sounds: Create harmonic clouds (sustained instruments)
- Complex sounds: Create rich textures (field recordings, complex synths)
- Short sounds: Work best for high-density textures
- Long sounds: Provide more variety but may need longer grain durations
Different source types produce dramatically different textures
- High density + small time step: Thick, smooth texture
- Low density + large time step: Sparse, clustered events
- Short grains + high density: Cloud-like texture
- Long grains + low density: Event-based texture
- Time drift ≠ 0: Directional texture evolution
- Spatial drift ≠ 0: Panoramic sweeps
Troubleshooting Common Issues
Cause: High density with long grains or small time step
Solution: Reduce density, shorten grain duration, increase time step size
Cause: Low density, large time step causing extreme clustering
Solution: Increase density, reduce time step size, check grain clamping
Cause: Large time step size with drift
Solution: Reduce time step size, set time_drift closer to zero
Cause: Large spatial step size
Solution: Reduce spatial step size, enable spatial clamping check
Mathematical Deep Dive
Brownian Motion Properties
Statistical Characteristics
For Brownian motion with drift:
Diffusion and Clustering
Why clustering occurs:
Grain Distribution Analysis
Temporal Distribution Patterns
Different parameter combinations: