Stretch-Tremolo Ambience — User Guide

Creates an extended mono cloud with Praat overlap-add lengthening, applies a unipolar tremolo to that cloud, and mixes it in parallel with the original dry channels. The cloud can continue beyond the original Sound as an ambient tail.

Author: Shai Cohen Affiliation: Department of Music, Bar-Ilan University, Israel Version: 0.4 (2026) License: MIT License Repo: https://github.com/ShaiCohen-ops/Praat-plugin_AudioTools
Contents:

What this does

Stretch-Tremolo Ambience builds a second, extended layer from the selected Sound. The wet layer is first reduced to a centered mono source, lengthened with Praat's Lengthen (overlap-add) operation, and then modulated by a smooth tremolo envelope. The original Sound remains the dry layer.

When the wet cloud is active, the output follows the full stretched-cloud duration. During the original source duration, dry and wet layers are summed in parallel. After the source ends, the wet cloud continues alone as a tail.

Core structure: original multichannel dry source + one mono stretched cloud copied equally to every output channel. The cloud is deliberately mono; the original dry channel relationships remain intact during the source portion.

Processing pipeline

Processing order

  1. Validate the Sound and resolve preset values.
  2. Resolve an adaptive pitch-analysis range for Praat's overlap-add lengthening.
  3. Create a mono cloud source, with a strongest-channel fallback if the multichannel fold-down nearly cancels.
  4. Lengthen the complete cloud source by Stretch Factor.
  5. Apply local-time unipolar tremolo and a short fade at the very end of the cloud.
  6. Create a new output with the original channel count and the full cloud duration.
  7. Mix the original dry channels with the same mono cloud in parallel.
  8. Apply attenuation-only Safety Peak when needed.

If Wet Cloud Level = 0, the script uses a dedicated dry-only path and does not build or stretch a cloud.

Cloud creation

Mono cloud source

Mono input is copied directly for cloud generation. Multichannel input is converted to mono first. The script also measures the peak of every original channel. If the mono fold-down peak is less than 10% of the strongest channel peak, it discards the fold-down and uses the strongest individual channel instead. This protects the cloud source from severe inter-channel cancellation.

Overlap-add lengthening

The cloud is created with Praat's Lengthen (overlap-add) command. v0.4 does not crop the stretched result back to the source duration.

cloud duration ≈ source duration × Stretch Factor

The actual duration is whatever Praat returns from the lengthening operation and is measured directly before the final output is created.

Adaptive pitch bounds

The overlap-add operation uses a pitch range that adapts to the selected Sound:

minimum pitch = max(75 Hz, 3 / source_duration) maximum pitch = max(600 Hz, 2 × minimum_pitch) maximum pitch is then limited to 0.45 × sample_rate

If the resolved minimum is no longer below the maximum, the script stops instead of attempting an invalid stretch on a Sound that is too short for the available sample rate.

Random seed

Random Seed controls reproducibility of the overlap-add stage. A nonzero value initializes Praat's random state predictably before lengthening. A value of 0 uses unpredictable initialization. After the cloud is created, the script restores unpredictable random initialization.

Cloud tremolo

The stretched cloud receives a unipolar cosine tremolo based on local time from the original Sound start:

gain(t) = 1 − depth × [1 − cos(2π × rate × local_time)] / 2 cloud(t) = stretched_cloud(t) × gain(t)

The envelope therefore starts at unity gain. Its maximum is 1 and its minimum is 1 − Cloud Depth. With depth 1, the trough reaches zero; with depth 0, the cloud is not amplitude-modulated.

If Cloud Rate = 0 Hz, the cosine remains at 1 and the tremolo stage leaves the cloud at unity gain.

Tail fade

The final end of the stretched cloud receives a short linear fade to zero so the extended layer does not stop abruptly:

tail fade = min(50 ms, 5% of cloud duration) minimum tail fade = one sample

Parallel mix & duration

With an active cloud, the script creates a new multichannel Sound from the original start time to the stretched cloud end time. During the original source portion:

output_channel(t) = Dry Level × original_channel(t) + Wet Cloud Level × mono_cloud(t)

After the original source ends:

output_channel(t) = Wet Cloud Level × mono_cloud(t)

The same mono cloud sample is written into every output channel. This means the dry portion preserves the original channel differences, while the extended tail itself is centered and identical across channels.

Dry Level and Wet Cloud Level are independent gains, not a normalized crossfade. Both may be above 1, and their sum does not need to equal 1.

Dry-only path

When Wet Cloud Level = 0, output duration remains the original duration. If Dry Level is exactly 1, the result is an exact copied bypass and Safety Peak is deliberately skipped. If Dry Level differs from 1, only the dry gain is applied and Safety Peak may attenuate the result if necessary.

Presets

PresetStretchRateDepthDryWet
Customform valueform valueform valueform valueform value
Ethereal Pad (Smooth)4.0×0.50 Hz0.301.00.5
Ghostly Trail (Slow pulse)2.5×0.30 Hz0.601.00.4
Dark Drone (Deep stretch)8.0×0.20 Hz0.201.00.7
Shimmering Tail (Fast wobble)3.0×6.00 Hz0.501.00.4

Named presets replace Stretch Factor, Cloud Rate, Cloud Depth, Dry Level, and Wet Cloud Level. Random Seed, Safety Peak, visualization, and playback remain under the user's direct control.

Parameters

ParameterDefaultMeaningRuntime range
Stretch Factor3.0Duration multiplier used by the overlap-add cloud.1…20.
Cloud Rate Hz2.0Tremolo-cycle rate applied after stretching.0…30 Hz.
Cloud Depth0.5Maximum unipolar attenuation depth.0…1.
Random Seed0Controls overlap-add reproducibility.0…2147483647; 0 = unpredictable.
Dry Level1.0Gain of the original channels during their original duration.0…2.
Wet Cloud Level0.6Gain of the mono stretched cloud.0…2; 0 disables cloud processing.
Safety Peak0.99Maximum output peak after active processing.0…1; 0 disables safety.
Draw VisualizationyesDraws the AudioTools figure.Does not change the audio.
Play ResultyesPlays the completed Sound.Does not change the audio.

Channels & output

PropertyBehavior
Cloud sourceMono; multichannel input uses fold-down with strongest-channel fallback on severe cancellation.
Dry audioAll original channels are preserved independently during the source portion.
Wet audioOne mono cloud copied identically to every output channel.
Output channel countSame as the input Sound.
Output durationOriginal duration on dry-only path; full stretched-cloud duration when wet cloud is active.
Source start timePreserved.
Sample ratePreserved.
RandomnessStretching can be reproducible with a nonzero Random Seed.
SafetyOnly peaks above Safety Peak are attenuated; quieter output is never boosted.

Visualization

When Draw Visualization is enabled on the active-cloud path, v0.4 draws:

Input

The original Sound waveform.

Output

The complete extended multichannel output waveform.

Wet cloud

The mono stretched-and-modulated cloud across its full duration.

Tremolo envelope

The cloud gain over the first up to 4 seconds, with unity shown as a reference.

Summary strip

The summary reports Stretch Factor, cloud duration, tremolo rate/depth, Dry and Wet levels, output duration, channel count, and Safety setting.

The tremolo panel draws 300 representative points for display only. The audio formula itself is evaluated on the Sound sample grid.