Stereo Micro ↔ Macro Time Collapser — User Guide
Detects short high-intensity events and longer stable-intensity regions, stretches the short events, compresses the stable regions, and cycles the transformed segment pool into a fixed-duration stereo composition. Left and right share the same event order but receive independent duration and pitch variation.
What this does
Stereo Micro ↔ Macro Time Collapser uses a common intensity analysis to build two segment classes:
- Micro-bursts: short regions whose intensity rises above a threshold relative to the median intensity.
- Slow textures: fixed-duration regions whose intensity contour has sufficiently low variation and slope.
Detected bursts are duration-expanded and detected slow regions are duration-compressed. Both transformed pools are then ordered according to the selected interleave mode and cycled until the requested output duration is reached.
Quick start
- Select exactly one Sound object of at least 0.1 seconds.
- Run
Stereo_Micro_Macro_Time_Collapser.praat. - Choose Custom or one of the six named presets.
- Adjust the burst and slow-texture detection criteria if needed.
- Set Stretch_factor, Compress_factor, Crossfade_ms and Stereo_width_percent.
- Choose Alternate, Probabilistic, or Timeline order.
- Set the target duration and maximum output duration.
- Choose segment and final-output normalization modes.
- Run. The result is named
Stereo_Collapser_Output.
Analysis & synthesis sources
Common analysis contour
The selected Sound is converted to a mono analysis copy and shifted to time 0. Praat Intensity is then calculated with:
The median of this Intensity contour provides the reference for burst detection. The same contour is also used for the slow-region criteria.
Synthesis channels
| Input | Synthesis source |
|---|---|
| Mono | The source is duplicated into separate L and R work copies. |
| Stereo | Input channel 1 supplies L; input channel 2 supplies R. |
| 3+ channels | The mono analysis uses the multichannel fold, while synthesis uses only channels 1 and 2. |
Analysis and synthesis work copies are shifted to time 0. The user's original Sound is not modified.
Micro-burst detection
The burst threshold is:
The scan advances in Micro_window_ms steps. When a sampled Intensity value exceeds the threshold, a candidate begins. It continues until one of the following occurs:
- Intensity falls below
burstThreshold − 3 dB; - the candidate reaches Micro_burst_max_ms;
- the source ends.
The candidate is retained only when its duration lies between Micro_burst_min_ms and Micro_burst_max_ms. Its maximum sampled Intensity is stored for the visualization.
Slow-texture detection
Slow-texture detection evaluates windows of exactly Slow_min_ms. It does not extend an accepted region until stability ends.
For each candidate window:
The region is accepted when:
If rejected, the scan advances by Slow_min_ms / 4. If accepted, it advances directly to the end of that window.
Fallback analysis
When Allow_fallback_if_insufficient_segments is enabled, fallback is triggered whenever either class contains fewer than two segments.
The fallback uses the 25th and 75th percentiles of the same Intensity contour:
- Intensity above Q75 → create a burst with a random duration between the configured burst minimum and maximum.
- Intensity below Q25 → create a slow region with a random duration between
Slow_min_msand2 × Slow_min_ms. - Intermediate values → advance by 50 ms.
A random candidate is kept only if its complete duration fits before the source end. Fallback slow regions do not use the primary variance/slope criteria.
If no segments of either type remain after analysis, the script exits without producing an output.
Time transformation
Each detected source region is extracted with a rectangular window from the current synthesis channel.
Bursts
Slow textures
The selected factor is written into a Praat DurationTier and resynthesized with Get resynthesis (overlap-add). This is the main duration-changing stage.
Very short-segment guard
For every extracted segment the script derives a pitch-analysis floor from its duration:
If that value reaches 590 Hz or more, the Manipulation resynthesis is skipped and the segment is copied without the stretch/compress or pitch-variation stage. With the normal preset duration ranges this guard is rarely reached.
Stereo variation
Left and right use the same detected source regions and later share the same interleave order, but every channel generates its own duration jitter and pitch variation.
Duration jitter
For example, Stereo_width_percent = 20 produces a multiplier range of approximately 0.90…1.10 around the configured Stretch_factor or Compress_factor.
Pitch variation
After duration resynthesis, a small independent varispeed operation is applied when Stereo_width_percent is positive:
| Segment type | Random rate factor |
|---|---|
| Micro-burst | 0.98…1.02 |
| Slow texture | 0.99…1.01 |
The implementation overrides the segment sampling frequency by that factor and resamples back to the source sample rate. This changes pitch and also changes segment duration slightly.
Interleave modes
The segment order is generated once and reused for both output channels.
| Mode | Actual ordering rule |
|---|---|
| Alternate | Burst 1, Slow 1, Burst 2, Slow 2, continuing with whichever class remains after the other is exhausted. |
| Probabilistic | At each pool position, attempt a 50/50 burst/slow choice. Each source segment is consumed once; if the chosen class is exhausted, the other class is used. |
| Timeline order | Merge both detected classes and sort them by their original source start time. |
Timeline mode preserves source-time ordering of the detected events. The burst/slow duration transformations still remain different.
Assembly, crossfade & target duration
Effective target
Each channel cycles repeatedly through its transformed segment pool until it reaches or exceeds this duration. The final channel is then rectangularly trimmed to the exact effective duration.
Overlap between segments
For every appended segment:
Praat Concatenate with overlap is used only when:
- the overlap is at least two samples;
- the current accumulated output is longer than twice the overlap;
- the next segment is longer than twice the overlap.
Otherwise the next segment is concatenated without overlap.
Channel alignment
Because L and R transformations have independent duration variation, their intermediate assembly lengths can differ. Each is independently driven to the same effective duration; a final silence-padding safeguard is available before the two channels are combined.
Normalization
Per-segment normalization
After each transformed segment is created, Segment_normalization can apply:
| Mode | Action |
|---|---|
| Scale peak (0.95) | Target Sinc70 peak scaling to 0.95. |
| Scale intensity | Praat Scale intensity to Segment_intensity_target_dB. |
| Off | No per-segment gain adjustment. |
Final output normalization
After L/R are combined, Output_normalization can apply:
| Mode | Action |
|---|---|
| Scale peak (0.99) | Target Sinc70 peak scaling to 0.99. |
| Scale intensity | Praat Scale intensity to Output_intensity_target_dB. |
| Off | No final gain adjustment. |
Presets
All named presets leave Stereo_width_percent, target/max duration, fallback, visualization, playback and both normalization sections unchanged.
| Preset | Window | Burst min–max / threshold | Slow min / variation / slope | Stretch | Compress | Xfade | Order |
|---|---|---|---|---|---|---|---|
| Gentle Bloom | 12 ms | 20–150 ms / +6 dB | 800 ms / 0.12 / 5 dB/s | 8× | 0.25× | 20 ms | Alternate |
| Extreme Inversion | 10 ms | 15–100 ms / +10 dB | 500 ms / 0.20 / 8 dB/s | 20× | 0.08× | 8 ms | Probabilistic |
| Micro Detail Focus | 8 ms | 15–80 ms / +12 dB | 1000 ms / 0.10 / 4 dB/s | 15× | 0.30× | 5 ms | Alternate |
| Macro Drone | 20 ms | 40–200 ms / +5 dB | 400 ms / 0.25 / 10 dB/s | 6× | 0.05× | 25 ms | Timeline |
| Granular Chaos | 8 ms | 10–60 ms / +15 dB | 300 ms / 0.30 / 15 dB/s | 25× | 0.05× | 3 ms | Probabilistic |
| Smooth Morph | 25 ms | 50–250 ms / +4 dB | 1000 ms / 0.08 / 3 dB/s | 5× | 0.40× | 30 ms | Alternate |
Parameters
| Parameter | Default | Role |
|---|---|---|
| Preset | Custom | Custom plus six named analysis/transformation strategies. |
| Micro_window_ms | 15 ms | Intensity-analysis time step. |
| Micro_burst_min_ms | 25 ms | Minimum retained primary burst duration. |
| Micro_burst_max_ms | 180 ms | Maximum retained primary burst duration. |
| Burst_threshold_dB_above_median | 8 dB | Offset added to median Intensity. |
| Slow_min_ms | 600 ms | Exact window duration used by primary slow-texture detection. |
| Slow_variance_threshold | 0.15 | Upper bound for the implemented std/mean variation measure; must be ≥0. |
| Slow_slope_threshold_dB_per_s | 6 | Maximum endpoint Intensity slope. |
| Stretch_factor | 12 | Base DurationTier factor for bursts. |
| Compress_factor | 0.15 | Base DurationTier factor for slow regions. |
| Crossfade_ms | 15 ms | Requested overlap between assembled segments, subject to safety reduction. |
| Stereo_width_percent | 20 | Controls half-width duration jitter; positive form field with no internal upper clamp. |
| Interleave_mode | Alternate | Alternate, Probabilistic, or Timeline order. |
| Target_output_duration_s | 60 s | Requested final duration before the maximum cap is applied. |
| Max_output_duration_s | 120 s | Hard duration cap. |
| Allow_fallback_if_insufficient_segments | On | Replace both primary segment pools when either class has fewer than two detections. |
| Draw_visualization | On | Draw the analysis and result overview. |
| Play_output | On | Play Stereo_Collapser_Output. |
| Segment_normalization | Scale peak (0.95) | Per-segment peak, Intensity, or off. |
| Segment_intensity_target_dB | 70 dB | Target used by segment Scale intensity mode. |
| Output_normalization | Scale peak (0.99) | Final stereo peak, Intensity, or off. |
| Output_intensity_target_dB | 70 dB | Target used by final Scale intensity mode. |
Visualization
The v1.1 Picture view contains the following information:
- Title: source, preset, requested target, Stretch_factor and Compress_factor.
- Original waveform: the common mono analysis source.
- Intensity contour + segment map: slow regions in blue, bursts in orange, the primary burst threshold as a dotted line, and stored burst peaks.
- Original spectrogram: mono analysis source, capped at min(5 kHz, Nyquist).
- Result waveforms: L and R shown separately.
- Result spectrogram: left output channel only, with the same frequency ceiling.
- Average-duration chart: original burst/slow averages and estimated transformed values.
- Processing summary: counts, average durations, global transform factors, stereo width, crossfade, mode and target/actual duration.
- Legend: color and marker meanings.
Segment-map caveat when fallback is used
The colored regions always show the segment lists that are actually used for synthesis. If fallback analysis replaced the primary detections, the dotted red line still shows the primary median-plus-threshold value; fallback bursts themselves were selected using Q75 instead.
Result waveform scale
The L and R result panels each use Praat's automatic waveform range. They are therefore not a shared-amplitude-scale comparison.
Duration chart
The transformed bars are estimates:
They do not measure the final rendered segment durations and therefore do not include channel-specific jitter or the later varispeed pitch factor.
Output behavior
- Name:
Stereo_Collapser_Output. - Channels: always stereo.
- Sample rate: source sample rate.
- Duration: approximately the sample-grid representation of
min(Target_output_duration_s, Max_output_duration_s). - Original source: unchanged.
- Randomness: channel duration jitter and pitch variation; probabilistic ordering when selected; random fallback durations when fallback is activated.
- Random seed: no user control.
- Playback: optional through Play_output.