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.
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.
Processing pipeline
Common path
Selected Sound → preset/mode parameters → tremolo processing → optional Dry/Wet mix → attenuation-only safety ceiling → optional visualization/playback.
Adaptive path
- Square every source channel.
- 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.
- Low-pass the power signal using Praat's Hann-band filter.
- Take the square root to obtain an RMS-like envelope.
- Map that envelope to a 0–1 depth-control value using Sensitivity offset and Signal sensitivity.
- Use that control value to scale the maximum tremolo depth.
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
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
| Property | Adaptive | Strong |
|---|---|---|
| Modulation shape | Unipolar sine attenuation | Full-depth rectified sine |
| Depth | Varies with smoothed source envelope | Always full depth |
| Minimum wet multiplier | Depends on max depth and envelope control | 0 |
| Maximum wet multiplier | 1 | 1 |
| Source-dependent? | Yes | No |
| Additional controls | Max depth, sensitivity, offset, smoothing | Rate only |
Presets
Presets overwrite the relevant mode and modulation settings. Dry/Wet, Safety peak, visualization, and playback remain whatever is set in the form.
| Preset | Mode | Rate | Max depth | Sensitivity | Offset | Smoothing |
|---|---|---|---|---|---|---|
| Custom | Form setting | Form setting | Form setting | Form setting | Form setting | Form setting |
| Classic Tremolo | Adaptive | 6 Hz | 0.50 | 0.30 | 0.60 | 20 ms |
| Subtle Shimmer | Adaptive | 8 Hz | 0.25 | 0.20 | 0.70 | 25 ms |
| Helicopter Pulse | Strong | 12 Hz | — | — | — | — |
| Slow Pulse | Strong | 2 Hz | — | — | — | — |
| Fast Flutter | Adaptive | 15 Hz | 0.60 | 0.40 | 0.50 | 15 ms |
| Dynamic Swell | Adaptive | 3 Hz | 0.80 | 0.70 | 0.30 | 35 ms |
Parameters
| Parameter | Default | Implemented behavior |
|---|---|---|
| Preset | Custom | Selects one of the six fixed configurations above or leaves the form values unchanged. |
| Mode | Adaptive | Selects envelope-following depth or full-depth rectified-sine processing. Presets can overwrite this choice. |
| Modulation rate | 5 Hz | LFO rate in Adaptive mode; audible pulse rate in Strong mode. |
| Max modulation depth | 0.7 | Adaptive only. Clamped internally to 0–1. |
| Signal sensitivity | 0.5 | Adaptive only. Non-negative multiplier applied to the RMS-like envelope. |
| Sensitivity offset | 0.5 | Adaptive only. Non-negative baseline added before the depth-control clamp. |
| Envelope smoothing | 20 ms | Adaptive 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/Dry | 100% | Linear wet/dry mix after tremolo processing. Clamped to 0–100%. |
| Safety peak | 0.99 | 0 disables the ceiling. Otherwise it attenuates only when the mixed output exceeds the target; it never boosts a quiet result. |
| Draw visualization | On | Draws the standardized AudioTools process figure. |
| Play result | On | Plays the finished Sound after processing. |
Dry/Wet and output safety
Linear Dry/Wet mix
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.
Channels, duration, and timing
- All source channels are preserved. The tremolo formula is applied to every channel of the copied Sound.
- Adaptive envelope detection is multichannel-safe: channels are squared before conversion to mono, so anti-phase material cannot cancel in the detector.
- The same adaptive depth trajectory and LFO phase are applied to all channels, preserving their relative spatial relationships.
- The output keeps the original sample rate, start time, and duration.
- LFO phase uses local sound time,
x - startTime. A Sound shifted on the Praat timeline therefore receives the same modulation trajectory as an otherwise identical Sound starting at 0.
Visualization
The figure is a compact process view rather than a separate analysis model.
- Input — mono display copy of the original waveform.
- Output — mono display copy of the processed waveform.
- 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.
- Summary — rate, Dry/Wet, safety setting, channel count, and the mode-specific controls.