Metamodulator — User Guide

Eight deterministic modulation families generate a bipolar control signal that multiplies the selected Sound, from fixed and curved phase functions to integrated sweeps, FM trajectories, chirps, and trembling chirps.

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

What this does

Metamodulator creates a time-varying modulator and multiplies the selected Sound by it. The modulator is generated from one of eight mathematical phase/frequency trajectories. Depending on the selected family, the control can be a fixed-frequency ring modulator, a curved phase trajectory, an exponential rise or fall, sinusoidal frequency modulation, a gradually widening spiral, a linear chirp, or a chirp whose slope trembles over time.

The same control signal is applied sample-for-sample to every channel, so multichannel relationships are preserved while all channels undergo the same amplitude modulation. The source itself supplies the spectrum being transformed; the Metamodulator supplies only the control trajectory.

At 100% Wet: the output is input × modulator. Since the modulator ranges approximately from −1 to +1, this is bipolar ring-modulation-style multiplication. At intermediate Wet values, the multiplier becomes Dry + Wet × modulator, retaining a direct component while adding the time-varying modulation.

Processing model

1. Preset or manual algorithm

Custom mode uses the manual algorithm and parameter fields. A named preset replaces the relevant values with its stored settings. Category divider entries are protected: selecting one stops the script and asks for a real preset.

2. One shared modulator

The script creates one mono control Sound on the source sample grid and writes the selected mathematical modulator into it. The control is independent of source amplitude or spectrum; extracting channel 1 only supplies the correct timing and sample grid before the control formula replaces its samples.

3. Local-time synthesis

All phase equations use local time τ = x − source_start. Therefore an identical Sound produces the same modulation trajectory even if its Praat start time is moved.

4. Audio multiplication

wet = Dry_wet_percent / 100 dry = 1 − wet output(t) = input(t) × [ dry + wet × modulator(t) ]

0% Wet is an exact copied bypass. In that case the modulation formula is not applied and Safety Peak is deliberately skipped.

5. Output safety

After active processing, the script measures the output peak. If it exceeds Safety peak, Praat scales the complete result down to that ceiling. Material already below the ceiling is left at its existing level.

Safety Peak is attenuation-only. It is not target normalization and never raises quiet material.

8 algorithms

In the equations below, τ is local Sound time and T is the Sound duration. For frequency-defined algorithms, v2.5 synthesizes the phase by integrating the intended instantaneous-frequency trajectory. The curve shown in the visualization therefore corresponds to the control that is actually generated.

1. Cubic Phase Distortion

phase(τ) = 2π f0 τ + k τ³ modulator(τ) = sin(phase) instantaneous frequency: f(τ) = f0 + 3kτ² / (2π)

Carrier Frequency sets f0; Modulation Factor is the cubic phase coefficient k. The frequency drift grows quadratically with elapsed time.

2. Exponential Frequency Sweep

L = ln(f_end / f_start) f(τ) = f_start × exp(L τ / T) phase(τ) = 2π f_start T / L × [ exp(L τ / T) − 1 ]

The control begins at Start Frequency and reaches End Frequency at the end of the Sound. If start and end are equal, the script uses a fixed-frequency sine directly.

3. Logarithmic Frequency Sweep

This menu family uses the same exact integrated log-frequency trajectory as Algorithm 2. Its supplied presets use descending start/end pairs, so the frequency falls exponentially through time.

4. Quadratic Phase Modulation

phase(τ) = 2π f0 τ + k τ² instantaneous frequency: f(τ) = f0 + kτ / π

The phase coefficient produces a linear frequency drift. Negative values reverse the direction of the bend.

5. Sinusoidal FM

target frequency: f(τ) = f0 + depth × sin(2π r τ) integrated phase: phase(τ) = 2π f0 τ + (depth / r) × [1 − cos(2π r τ)]

Modulation Factor is frequency deviation in Hz and Modulation Rate is the FM rate in Hz. When rate is 0, the control becomes a fixed-frequency sine at f0.

6. Spiral FM

target frequency: f(τ) = f0 + depth × sin(2π r τ) × τ/T

The sinusoidal deviation grows from zero toward its full range as the Sound progresses. The script uses the analytic integral of this target trajectory to generate phase, so the modulator follows the displayed frequency curve exactly.

7. Time-Varying (Linear Chirp)

phase(τ) = π s τ² instantaneous frequency: f(τ) = s τ

Here Carrier Frequency Hz is used as a chirp slope in Hz/s, named s above. The control begins at 0 Hz and rises linearly.

8. Trembling (Vibrato + Chirp)

target frequency: f(τ) = s τ × [1 + depth × sin(2π r τ)]

This is a linear chirp whose instantaneous slope is periodically expanded and contracted. Carrier Frequency again acts as chirp slope in Hz/s; Modulation Factor is the proportional tremble depth and Modulation Rate sets its speed. The implemented phase is the exact integral of this target frequency.

Nyquist diagnostic: the script estimates the requested modulator-frequency range and prints a warning if it reaches or exceeds Nyquist. It does not low-pass or otherwise antialias the modulator automatically.

Presets

The form contains 32 named musical presets plus Custom, organized by divider rows. The values below are the exact preset assignments in v2.5.

FamilyPresets and stored values
Cubic PhaseMild: 100 Hz, k=1; Strong: 200 Hz, k=4; High Frequency: 300 Hz, k=2.5
Exponential SweepSlow: 100→600 Hz; Fast: 50→1200 Hz; Narrow: 200→400 Hz
Log SweepDescending Classic: 800→50 Hz; Fast Descent: 1000→100 Hz
Quadratic PhaseGentle: 150 Hz, k=.3; Classic: 200/.5; Dramatic: 250/1; Reverse: 180/−.4; Extreme: 300/1.5; Subtle: 120/.1
Sinusoidal FMClassic: f0=300 Hz, rate=2 Hz, depth=100 Hz; Deep: 400 / 3 / 200
Spiral FMGentle: 200/.5/80; Classic: 250/.8/150; Intense: 300/1.2/200; Deep: 150/.6/120; Hypnotic: 400/1.5/180; Cosmic: 180/.7/250
Linear ChirpSubtle: 100 Hz/s; Rising Metallic: 200; Sci-Fi Sweep: 300; Laser Beam: 500; Extreme Glitch: 800
Trembling ChirpGentle: slope 200 Hz/s, rate 5 Hz, depth .03; Radio: 440/25/.08; Deep Space: 100/10/.10; Vintage: 300/20/.06; Alien: 150/30/.12
Named presets replace only the parameters used by their algorithm. Dry/Wet, Safety Peak, visualization options, and playback remain under the user's direct control.

Parameters

ParameterDefaultMeaningRuntime handling
PresetCustomSelects Custom, a category divider, or one of 32 named presets.Divider rows stop with a clear message.
Manual AlgorithmCubic PhaseSelects one of the eight algorithms when Preset = Custom.Named presets override it.
Carrier Frequency Hz200Carrier for algorithms 1, 4, 5, 6; chirp slope for 7 and 8.Clamped to 0.001 … 0.49 × sample rate.
Start Frequency Hz100Start of algorithms 2 and 3.Clamped to 0.001 … 0.49 × sample rate.
End Frequency Hz800End of algorithms 2 and 3.Clamped to 0.001 … 0.49 × sample rate.
Modulation Factor2.0Phase coefficient, FM depth in Hz, or proportional tremble depth depending on algorithm.No generic clamp; interpretation is algorithm-specific.
Modulation Rate Hz5.0Rate used by algorithms 5, 6, and 8.Negative values become 0.
Dry/Wet percent100Blend between direct multiplier 1 and the bipolar modulator.Clamped to 0…100; 0 gives exact bypass.
Safety peak0.99Maximum processed-output peak.Clamped to 0…1; 0 disables safety; attenuation only.
Show spectrogramnoChanges the right-hand output display in the figure.Does not alter audio processing.
Draw visualizationyesCreates the AudioTools figure.Does not alter audio.
Play resultyesPlays the finished Sound.Does not alter audio.

Channels & output

PropertyBehavior
Channel countPreserved for mono, stereo, and arbitrary multichannel Sounds.
Modulation across channelsOne identical mono modulator is reused for every channel.
Sample ratePreserved.
Sample count / durationPreserved.
Start timePreserved; modulation itself uses local time.
RandomnessNone. The same source and settings produce the same control and output.
0% WetExact copied source; Safety Peak is skipped.
Output level safetyOnly peaks above the requested ceiling are attenuated.

Visualization

When Draw visualization is enabled, v2.5 draws the following AudioTools panels:

Input

Original waveform.

Output

Processed waveform, or a spectrogram when Show spectrogram is enabled. The spectrogram ceiling is min(8000 Hz, Nyquist).

Control trajectory

First up to 1 second. Cubic/Quadratic modes show the added phase offset in radians; frequency-defined modes show the exact instantaneous-frequency trajectory in Hz.

Actual modulator

The first up to 50 ms of the real generated control Sound used for multiplication.

Summary strip

The bottom strip reports algorithm, resolved algorithm-specific parameters, Wet percentage, Safety setting, display mode, duration, sample rate, channel count, and final peak.

The control-trajectory and modulator panels describe the control process itself. They are generated from the same equations and, for the waveform preview, from the same control Sound that is applied to the audio.