Random DurationTier Multichannel Generator - User Guide

Creates multiple independent random-walk DurationTiers, resynthesizes the source once per tier with Praat Manipulation, and assembles the variants as a multichannel Sound.

Author: Shai Cohen Affiliation: Department of Music, Bar-Ilan University, Israel Version: 0.5.1 (2026) License: MIT License Repo: Praat AudioTools
Contents:

What this does

The script takes exactly one selected Sound and generates N independent time-warped variants. Each channel receives its own DurationTier. The tier begins at factor 1.0, follows a bounded Gaussian random walk through evenly spaced interior control points, and returns to 1.0 at the end. Each tier is inserted into a Praat Manipulation object and rendered with Get resynthesis (overlap-add). The variants are then combined into one multichannel Sound.

Interpretation of the factor: 1.0 is the unity-duration reference. Values below or above 1.0 locally contract or expand time according to the DurationTier used by Praat. The script changes duration; it does not construct a granular cloud or independently repitch the channels.

Quick start

  1. Select exactly one Sound object.
  2. Run Random_DurationTier_Multichannel_Generator.praat.
  3. Choose Custom or one of the six named presets.
  4. Choose the boundary policy and, if needed, adjust the pitch-analysis and output controls.
  5. Run the script. The result is named from Output_stem: for example dur8_2ch or dur8_8ch.
Preset semantics: a named preset overwrites only Number_of_channels, Control_points, Variability, Min_factor, and Max_factor. Boundary handling, pitch analysis, naming, peak target, tier retention, visualization, and playback remain the values chosen in the form.

Presets

PresetChannelsControl pointsVariabilityFactor range
Customform valueform valueform valueform value
Subtle Variations480.200.80-1.25
Standard Multi-texture8100.400.50-2.00
Extreme Time-stretch8150.600.25-4.00
Dense Polyrhythm12200.500.40-2.50
Minimal Duo260.250.70-1.50
Chaotic Cluster16250.700.20-5.00

The form defaults to Custom with 8 channels, 10 control points, variability 0.40, and a 0.50-2.00 range. Therefore the default numerical settings happen to match Standard Multi-texture, but the selected preset remains Custom.

Random-walk construction

For N = Control_points: stepSigma = Variability / sqrt(N) state starts at 1.0 for each interior point: step ~ Gaussian(0, stepSigma) update state using the selected boundary policy DurationTier anchors: (tmin, 1.0) N evenly spaced interior points (tmax, 1.0)

Variability is a walk parameter, not a requested standard deviation of the finished tier. The scaling makes the unconstrained N-step random-walk variance comparable across different point counts. Boundaries, the unity anchors, and the fact that the visualization pools all interior stages change the observed distribution.

Boundary handling

ModeImplementationConsequence
ClampTake one Gaussian step, then clip the state to Min/Max.Large walks can accumulate samples exactly at the boundaries. This is the default and preserves the earlier v0.3 behavior.
ReflectReflect an overshoot back across a boundary; repeat up to 10 reflections, then clamp if still outside.Avoids the direct edge clipping of Clamp for ordinary overshoots.
RejectRe-roll an out-of-range step, up to 20 attempts. If none is accepted, take one additional step and clamp it.Keeps accepted ordinary steps inside the range without reflection.
v0.5.1 validation: Number_of_channels >= 1, Control_points >= 1, Min_factor < Max_factor, and the factor range must include 1.0 because the start and end anchors are fixed at unity.

Parameters

ParameterDefaultBehavior
PresetCustomNamed presets overwrite only channels, control points, variability, and factor range.
Number_of_channels8Number of independent DurationTiers/resyntheses and intended output channels. Must be at least 1.
Control_points10Number of evenly spaced random-walk points between the two unity anchors. Must be at least 1.
Variability0.40Sets Gaussian step sigma as Variability/sqrt(Control_points).
Min_factor / Max_factor0.50 / 2.00Bounds for interior states. Min must be lower than Max and the interval must contain 1.0.
Boundary_handlingClampClamp, Reflect, or Reject. This remains user-selectable with named presets.
Pitch_floor / Pitch_ceiling75 / 600 HzPassed to To Manipulation. v0.5.1 requires ceiling > floor.
Time_step0.01 sPassed directly to To Manipulation.
Name_prefixDurRand_Names the generated DurationTiers (DurRand_1, etc.). Relevant after completion only when tiers are kept.
Output_stemdur8Names temporary variants and the final multichannel result.
Scale_peak0.99Final Scale peak target applied to the combined result. It can attenuate or amplify.
Keep_duration_tiersOffKeeps the N generated DurationTier objects instead of deleting them after visualization.
Draw_visualizationOnDraws the 8x8 summary before tier cleanup.
Play_resultOnPlays the final result after processing.

Processing pipeline

  1. Input: require exactly one selected Sound; use its original time domain for all DurationTiers.
  2. Preset: if a named preset is selected, overwrite the five preset-controlled duration parameters.
  3. Validation: check channels, control points, factor range/unity anchors, and pitch floor/ceiling.
  4. Tier generation: create one independent random walk per output channel.
  5. Resynthesis: for every tier, run To Manipulation: Time_step, Pitch_floor, Pitch_ceiling, replace its DurationTier, and call Get resynthesis (overlap-add).
  6. Assembly: one variant is copied as mono; two are combined to stereo; 3+ variants are combined iteratively into the multichannel result.
  7. Normalization: apply Scale peak: Scale_peak once to the assembled result.
  8. Visualization and cleanup: draw while the tiers still exist; then remove the temporary variant Sounds and, unless requested, the DurationTiers.
Output duration: each DurationTier can produce a different resynthesized duration. Panel C records those durations individually; the final combined Sound reports its own resulting duration after assembly.
Peak scaling: because Scale peak is unconditional, Scale_peak=0.99 is not an attenuation-only ceiling. A result whose peak is below 0.99 is amplified to the target.

Visualization

v0.5.1 uses the five-part v0.5 visualization and draws it before cleanup, so the DurationTier curves are available even when Keep_duration_tiers is off.

PanelWhat it shows
A - Random-walk duration tiersAll N DurationTier curves overlaid, with unity plus Min/Max reference lines.
B - Factor distribution24-bin histogram of interior factor samples only; the fixed 1.0 endpoint anchors are excluded.
C - Per-channel durationActual duration of every resynthesized variant, with the original source duration as a reference line.
D - Output waveformMono output, or channels 1 and 2 overlaid when the result has multiple channels. Channels 3+ are not drawn in this waveform panel.
E - SummaryPreset, source, channels, point count, boundary mode, pitch range, Variability parameter, interior-factor SD, mean factor, output duration, final peak, and total factor-sample count.

Interior-factor SD is the population-style standard deviation computed from all interior factor samples across all generated tiers. It excludes the two fixed unity anchors per tier. It is descriptive and is not expected to equal the Variability parameter.

Factor samples is channels × (control points + 2), including the two unity anchors in each tier.

Notes & limitations