Stereo Micro ↔ Macro Time Collapser — User Guide

Electroacoustic composition tool that inverts temporal scales: micro-bursts stretched into sustained textures, slow passages compressed into transient gestures. Stereo decorrelation via parallel granular processing.

Author: Shai Cohen Version: 1.0 (2025) Technique: Time-Scale Inversion + Granular Stereo Application: Praat scripting language
Contents:

What this does

This script implements a Stereo Micro ↔ Macro Time Collapser — an electroacoustic composition tool that performs temporal inversion: very short events (micro-bursts) are stretched into sustained textures, while long, slow passages are compressed into brief transient gestures. The result is a radical transformation of temporal perception, creating new relationships between time scales.

Key Features:

⏱️ What is Time-Scale Inversion?

Time-scale inversion is a compositional technique that exchanges the roles of micro and macro temporal structures:

  • Micro → Macro: Very short events (10-200 ms) are stretched by factors of 5-25×, becoming sustained textures that reveal their internal structure
  • Macro → Micro: Long, slowly evolving passages (0.5-2.0+ seconds) are compressed by factors of 0.05-0.4×, becoming brief transients or gestures

The result: A composition where the original temporal relationships are inverted — what was brief becomes extended, what was extended becomes momentary. This creates a perceptual paradox, allowing listeners to experience sound at two different time scales simultaneously.

Technical Implementation: (1) Intensity Analysis: Extract intensity contour with short window (8-25 ms). (2) Micro-Burst Detection: Identify regions exceeding burst threshold with duration between min/max burst limits. (3) Slow Texture Detection: Identify regions with low intensity variance and shallow slope, duration > slow_min_ms. (4) Stereo Processing: For each channel independently, apply time-stretch/compress with per-channel jitter (±width%) and subtle pitch shift. (5) Interleaving: Assemble transformed segments according to selected mode. (6) Concatenation: Cycle through segment pool with crossfades until target duration reached. (7) Visualization: 7-panel display showing waveforms, spectrograms, segment maps, and duration statistics.

Quick start

  1. In Praat, select exactly one Sound object (mono or stereo).
  2. Run script… → select Stereo_Micro_Macro_Time_Collapser.praat.
  3. Choose Preset (2-7 for specific strategies, 1 for custom).
  4. Set analysis parameters (window sizes, thresholds, min/max durations).
  5. Set transformation parameters (stretch/compress factors, crossfade).
  6. Set stereo width percentage and interleave mode.
  7. Specify target output duration (with maximum cap).
  8. Enable Draw_visualization for comprehensive analysis display.
  9. Click OK — processor analyzes, transforms, and creates stereo output.
Quick tip: Start with Gentle Bloom preset on a short (<10s) recording with varied dynamics. Enable visualization to see how micro-bursts (orange regions) and slow textures (blue regions) are detected. Listen to the output — you'll hear bursts stretched into pads and slow passages compressed into clicks/flurries. For dramatic effect, try Extreme Inversion or Granular Chaos. The output appears as "Stereo_Collapser_Output" in the Objects window.
Important: ANALYSIS ACCURACY depends on window_size relative to material. Percussive music: smaller windows (8-12 ms). Ambient/drone: larger windows (20-25 ms). STRETCH FACTORS > 20× may produce noticeable artifacts (granular texture). COMPRESS FACTORS < 0.1× may cause pitch shift artifacts (formants shift upward). STEREO WIDTH > 30% can cause extreme channel decorrelation (phase issues in mono). TARGET DURATION must be reasonable relative to source — extreme stretching may require many segment cycles. MAX OUTPUT DURATION hard cap prevents runaway processing.

Time-Scale Inversion Theory

The Inversion Principle

Given a sound with segments of varying duration: Micro-bursts: duration d_micro ∈ [min_burst, max_burst] Slow textures: duration d_slow ∈ [min_slow, ∞) Inversion transforms: d'_micro = d_micro × stretch_factor (where stretch_factor > 1) d'_slow = d_slow × compress_factor (where compress_factor < 1) Result: Original shortest events become longest Original longest events become shortest Temporal relationships inverted Example: Original: burst=50ms, slow=2000ms Stretch=12×, Compress=0.15× Transformed: burst=600ms, slow=300ms Now burst is longer than slow — temporal roles reversed

Segmentation Logic

🔍 Micro-Burst Detection

Criteria: intensity > median + burst_threshold_dB

Duration range: micro_burst_min_ms to micro_burst_max_ms

Peak tracking: continues while intensity stays within 3 dB of threshold

Markers: Peak intensity stored for visualization

🔍 Slow Texture Detection

Criteria (both must be true):

  • Variance threshold: std/mean < slow_variance_threshold (lower = more stable)
  • Slope threshold: |ΔdB/Δt| < slow_slope_threshold_dB_per_s (lower = less change)

Minimum duration: slow_min_ms (ensures texture length)

Stereo Decorrelation Mechanism

For each channel independently: 1. Duration Jitter: stretch_factor' = stretch_factor × (1 + random(-width/200, +width/200)) compress_factor' = compress_factor × (1 + random(-width/200, +width/200)) 2. Pitch Shift (subtle): f_shift = random(0.98, 1.02) for bursts f_shift = random(0.99, 1.01) for slow textures Implementation: • Override sampling frequency: sr × f_shift • Resample back to original sr Effect: • Left and right channels develop slightly different timing and pitch • Creates spacious stereo image • Prevents identical L/R signals (avoids mono collapse) • Width% controls amount of decorrelation

Interleave Modes

Mode 1: Alternate burst1, slow1, burst2, slow2, burst3, slow3, ... • Balanced alternation • Ensures both material types are heard regularly Mode 2: Probabilistic For each segment position, choose 50% burst / 50% slow • Unpredictable sequence • May favor one type depending on random distribution Mode 3: Timeline Order Sort all segments by original start time, preserving original temporal relationships • Maintains original order of events • Inversion affects duration only, not sequence

Crossfade Concatenation

When concatenating transformed segments: if both segments longer than 2× crossfade: Concatenate with overlap: crossfade_s seconds • Cosine-shaped crossfade • Smooths transitions between segments else: Concatenate directly (no overlap) Crossfade length limited to 30% of shorter segment Prevents artifacts when segments are very short

Preset Strategies

Preset 2: Gentle Bloom (subtle expansion)

🌸 Gentle Time Expansion

Window: 12 ms | Burst range: 20-150 ms | Threshold: +6 dB

Slow min: 800 ms | Variance: 0.12 | Slope: 5 dB/s

Stretch: 8× | Compress: 0.25× | Crossfade: 20 ms

Stereo: 20% | Interleave: Alternate

Character: Subtle transformation — bursts become gentle swells, slow passages become shorter gestures

Use on: Acoustic instruments, speech, any material needing subtle temporal manipulation

Preset 3: Extreme Inversion (dramatic scale swap)

⚡ Dramatic Role Reversal

Window: 10 ms | Burst range: 15-100 ms | Threshold: +10 dB

Slow min: 500 ms | Variance: 0.20 | Slope: 8 dB/s

Stretch: 20× | Compress: 0.08× | Crossfade: 8 ms

Stereo: 20% | Interleave: Probabilistic

Character: Extreme — 15 ms bursts become 300 ms textures; 500 ms textures become 40 ms transients

Use on: Percussion, found sound, experimental material

Preset 4: Micro Detail Focus (emphasize bursts)

🔍 Burst Detail Revealed

Window: 8 ms | Burst range: 15-80 ms | Threshold: +12 dB

Slow min: 1000 ms | Variance: 0.10 | Slope: 4 dB/s

Stretch: 15× | Compress: 0.3× | Crossfade: 5 ms

Stereo: 20% | Interleave: Alternate

Character: Micro-bursts stretched to reveal internal structure; slow textures moderately compressed

Use on: Percussion, transient-rich material, speech plosives

Preset 5: Macro Drone (emphasize slow textures)

🌫️ Slow Textures Preserved

Window: 20 ms | Burst range: 40-200 ms | Threshold: +5 dB

Slow min: 400 ms | Variance: 0.25 | Slope: 10 dB/s

Stretch: 6× | Compress: 0.05× | Crossfade: 25 ms

Stereo: 20% | Interleave: Timeline order

Character: Slow textures compressed to near-transients (20× speed-up); bursts moderately stretched

Use on: Ambient, drone, sustained material

Preset 6: Granular Chaos (high fragmentation)

🌀 Extreme Fragmentation

Window: 8 ms | Burst range: 10-60 ms | Threshold: +15 dB

Slow min: 300 ms | Variance: 0.30 | Slope: 15 dB/s

Stretch: 25× | Compress: 0.05× | Crossfade: 3 ms

Stereo: 20% | Interleave: Probabilistic

Character: Maximum transformation — bursts become long textures (250 ms from 10 ms), slow passages become clicks (15 ms from 300 ms)

Use on: Experimental sound design, granular synthesis source

Preset 7: Smooth Morph (minimal disruption)

✨ Gentle Morph

Window: 25 ms | Burst range: 50-250 ms | Threshold: +4 dB

Slow min: 1000 ms | Variance: 0.08 | Slope: 3 dB/s

Stretch: 5× | Compress: 0.4× | Crossfade: 30 ms

Stereo: 20% | Interleave: Alternate

Character: Minimal transformation — bursts become moderate swells, slow textures slightly shortened

Use on: Any material needing subtle temporal manipulation

Parameters & Controls

Analysis Parameters

ParameterTypeDefaultDescription
Micro_window_mspositive15Analysis window for intensity (ms)
Micro_burst_min_mspositive25Minimum duration for burst detection (ms)
Micro_burst_max_mspositive180Maximum duration for burst detection (ms)
Burst_threshold_dB_above_medianpositive8dB above median intensity to trigger burst
Slow_min_mspositive600Minimum duration for slow texture (ms)
Slow_variance_thresholdreal0.15Max (std/mean) for stable texture
Slow_slope_threshold_dB_per_spositive6Max intensity slope (dB/s) for slow texture

Transformation Parameters

ParameterTypeDefaultDescription
Stretch_factorpositive12Time-stretch multiplier for bursts (>1)
Compress_factorpositive0.15Time-compress multiplier for slow textures (<1)
Crossfade_mspositive15Overlap duration between segments (ms)

Stereo Parameters

ParameterTypeDefaultDescription
Stereo_width_percentpositive20Decorrelation amount (0-50% typical)

Assembly Parameters

ParameterTypeDefaultDescription
Interleave_modeoptionAlternateSegment ordering strategy

Output Parameters

ParameterTypeDefaultDescription
Target_output_duration_spositive60Desired output length (seconds)
Max_output_duration_spositive120Hard cap on output length
Allow_fallback_if_insufficient_segmentsboolean1Use statistical fallback if detection fails
Draw_visualizationboolean1Generate 7-panel analysis display
Play_outputboolean1Audition after processing

Visualization & Analysis

7-Panel Display

Stereo Micro ↔ Macro Collapser Visualization: Panel 1: TITLE • Script name, input filename, preset, target duration Panel 2: ORIGINAL WAVEFORM • Gray waveform • Duration, channels, sample rate Panel 3: INTENSITY CONTOUR WITH SEGMENT MAP • Background: blue = slow textures, orange = micro-bursts • Red dotted line = burst threshold • Black intensity contour • Orange dots = burst peaks • X-axis: time, Y-axis: intensity (dB) Panel 4: ORIGINAL SPECTROGRAM • 0-5000 Hz spectrogram of input Panel 5: RESULT WAVEFORMS (STEREO) • Left channel (blue) and Right channel (orange) side by side • Shows actual output duration Panel 6: RESULT SPECTROGRAM (L channel) • 0-5000 Hz spectrogram of output Panel 7: SEGMENT DURATION DISTRIBUTION • Bar chart showing average durations: - Original bursts (orange) - Original slow textures (blue) - Transformed bursts (stretched, red) - Transformed slow textures (compressed, dark blue) Panel 8: PARAMETERS & STATISTICS (lower right) • Number of bursts/slow textures detected • Average durations • Stretch/compress factors, stereo width, crossfade • Interleave mode, target/actual duration Panel 9: LEGEND • Color key for all visualization elements

Reading the Segment Map

What the colors mean:
  • Orange regions: Detected micro-bursts (short, high-intensity events)
  • Blue regions: Detected slow textures (stable, slowly varying passages)
  • Red dotted line: Burst threshold = median intensity + threshold_dB
  • Orange dots: Peak intensity within each burst
  • Black line: Raw intensity contour (dB)

Pattern interpretation:

  • Many orange regions = transient-rich material
  • Large blue regions = sustained, drone-like passages
  • Mixed regions = varied dynamics
  • Gaps = below-threshold or too short for detection

Reading the Duration Bar Chart

Bars represent:
  • Burst (orange): Average original burst duration
  • Slow (light blue): Average original slow texture duration
  • B×Str (red): Average transformed burst duration (stretched)
  • S×Cmp (dark blue): Average transformed slow duration (compressed)

What to look for:

  • Compare heights: Inversion should make B×Str taller than original, S×Cmp shorter
  • Extreme inversion = B×Str much taller than original, S×Cmp much shorter
  • Balanced = both transformed durations similar

Applications

Electroacoustic Composition

Use case: Creating new relationships between time scales in acousmatic music

Technique: Extreme Inversion or Granular Chaos on diverse source material

Workflow:

Sound Design for Media

Use case: Creating unusual transitions, risers, impacts, and textures

Technique: Micro Detail Focus or Gentle Bloom on specific sounds

Applications:

Experimental Music

Use case: Generating unpredictable, evolving material for improvisation

Technique: Granular Chaos with probabilistic interleave

Advantages:

Educational Demonstration

Use case: Teaching time perception and granular synthesis concepts

Technique: Enable visualization, compare presets on simple sounds

Learning outcomes:

Practical Workflow Examples

🎵 From Percussion to Pad

Goal: Transform drum loop into evolving texture

Settings:

  • Preset: Micro Detail Focus
  • Source: 10-second drum loop with varied hits
  • Stretch: 15× (bursts become 150-1200 ms swells)
  • Compress: 0.3× (silences/gaps become short)
  • Target: 60 seconds

Result: Drum hits stretched into pitched swells, creating continuous texture from rhythmic source

🎬 Film Transition: Whoosh to Impact

Goal: Create dramatic transition from sustained whoosh to impact

Settings:

  • Preset: Extreme Inversion
  • Source: 5-second whoosh + impact recording
  • Interleave: Timeline order (preserves original sequence)
  • Target: 30 seconds

Result: Whoosh stretched to 20 seconds (sustained), impact compressed to 40 ms (brief spike) — creates dramatic build and sudden resolution

🎚️ Ambient Generator from Speech

Goal: Create evolving ambient texture from spoken word

Settings:

  • Preset: Gentle Bloom
  • Source: 30-second spoken phrase
  • Stereo: 30% (wider decorrelation)
  • Target: 120 seconds

Result: Plosives become gentle swells, vowels become compressed gestures — speech becomes abstract, evolving texture with spatial movement

Troubleshooting Common Issues

Problem: No segments detected (numBursts=0, numSlowRegions=0)
Cause: Thresholds too strict or material unsuitable
Solution: Enable fallback mode, reduce burst threshold (4-6 dB), increase variance threshold (0.2-0.3), reduce slope threshold (3-4 dB/s)
Problem: Output much shorter than target
Cause: Too few segments, stretch/compress factors too extreme
Solution: Increase target duration (segments cycle), reduce stretch/compress extremes, enable fallback for more segments
Problem: Output sounds granular/artifact-heavy
Cause: Stretch factor too high (>20×), crossfade too short
Solution: Reduce stretch factor, increase crossfade (20-30 ms), use Smooth Morph preset
Problem: Stereo image collapses in mono
Cause: Extreme width (>40%) causing phase cancellation
Solution: Reduce stereo_width_percent (10-20%), or accept that extreme decorrelation may not sum perfectly
Problem: Processing extremely slow
Cause: Many segments, each requiring multiple resynthesis operations
Solution: Reduce target duration, reduce max segments by adjusting thresholds, use shorter source material

Advanced Techniques

Custom analysis strategies:
  • Very short bursts (glitches): micro_burst_min_ms = 5, micro_burst_max_ms = 30
  • Long textures (drone): slow_min_ms = 2000, slow_variance_threshold = 0.05
  • Aggressive detection: burst_threshold = 3 dB, variance = 0.3, slope = 20 dB/s
  • Conservative detection: burst_threshold = 12 dB, variance = 0.08, slope = 3 dB/s
Extreme parameter exploration:
  • Stretch only: compress_factor = 1.0 (no compression), interleave = Timeline
  • Compress only: stretch_factor = 1.0 (no stretching), interleave = Timeline
  • Mono output: stereo_width_percent = 0 (identical channels)
  • Max stereo: stereo_width_percent = 50, pitch shift ranges expanded in script
  • No crossfade: crossfade_ms = 1 (minimum, abrupt transitions)