XY Shape LFO Modulation 2D Trajectory
Two-dimensional LFO modulation using mathematical shape trajectories (X and Y functions) for complex time-warping, amplitude modulation, and spatial effects.
What this does
🔄 Two-Dimensional LFO Concept
Traditional LFOs: Single low-frequency oscillator controlling one parameter (pitch, amplitude, filter).
XY Shape LFO: Two synchronized LFOs (X and Y) following mathematical trajectories, creating complex two-dimensional modulation paths. X and Y values control different audio parameters simultaneously.
Visualization: Shows actual X-Y trajectory plot alongside audio spectrogram, making modulation patterns visible.
🎛️ Three Modulation Approaches
1. Temporal Folding (Time Warp):
- X value controls time offset (playback position)
- Creates granular-like time scrubbing effects
- Can create feedback loops with audio content
2. Ring Modulation (AM):
- X value controls amplitude modulation depth
- Creates robotic, metallic ring modulation effects
- Classic amplitude modulation with shape-based control
3. Spatio-Temporal (Time + Pan):
- X value controls time warp (left channel)
- Y value controls pan position/amplitude (right channel)
- Creates complex stereo spatialization effects
This script implements two-dimensional shape-based modulation — generating X and Y control signals from mathematical curves, then using these signals to modulate audio in various ways. Unlike standard LFOs that use simple waveforms (sine, triangle, etc.), this plugin uses complex mathematical shapes as modulation sources, creating intricate, evolving modulation patterns.
Key Features:
- 5 Artistic Presets — From granular textures to chaotic recursion
- 6 Mathematical Shapes — Circle, diamond, Lissajous, rose, star, butterfly
- 3 Modulation Modes — Time warp, ring modulation, spatio-temporal
- Audio Feedback — Signal modulates itself (recursive effects)
- Parameter Instability — Adds controlled randomness to trajectories
- Visual Feedback — X-Y trajectory plot + spectrogram visualization
- Complex Control — Two-dimensional parameter space exploration
- Stereo Processing — Different processing per channel in spatio-temporal mode
Technical Implementation: (1) Shape generation: Create X and Y signals from parametric equations. (2) Trajectory scaling: Normalize to -1 to 1 range. (3) Mode selection: Apply X/Y to different audio parameters. (4) Feedback application: Optional recursive modulation based on audio content. (5) Instability addition: Optional randomness to trajectories. (6) Audio processing: Apply modulation via Praat formulas. (7) Visualization: Plot X-Y trajectory and spectrogram. (8) Cleanup: Remove intermediate trajectory objects.
Quick start
- In Praat, select exactly one Sound object to process.
- Run script… →
XY_Shape_LFO_Modulation.praat. - Choose Preset or "Custom" for manual control.
- Select Shape_type (mathematical curve for X-Y trajectories).
- Choose Modulation_mode (how X/Y affect audio).
- Set Trajectory_rate_Hz (speed of shape traversal).
- Adjust Depth (modulation intensity).
- Set Signal_feedback (0-2, audio modulates itself).
- Set Instability (0-1, random trajectory variation).
- Enable Draw_visualization to see X-Y plot and spectrogram.
- Choose Play_result for immediate playback.
- Click OK — processing runs with visual feedback.
- Output named "[original]_[preset]" appears with visualization.
Shape LFO Theory
Two-Dimensional Modulation Concept
📈 X-Y Parameter Space
Traditional 1D LFO: Single control signal c(t) modulating parameter p: p' = p × (1 + depth × c(t))
2D Shape LFO: Two control signals x(t) and y(t) from parametric equations, modulating parameters in coordinated ways.
Audio application: Use x(t) and y(t) to control different audio parameters simultaneously, creating complex correlated modulation.
Parametric Equations & Trajectories
🧮 Mathematical Foundation
Parametric vs. Cartesian:
- Cartesian: y = f(x) (single-valued function)
- Parametric: x = f(t), y = g(t) (time-based, can represent complex curves)
Why parametric for LFOs:
- Can represent closed curves (circles, stars)
- Can represent multi-valued relationships
- Natural time-based progression
- Easy to synchronize X and Y
Normalization: All shapes scaled to range [-1, 1] for consistent modulation depth.
Phase relationship: X and Y signals maintain precise phase relationship defined by shape equations.
Feedback & Recursive Modulation
🔁 Self-Modulating Systems
Traditional modulation: External LFO modulates audio signal.
Feedback modulation: Audio signal modulates its own modulation.
Creative use: Creates textures where loud passages modulate more than quiet ones, creating dynamic, responsive effects.
Instability & Stochastic Variation
🎲 Controlled Randomness
Purpose: Add organic variation to precise mathematical trajectories.
Effects:
- I = 0: Perfect mathematical trajectories
- 0 < I < 0.3: Subtle humanization
- 0.3 < I < 0.7: Noticeable variation
- I > 0.7: Dominant randomness
Use cases: Analog emulation (component variation), organic textures, avoiding mechanical repetition.
Visualization System
Mathematical Shapes
📐 Six Parametric Curves
Each shape produces distinct X-Y trajectories with different musical characteristics. Shapes range from simple geometric forms to complex mathematical curves.
Shape 1: Circle
⭕ Simple Harmonic Motion
Equations:
Audio characteristics: Smooth, continuous modulation. X and Y have same amplitude but different phase, creating coordinated but distinct modulation signals.
Use cases: Smooth panning, gentle time warping, classic LFO sounds with stereo correlation.
Shape 2: Diamond
💠 Triangle Wave Variant
Equations:
Audio characteristics: Linear ramps with sharp turns. Creates more pronounced, edgy modulation compared to circle. The arcsin of sine creates triangle-like waves.
Use cases: More aggressive modulation, glitch effects, rhythmic patterns.
Shape 3: Lissajous (3:4)
🎯 Frequency Ratio Pattern
Equations:
Audio characteristics: Complex, repeating pattern. The 3:4 frequency ratio creates interesting interference patterns. More harmonic content than simple shapes.
Use cases: Complex modulation patterns, evolving textures, mathematical music.
Shape 4: Rose Curve
🌹 Polar Coordinate Beauty
Equations:
Audio characteristics: Pulsing, breathing modulation. The varying radius creates amplitude-like modulation on top of circular motion.
Use cases: Breathing textures, pulsating effects, evolving pads.
Shape 5: Star (Astroid)
⭐ Hypocycloid Pattern
Equations:
Audio characteristics: Sharp attacks with curved decays. The cubed functions create sharper corners than sine/cosine. More dynamic range variation.
Use cases: Percussive modulation, sharp transients, staccato effects.
Shape 6: Butterfly Curve
🦋 Complex Transcendental
Equations:
Audio characteristics: Extremely complex, evolving modulation. Multiple frequency components (θ, 4θ, θ/12) create rich, ever-changing pattern.
Use cases: Maximum complexity, evolving textures, experimental sounds, chaotic modulation.
Shape Comparison
| Shape | Complexity | Symmetry | Smoothness | Harmonic Content | Musical Character |
|---|---|---|---|---|---|
| Circle | Low | High | High | Pure sine/cosine | Smooth, gentle |
| Diamond | Low | High | Low (corners) | Triangle-like | Edgy, rhythmic |
| Lissajous | Medium | Medium | High | Multiple harmonics | Complex, repeating |
| Rose | Medium | High | High | Amplitude modulated | Pulsing, breathing |
| Star | Medium | High | Low (points) | Rich harmonics | Sharp, percussive |
| Butterfly | High | Low | Variable | Very rich | Complex, evolving |
Mathematical Properties
Modulation Modes
🎚️ Three Processing Approaches
Each mode uses X and Y trajectories differently to create distinct audio effects. The same shape can produce completely different results depending on mode.
Mode 1: Temporal Folding (Time Warp)
⏱️ Time Domain Manipulation
Process: Use X trajectory to warp time axis, creating granular-like effects.
Effects:
- Small depth: Subtle time smearing
- Medium depth: Granular texture
- Large depth: Extreme time scrambling
- With feedback: Self-modulating time warp
Audio result: Creates granular synthesis-like effects, time compression/expansion, scrubbing effects.
Example: Circle shape at 50 Hz with depth 0.02 creates 50Hz granular texture with smooth time variation.
Mode 2: Ring Modulation (AM)
📻 Amplitude Modulation
Process: Use X trajectory to modulate amplitude, creating classic ring modulation effects.
Effects:
- Small depth: Subtle tremolo
- Medium depth: Classic ring mod character
- Large depth (depth > 1): Extreme distortion, phase inversion
- With feedback: Self-modulating amplitude
Audio result: Creates metallic, robotic tones, tremolo effects, harmonic distortion.
Example: Lissajous shape at 50 Hz with depth 1.0 creates complex metallic ring modulation with 3:4 pattern.
Mode 3: Spatio-Temporal (Time + Pan)
🎧 Stereo Spatialization
Process: Use X for time warp on left channel, Y for pan/amplitude on right channel.
Effects:
- X variation: Time differences between channels
- Y variation: Amplitude differences (panning effect)
- Combined: Complex stereo spatialization
- With butterfly shape: Evolving stereo field
Audio result: Creates complex stereo imaging with time and amplitude differences between channels, "spinning" or "swirling" effects.
Example: Butterfly shape at 2 Hz creates slowly evolving stereo field with complex spatial movement.
Mode Comparison
| Aspect | Temporal Folding | Ring Modulation | Spatio-Temporal |
|---|---|---|---|
| Primary Effect | Time warping/granular | Amplitude modulation | Stereo spatialization |
| X Usage | Time offset | Amplitude scale | Left channel time offset |
| Y Usage | Not used | Not used | Right channel amplitude |
| Output Channels | Mono | Mono | Stereo |
| Typical Depth | 0.01-0.1 | 0.2-1.0 | 0.2-0.8 |
| Character | Granular, glitchy | Metallic, robotic | Spatial, swirling |
| Best Shapes | Circle, diamond | Lissajous, star | Butterfly, rose |
Feedback System
Instability Implementation
🎲 Adding Random Variation
Applications
Sound Design & Experimental Music
Use case: Create evolving textures, granular effects, and complex modulations
Techniques:
- Granular textures: Temporal folding mode with high rates (20-100 Hz)
- Metallic effects: Ring modulation mode with Lissajous/star shapes
- Spatial movement: Spatio-temporal mode with butterfly/rose shapes
- Chaotic systems: High feedback (>1.5) with instability
- Glitch effects: Diamond shape with moderate depth and instability
- Evolving pads: Rose shape with slow rates (0.1-2 Hz)
Music Production & Processing
Use case: Add movement, texture, and interest to tracks
Techniques:
- Vocal processing: Subtle temporal folding for texture
- Drum enhancement: Ring modulation for metallic character
- Stereo widening: Spatio-temporal for spatial movement
- Transition effects: Parameter automation for evolving textures
- Ambient textures: Slow shapes with feedback for self-generating textures
Academic & Educational Applications
Use case: Study modulation, parametric equations, audio-visual relationships
Techniques:
- Visual-audio correlation: See shape, hear modulation effect
- Mathematical exploration: Connect equation parameters to sound character
- Modulation perception: Compare different shapes' auditory effects
- Feedback system study: Observe chaotic behavior in audio systems
- Stereo perception: Study spatial effects of correlated modulation
Practical Workflow Examples
🎬 Film Sound Design: Time Distortion
Goal: Create time-warped effect for flashback/dream sequence
Settings:
- Mode: Temporal Folding
- Shape: Rose Curve (breathing quality)
- Rate: 0.8 Hz (slow evolution)
- Depth: 0.03 (subtle time warp)
- Feedback: 0.3 (content-responsive)
- Instability: 0.1 (slight variation)
- Source: Dialogue or environmental recording
Result: Subtle time smearing with breathing quality, louder passages warp more due to feedback.
Post-processing: Add reverb, layer with other elements, automate parameters for evolution.
🎵 Electronic Music: Robotic Texture
Goal: Create metallic, robotic lead sound from synth patch
Settings:
- Mode: Ring Modulation
- Shape: Star (sharp, percussive)
- Rate: 88 Hz (musical: 2× A3 = 220 Hz / 2.5 ≈ 88)
- Depth: 0.8 (pronounced modulation)
- Feedback: 0.0 (clean modulation)
- Instability: 0.0 (precise)
- Source: Simple synth waveform (saw or square)
Result: Metallic, robotic lead with sharp attacks from star shape, harmonically related to musical content.
Musical use: Lead line in electronic track, processed through filter and effects chain.
🔬 Academic Study: Shape Perception
Goal: Determine if listeners can identify shapes from audio alone
Method:
- Create stimuli: Same source with 6 different shapes (same rate, depth, mode)
- Mode: Ring Modulation (clearest shape effect)
- Rate: 5 Hz (perceptible pattern)
- Depth: 0.5 (clear modulation)
- Conduct listening test: Match shape visual to audio
- Analyze recognition rates for each shape
Expected findings: Circle and diamond easily distinguished, complex shapes (butterfly, rose) more difficult, Lissajous recognized by repeating pattern.
Application: Understand auditory perception of mathematical patterns.
Advanced Techniques
- Rate automation: Script that changes rate over time (accelerando/ritardando)
- Shape morphing: Interpolate between shapes over time
- Multi-stage processing: Apply different modes in sequence
- Frequency-specific modulation: Apply to filtered bands only
- Parameter linking: Link instability to feedback for controlled chaos
- External control: Use other sounds as trajectory sources (not just mathematical shapes)
- Simple waveforms: Show shape characteristics most clearly
- Complex sounds: Create dense, textured results
- Rhythmic material: Interact with shape rhythms
- Sustained tones: Show smooth evolution
- Transient-rich: Create stuttering, granular effects
- Stereo sources: Process differently in spatio-temporal mode
Troubleshooting Common Issues
Causes: High depth, high feedback, instability > 0.7
Solutions: Reduce depth, reduce feedback, reduce instability, normalize output
Causes: Ring modulation with depth > 1 (negative multiplication), extreme time warping
Solutions: Reduce depth, use different mode, avoid extreme settings
Causes: Simple shapes at rational rates, no instability
Solutions: Use complex shapes (butterfly), add instability, use irrational rate ratios
Causes: Complex shapes (butterfly), long duration, high sample rate
Solutions: Use simpler shapes for testing, process shorter segments, be patient for complex shapes
Causes: Praat Picture window not open, very short sounds
Solutions: Open Picture window, use longer sounds for visualization
Causes: Feedback > 1 creates chaotic systems
Solutions: This is expected behavior for feedback > 1, use lower feedback for predictable results
Performance Considerations
Theoretical & Historical Context
LFOs in Music Technology
📻 History of Low-Frequency Oscillators
Analog synthesizers (1960s-1970s):
- Moog, ARP, Buchla: Voltage-controlled LFOs
- Simple waveforms: sine, triangle, square, saw
- Applications: vibrato, tremolo, filter modulation
Digital synthesizers (1980s):
- FM synthesis (Yamaha DX7): Complex modulation possibilities
- Wavetable synthesis: Scanning through waveforms
- More complex modulation routings
Computer music (1990s-present):
- Arbitrary waveform LFOs
- Multi-stage envelopes
- Complex modulation matrices
- Algorithmic/generative approaches
This plugin innovation: Using mathematical curves as LFO shapes, two-dimensional correlated modulation, audio feedback for self-modulation.
Mathematical Curves in Art & Music
🎨 Mathematics as Artistic Inspiration
Historical examples:
- Lissajous curves: Jules Antoine Lissajous (1857), used to visualize vibrations
- Rose curves: Studied by Grandi (1723), beautiful symmetrical patterns
- Butterfly curve: Temple H. Fay (1989), aesthetic mathematical discovery
- Hypocycloids: Ancient curves, studied by Dürer, Descartes
Musical applications:
- Xenakis: Used mathematical functions for composition
- Algorithmic composition: Mathematical rules generating music
- Visual music: Correlating visual patterns with sound
- Parameter mapping: Using curves to control sound parameters
This plugin approach: Direct sonification of mathematical beauty, making abstract curves audible through modulation.
Granular Synthesis & Time Warping
⏱️ Time Domain Manipulation History
Early techniques:
- Tape manipulation: Varispeed, tape loops (1950s-1960s)
- Analog delay: BBD, tape echo time effects
- Digital beginnings: First time-stretching algorithms (1970s)
Granular synthesis:
- Curtis Roads (1970s): Theoretical foundation
- Barry Truax (1980s): Real-time implementations
- Modern applications: Texture creation, time manipulation
This plugin temporal folding: Simplified granular approach using continuous time warping rather than discrete grains, shape-controlled time offset.
Related Audio Processing Techniques
Further Reading & Resources
Mathematics of curves:
- Lawrence, J. D. (1972). A Catalog of Special Plane Curves. Dover Publications.
- Yates, R. C. (1952). Curves and Their Properties. National Council of Teachers of Mathematics.
- Weisstein, E. W. "MathWorld" online resource for mathematical curves.
Audio modulation & synthesis:
- Roads, C. (1996). The Computer Music Tutorial. MIT Press.
- Russ, M. (2008). Sound Synthesis and Sampling. Focal Press.
- Miranda, E. R. (2002). Computer Sound Design: Synthesis Techniques and Programming. Focal Press.
Visual music & sonification:
- Brougher, K. et al. (2005). Visual Music: Synaesthesia in Art and Music Since 1900. Thames & Hudson.
- Hermann, T., Hunt, A., & Neuhoff, J. G. (Eds.). (2011). The Sonification Handbook. Logos Publishing.
Online resources:
- Mathematical curve visualizations and equations
- LFO modulation tutorials and examples
- Granular synthesis resources
- Audio visualization techniques