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.
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.
- 1 or more generated output channels.
- Six named presets plus Custom.
- Three boundary policies: Clamp, Reflect, and Reject.
- Independent stochastic walk for every generated channel; no user seed is exposed.
- Optional retention of the generated DurationTier objects.
- Five-part visualization showing tiers, factor distribution, resulting durations, output waveform, and summary statistics.
Quick start
- Select exactly one Sound object.
- Run
Random_DurationTier_Multichannel_Generator.praat. - Choose Custom or one of the six named presets.
- Choose the boundary policy and, if needed, adjust the pitch-analysis and output controls.
- Run the script. The result is named from
Output_stem: for exampledur8_2chordur8_8ch.
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
| Preset | Channels | Control points | Variability | Factor range |
|---|---|---|---|---|
| Custom | form value | form value | form value | form value |
| Subtle Variations | 4 | 8 | 0.20 | 0.80-1.25 |
| Standard Multi-texture | 8 | 10 | 0.40 | 0.50-2.00 |
| Extreme Time-stretch | 8 | 15 | 0.60 | 0.25-4.00 |
| Dense Polyrhythm | 12 | 20 | 0.50 | 0.40-2.50 |
| Minimal Duo | 2 | 6 | 0.25 | 0.70-1.50 |
| Chaotic Cluster | 16 | 25 | 0.70 | 0.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
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
| Mode | Implementation | Consequence |
|---|---|---|
| Clamp | Take 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. |
| Reflect | Reflect 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. |
| Reject | Re-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. |
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
| Parameter | Default | Behavior |
|---|---|---|
| Preset | Custom | Named presets overwrite only channels, control points, variability, and factor range. |
| Number_of_channels | 8 | Number of independent DurationTiers/resyntheses and intended output channels. Must be at least 1. |
| Control_points | 10 | Number of evenly spaced random-walk points between the two unity anchors. Must be at least 1. |
| Variability | 0.40 | Sets Gaussian step sigma as Variability/sqrt(Control_points). |
| Min_factor / Max_factor | 0.50 / 2.00 | Bounds for interior states. Min must be lower than Max and the interval must contain 1.0. |
| Boundary_handling | Clamp | Clamp, Reflect, or Reject. This remains user-selectable with named presets. |
| Pitch_floor / Pitch_ceiling | 75 / 600 Hz | Passed to To Manipulation. v0.5.1 requires ceiling > floor. |
| Time_step | 0.01 s | Passed directly to To Manipulation. |
| Name_prefix | DurRand_ | Names the generated DurationTiers (DurRand_1, etc.). Relevant after completion only when tiers are kept. |
| Output_stem | dur8 | Names temporary variants and the final multichannel result. |
| Scale_peak | 0.99 | Final Scale peak target applied to the combined result. It can attenuate or amplify. |
| Keep_duration_tiers | Off | Keeps the N generated DurationTier objects instead of deleting them after visualization. |
| Draw_visualization | On | Draws the 8x8 summary before tier cleanup. |
| Play_result | On | Plays the final result after processing. |
Processing pipeline
- Input: require exactly one selected Sound; use its original time domain for all DurationTiers.
- Preset: if a named preset is selected, overwrite the five preset-controlled duration parameters.
- Validation: check channels, control points, factor range/unity anchors, and pitch floor/ceiling.
- Tier generation: create one independent random walk per output channel.
- Resynthesis: for every tier, run
To Manipulation: Time_step, Pitch_floor, Pitch_ceiling, replace its DurationTier, and callGet resynthesis (overlap-add). - Assembly: one variant is copied as mono; two are combined to stereo; 3+ variants are combined iteratively into the multichannel result.
- Normalization: apply
Scale peak: Scale_peakonce to the assembled result. - Visualization and cleanup: draw while the tiers still exist; then remove the temporary variant Sounds and, unless requested, the DurationTiers.
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.
| Panel | What it shows |
|---|---|
| A - Random-walk duration tiers | All N DurationTier curves overlaid, with unity plus Min/Max reference lines. |
| B - Factor distribution | 24-bin histogram of interior factor samples only; the fixed 1.0 endpoint anchors are excluded. |
| C - Per-channel duration | Actual duration of every resynthesized variant, with the original source duration as a reference line. |
| D - Output waveform | Mono output, or channels 1 and 2 overlaid when the result has multiple channels. Channels 3+ are not drawn in this waveform panel. |
| E - Summary | Preset, 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
- The random generator is not seeded by a user parameter, so repeated runs can produce different tiers.
- The script uses Praat Manipulation/overlap-add; quality therefore depends on whether the selected pitch-analysis settings are appropriate for the source.
- The code does not promise that the observed factor distribution is uniform. Boundary policy materially affects that distribution, especially with wide ranges or high variability.
- More control points do not simply mean "more variability": step sigma is reduced by
sqrt(N)as N increases. - The six named presets do not overwrite Boundary handling, pitch-analysis controls, naming, Scale_peak, or visualization/playback options.
- The final peak normalization changes absolute level across runs; compare temporal behavior rather than untreated loudness if evaluating different random walks.