XY Shape LFO Modulation XY Trajectory

Maps normalized two-dimensional mathematical trajectories to time warp, amplitude modulation, channel splitting, or stereo-pair rotation. X and Y remain coordinated as one geometric control path while each mode assigns them to different audio parameters.

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

What this does

XY Shape LFO Modulation generates two synchronized control signals, X(t) and Y(t), from a selected mathematical curve. The pair is treated as one trajectory in an XY plane and then mapped to audio processing according to the selected mode.

The four current mappings are:

The legacy script filename contains FREQUENCY_MODULATION, but v0.5 is a multi-mode XY audio modulator. It does not implement oscillator FM synthesis.

XY trajectory

Local-time control signals

The trajectory Sounds are generated from 0 to the source duration. During processing they are read with local time:

τ = t − Sound_start X = Xtrajectory(τ) Y = Ytrajectory(τ)

This makes the trajectory itself invariant to the Sound's absolute position on the Praat timeline.

Joint normalization

After X and Y are generated, the script finds the larger absolute peak across both coordinates and divides both trajectory Sounds by that same value:

P = max( peak(|X|), peak(|Y|) ) Xnormalized = X / P Ynormalized = Y / P

Using one shared scale preserves the XY geometry. The axes are not normalized independently.

Depth

Depth Percent is converted to a 0…1 ratio and interpreted consistently by the selected mapping. It does not mean the same physical unit in every mode: for example, it scales milliseconds of time displacement in Temporal Warp and degrees of pair rotation in XY Stereo Rotation.

Shapes

Let θ = 2π × Trajectory_rate_Hz × τ. The six trajectory families are:

ShapeXYTrajectory character
Circle sin(θ) cos(θ) Quadrature sine/cosine motion.
Diamond (2/π) asin(sin θ) (2/π) asin(sin(θ+π/2)) Triangle-like coordinates with linear-looking sides and sharp turns.
Lissajous (3:4) sin(3θ) sin(4θ) Closed 3:4 frequency-ratio trajectory.
Rose Curve cos(4θ) cos(θ) cos(4θ) sin(θ) Radially pulsing rose trajectory.
Star (Astroid) cos³(θ) sin³(θ) Four-cusped astroid.
Butterfly sin(θ) F(θ) cos(θ) F(θ) Complex radial trajectory containing a slow θ/12 component.
Butterfly radial term: F(θ) = exp(cos θ) − 2 cos(4θ) − sin(θ/12)^5
The Butterfly trajectory evolves across multiple base-rate cycles because of its θ/12 term. It should not be interpreted as a shape that necessarily completes every 1 / Trajectory Rate seconds.

Modulation modes

1. Temporal Warp — X → time

nominal maximum offset = 50 ms × Depth_ratio offset(t) = X(t) × maximum_offset × ReactivityFactor(t) × JitterFactor(t) wet(t) = source(t + offset(t))

The displacement is bidirectional: positive X reads later source time and negative X reads earlier source time. Because processing is offline, forward reads are allowed. If the requested read time falls outside the original Sound, the wet branch is set to zero at that instant.

Signal Reactivity and Instability can enlarge or reverse the nominal X displacement, so the ±50 ms × Depth range is the mapping before those modifiers.

2. Amplitude Modulation — X → gain

wet gain(t) = 1 + Depth_ratio × X(t) × ReactivityFactor(t) × JitterFactor(t) output = Dry × source + Wet × [source × wet gain]

Without Reactivity or Instability, the nominal wet gain spans 1 − Depth to 1 + Depth. This is carrier-retaining amplitude modulation, not a pure ring modulator: the wet branch retains the unity term.

3. XY Split — X warp / Y gate

Active mono input is first expanded to stereo. For arbitrary multichannel input, the existing channel count is preserved.

odd channels: X time warp, nominal maximum = 20 ms × Depth_ratio even channels: Y gate = 1 − Depth_ratio × 0.5 × (1 − Y) nominal Y-gate range = 1 − Depth_ratio ... 1

Reactivity and Instability modify the X time warp. They do not modify the Y gate.

4. XY Stereo Rotation — X warp + Y pair rotation

All channels first receive the same X-controlled wet time warp:

nominal maximum X offset = 10 ms × Depth_ratio

Then Y controls the rotation angle for each adjacent channel pair:

θpan(t) = Depth_ratio × (π/4) × Y(t) maximum pair rotation = ±45° × Depth_ratio [L'] [ cos θpan −sin θpan ] [L] [R'] = [ sin θpan cos θpan ] [R]

This matrix is orthonormal, so Y performs a constant-power rotation within each channel pair rather than simply changing the level of one side. Channels 1–2 form the first pair, 3–4 the next, and so on. If there is an unpaired final channel, its wet branch receives the X warp without Y rotation.

Active mono input is expanded to stereo for this mode. The wet rotation applies an additional 1/√2 factor to that duplicated mono pair.

Signal Reactivity & Instability

Signal Reactivity

Signal Reactivity is source-dependent modulation scaling. It is not recursive feedback: the processor reads the original analysis signal, not its own output.

ReactivityFactor(t) = min( 4, 1 + Signal_reactivity × |analysis_source(t)| )

For multichannel input, the script normally analyzes a mono fold-down. It also measures the RMS of every source channel. If the fold-down RMS is less than 10% of the strongest channel RMS, that strongest channel is used instead, avoiding severe cancellation in the shared control signal.

The same reactivity factor is shared by all processed channels.

Instability

When Instability is above zero, v0.5 creates one Gaussian-noise trajectory at the source sample rate:

JitterFactor(t) = clamp( 1 + Instability × GaussianNoise(t), −2, 4 )

The same jitter trajectory is shared across channels. Because the factor can become negative, sufficiently strong random excursions can temporarily reverse the sign of the affected X/AM modulation.

Random seed

Random SeedBehavior
0Instability uses an unpredictable random sequence.
> 0The instability trajectory is reproducible for the same seed and settings.

The random generator is returned to unpredictable initialization after the shared jitter trajectory is created.

Presets

Preset Shape Mode Rate Depth Reactivity Instability
CustomCurrent selectionCurrent selection1 Hz default50%00
Granular Time-ScrubAstroidTemporal Warp55 Hz2%0.40
Robotic AMLissajous 3:4Amplitude Modulation50 Hz100%00
Stereo Head-SpinnerButterflyXY Stereo Rotation2 Hz100%00
Broken Glitch StormDiamondTemporal Warp8 Hz60%0.80.1
Signal-Reactive ChaosButterflyTemporal Warp4 Hz80%2.50.3
Every named preset sets the mode, shape, rate, depth, reactivity, instability, and Wet amount. Random Seed, Safety Peak, visualization, and playback remain under the user's control.

Parameters

ParameterDefaultRuntime rangeMeaning
PresetCustom6 choicesLoads a complete modulation setup.
Shape typeButterfly6 shapesDefines the synchronized X/Y parametric path.
Modulation modeTemporal Warp4 modesAssigns X/Y to audio parameters.
Trajectory rate Hz1.00…200 HzBase traversal rate used in the shape equations.
Depth percent500…100%Scales the selected mode's time, gain, gate, or rotation mapping.
Signal reactivity00…3Scales X/AM modulation according to source amplitude, capped at a factor of 4.
Instability00…1Strength of the shared sample-rate Gaussian modulation multiplier.
Random seed00…21474836470 = unpredictable; positive = reproducible instability trajectory.
Dry/Wet percent1000…100%Linear blend between the direct source and the selected wet topology.
Safety peak0.990…1Peak ceiling used only to attenuate active output that exceeds it; 0 disables safety scaling.
Draw visualizationyesyes/noDraws the current AudioTools figure.
Play resultyesyes/noPlays the completed Sound.

Channels & output

Exact bypass

If Dry/Wet = 0% or Depth = 0%, the script copies the original Sound directly. Reactivity analysis, instability generation, spatial expansion, and Safety Peak scaling are skipped.

PropertyBehavior
Temporal WarpPreserves the original channel count.
Amplitude ModulationPreserves the original channel count.
XY SplitActive mono expands to stereo; 2+ channel input keeps its original channel count.
XY Stereo RotationActive mono expands to stereo; 2+ channels are processed as adjacent stereo pairs without increasing channel count.
Sample ratePreserved.
Duration / sample countPreserved.
Start timePreserved.
Trajectory timingUses local time, independent of the Sound's absolute xmin.
RandomnessOnly Instability is stochastic; it is reproducible when Random Seed is positive.

Safety Peak

After active processing, the output peak is measured. If Safety Peak is above zero and the peak exceeds that value, the complete Sound is multiplied by Safety / measured_peak. Quiet results are not boosted.

Safety Peak is attenuation-only, not normalization.

Visualization

v0.5 uses the AudioTools house layout and draws five information regions:

Input

Original waveform.

Output

Final waveform after active processing and optional Safety Peak attenuation.

XY trajectory

The jointly normalized geometric path in the XY plane.

X / Y over time

The two control coordinates over the first up to 2 seconds.

Mode mapping strip

A dedicated strip states exactly what X and Y control in the selected mode, including the nominal time-warp range, gain range, gate range, or stereo-rotation angle. It also reports Reactivity and Instability.

Summary strip

The summary reports shape, mode, rate, depth, Wet percentage, duration, input→output channel count, output peak, and Safety setting.

The XY path and time-trajectory plots use 350 drawing points. These are visualization samples only; the generated X/Y control Sounds themselves run at the source sample rate.