Dual-Mode Tremolo Generator — User Guide

Offline amplitude modulation with two complementary modes: an envelope-following tremolo whose depth responds to the source, and a full-depth rectified-sine pulse with a fixed rhythmic rate.

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

Dual-Mode Tremolo Generator modulates the amplitude of a selected Sound while preserving its duration, sampling rate, start time, and channel count. It offers two different modulation structures rather than two strengths of the same effect.

Adaptive

The source first produces a smoothed RMS-like amplitude envelope. That envelope controls how deeply a sine LFO attenuates the signal. Stronger source energy can therefore produce deeper tremolo, while quieter material can receive less modulation.

Strong

The source is multiplied directly by a full-depth rectified sine. The pulse depth is fixed from silence to unity and does not depend on the source amplitude.

Core distinction: Adaptive mode changes depth from the measured source envelope; Strong mode keeps full depth and imposes a fixed rhythmic pulse.

Processing pipeline

Common path

Selected Sound → preset/mode parameters → tremolo processing → optional Dry/Wet mix → attenuation-only safety ceiling → optional visualization/playback.

Adaptive path

  1. Square every source channel.
  2. If the Sound has more than one channel, convert the squared signal to mono. This averages power, so opposite-polarity channels cannot cancel the detector.
  3. Low-pass the power signal using Praat's Hann-band filter.
  4. Take the square root to obtain an RMS-like envelope.
  5. Map that envelope to a 0–1 depth-control value using Sensitivity offset and Signal sensitivity.
  6. Use that control value to scale the maximum tremolo depth.
depthControl(t) = clamp(offset + sensitivity × envelope(t), 0, 1) LFO(t) = (1 + sin(2π × rate × localTime)) / 2 wet(t) = input(t) × [1 - maxDepth × depthControl(t) × LFO(t)]

The adaptive multiplier therefore never boosts the wet path. At each moment it ranges from unity down toward the attenuation set by the current envelope-controlled depth.

Strong path

wet(t) = input(t) × |sin(π × rate × localTime)|

The factor runs from 0 to 1. The use of π × rate, rather than 2π × rate, is deliberate: rectifying a sine doubles its pulse count, so this formulation makes the audible pulse rate equal to the requested Modulation rate.

Adaptive vs Strong

PropertyAdaptiveStrong
Modulation shapeUnipolar sine attenuationFull-depth rectified sine
DepthVaries with smoothed source envelopeAlways full depth
Minimum wet multiplierDepends on max depth and envelope control0
Maximum wet multiplier11
Source-dependent?YesNo
Additional controlsMax depth, sensitivity, offset, smoothingRate only
Important: Strong mode has no separate depth parameter in v0.4. Its wet signal always reaches zero at the troughs. Use Dry/Wet when a less extreme overall result is wanted.

Presets

Presets overwrite the relevant mode and modulation settings. Dry/Wet, Safety peak, visualization, and playback remain whatever is set in the form.

PresetModeRateMax depthSensitivityOffsetSmoothing
CustomForm settingForm settingForm settingForm settingForm settingForm setting
Classic TremoloAdaptive6 Hz0.500.300.6020 ms
Subtle ShimmerAdaptive8 Hz0.250.200.7025 ms
Helicopter PulseStrong12 Hz————
Slow PulseStrong2 Hz————
Fast FlutterAdaptive15 Hz0.600.400.5015 ms
Dynamic SwellAdaptive3 Hz0.800.700.3035 ms

Parameters

ParameterDefaultImplemented behavior
PresetCustomSelects one of the six fixed configurations above or leaves the form values unchanged.
ModeAdaptiveSelects envelope-following depth or full-depth rectified-sine processing. Presets can overwrite this choice.
Modulation rate5 HzLFO rate in Adaptive mode; audible pulse rate in Strong mode.
Max modulation depth0.7Adaptive only. Clamped internally to 0–1.
Signal sensitivity0.5Adaptive only. Non-negative multiplier applied to the RMS-like envelope.
Sensitivity offset0.5Adaptive only. Non-negative baseline added before the depth-control clamp.
Envelope smoothing20 msAdaptive only. Sets the nominal time constant used to derive the low-pass cutoff 1/(2πτ); the script also constrains the filter relative to Nyquist.
Wet/Dry100%Linear wet/dry mix after tremolo processing. Clamped to 0–100%.
Safety peak0.990 disables the ceiling. Otherwise it attenuates only when the mixed output exceeds the target; it never boosts a quiet result.
Draw visualizationOnDraws the standardized AudioTools process figure.
Play resultOnPlays the finished Sound after processing.

Dry/Wet and output safety

Linear Dry/Wet mix

output = wet × WetAmount + original × (1 - WetAmount)

The mix is performed independently on every original channel. At Wet/Dry = 0%, the script takes an exact bypass branch and copies the original Sound without running the tremolo DSP.

Safety peak

Safety peak is a ceiling, not target normalization. If the mixed output already lies below the requested peak, its gain is left unchanged. If it exceeds the ceiling, the whole Sound is multiplied by one common attenuation factor.

if peak > SafetyPeak: output *= SafetyPeak / peak

Channels, duration, and timing

Visualization

The figure is a compact process view rather than a separate analysis model.

  1. Input — mono display copy of the original waveform.
  2. Output — mono display copy of the processed waveform.
  3. LFO — three modulation cycles or the complete Sound if it is shorter. Adaptive displays the 0–1 sine shape; Strong displays the rectified-sine pulse.
  4. Summary — rate, Dry/Wet, safety setting, channel count, and the mode-specific controls.
The mono waveforms are visualization copies only. The actual DSP output remains multichannel when the source is multichannel.