Auto-Swell (Musical Dynamics) — User Guide

Dynamic amplitude modulation: applies periodic or envelope-shaped amplitude modulations with stereo spatialization for musical dynamic effects.

Author: Based on Praat AudioTools by Shai Cohen Version: 2025 Output: Modified Sound object with stereo swell effects
Contents:

What this does

This script implements auto-swell dynamic modulation — applying sophisticated amplitude envelopes and periodic modulations to create musical dynamic effects. The process: (1) Waveform generation: Create modulation signals using 12 different swell shapes, (2) Stereo processing: Apply independent or related modulations to left/right channels, (3) Amplitude modulation: Multiply audio signals by modulation envelopes, (4) Output combination: Create stereo result with spatial dynamic effects. Result: rich, evolving amplitude modulations that can simulate tremolo, auto-pan, rhythmic gating, and complex dynamic textures.

Key Features:

What is auto-swell modulation? Traditional amplitude effects: tremolo (sine modulation), auto-pan (stereo modulation), gating (rhythmic on/off). Auto-swell: comprehensive dynamic modulation system with multiple waveform shapes and stereo configurations. Advantages: (1) Musical quality: Natural-sounding dynamic curves, (2) Flexibility: Wide range from subtle to extreme effects, (3) Stereo enhancement: Creates spatial movement and interest, (4) Creative possibilities: Complex rhythmic and textural effects, (5) Precision control: Exact parameter specification. Use cases: Music production (dynamic effects), sound design (evolving textures), film scoring (emotional dynamics), live performance (auto-accompaniment), experimental music (rhythmic structures).

Technical Implementation: (1) Input handling: Convert mono to stereo, extract separate channels. (2) Modulation generation: Create LFO signals using mathematical formulas for each shape. (3) Stereo processing: Generate left/right modulations based on selected mode. (4) Amplitude application: Multiply audio signals by modulation envelopes. (5) Output combination: Recombine channels, normalize, and rename. Key insight: Mathematical waveforms × stereo configurations × amplitude scaling = rich dynamic modulations.

Quick start

  1. In Praat, select exactly one Sound object (mono or stereo).
  2. Run script…auto_swell.praat.
  3. Choose swell shape: Sine wave for tremolo, Square for gating, etc.
  4. Set swell rate (0.1-10 Hz typical, lower = slower swells).
  5. Adjust depth (0-100%, how much modulation applies).
  6. Choose stereo mode for spatial effects.
  7. Click OK — processes audio, creates "originalname_autoswelled_stereo".
Quick tip: Start with Sine wave + 1 Hz + 50% depth + Phase offset stereo for classic tremolo with auto-pan. Use Square wave + 2-4 Hz + 80% depth for rhythmic gating. Try Random walk + 0.5 Hz + 30% depth for organic, evolving dynamics. For stereo effects, Phase offset (90°) creates rotating auto-pan, Different rates creates polyrhythmic effects. Processing is fast for most audio lengths.
Important: AMPLITUDE MODULATION — reduces overall loudness, normalization recommended. Extreme depth (90-100%) can cause near-silence at modulation minima. Very high rates (>5 Hz) may cause aliasing or unnatural effects. Random walk with low smoothness can create abrupt level changes. Square wave and pulse gate create hard transitions that may introduce clicks. Mono inputs automatically converted to stereo. Always monitor output levels — some parameter combinations can create very quiet results.

Dynamic Modulation Theory

Amplitude Modulation Fundamentals

Basic Concepts

Mathematical foundation:

Amplitude Modulation: output(t) = input(t) × modulation(t) Where modulation(t) ranges [0,1] or [min_level, 1] Depth control: modulation_scaled(t) = (1 - depth) + depth × modulation(t) Where depth = 0 → no effect, depth = 1 → full modulation Example: Sine wave modulation modulation(t) = 0.5 + 0.5 × sin(2π × rate × t) With 50% depth: mod_scaled = 0.75 + 0.25 × sin(2π × rate × t) Output ranges from 50% to 100% amplitude

Musical Dynamic Ranges

Practical depth settings:

Subtle enhancement: 10-30% depth - Barely perceptible modulation - Adds life and movement - Good for background elements Moderate effect: 30-60% depth - Clearly audible modulation - Musical dynamic variation - Main instrument treatment Strong effect: 60-90% depth - Prominent amplitude changes - Rhythmic emphasis - Special effects Extreme effect: 90-100% depth - Near-silence to full volume - Dramatic gating/tremolo - Experimental uses

Temporal Characteristics

Rate and Musical Tempo

Rate to musical timing conversion:

Swell period = 1 / rate BPM equivalent = 60 × rate Common musical rates: 0.1 Hz = 6 BPM (very slow, 10 seconds/cycle) 0.5 Hz = 30 BPM (slow, 2 seconds/cycle) 1.0 Hz = 60 BPM (medium, 1 second/cycle) 2.0 Hz = 120 BPM (fast, 0.5 seconds/cycle) 4.0 Hz = 240 BPM (very fast, 0.25 seconds/cycle) Typical usage: Slow rates (0.1-0.5 Hz): Breathing, evolving textures Medium rates (0.5-2 Hz): Musical phrasing, tremolo Fast rates (2-5 Hz): Rhythmic effects, trills Very fast (>5 Hz): Timbre modification, special FX

Phase Starting Points

Musical impact of phase initialization:

Start at minimum (fade in): ▁▂▃▄▅▆▇█ (rising from silence) Creates gentle entrance, build-up Good for beginnings, transitions Start at maximum (fade out): █▇▆▅▄▃▂▁ (starting loud, fading) Creates release, decay Good for endings, downward motion Start at middle: ▄▅▆▇█▇▆▅ (starting at average level) Neutral, continuous effect Good for ongoing textures Phase affects how effect "enters" the audio

Stereo Spatialization

Panning and Width Effects

Creating spatial movement:

Basic stereo modulation: Left(t) = input_L(t) × mod_L(t) Right(t) = input_R(t) × mod_R(t) When mod_L ≠ mod_R, creates amplitude panning Perceived location depends on level difference: mod_L > mod_R → sound leans left mod_L = mod_R → centered mod_L < mod_R → sound leans right Continuous modulation = auto-panning Sound appears to move between speakers

Complete Processing Pipeline

INPUT: Sound object (mono/stereo) STEP 1: CHANNEL PREPARATION IF mono input: Convert to stereo (duplicate channels) Extract separate left/right channels STEP 2: MODULATION GENERATION FOR left channel: Create modulation signal using selected shape Apply phase starting point Scale by depth parameter FOR right channel (based on stereo mode): Mode 1 (Same): Copy left modulation Mode 2 (Phase offset): Generate with phase shift Mode 3 (Different rates): Generate with rate multiplier Mode 4 (Different shapes): Generate with alternate shape STEP 3: AMPLITUDE MODULATION Left_processed = Left_original × Left_modulation Right_processed = Right_original × Right_modulation STEP 4: OUTPUT COMBINATION Combine processed channels to stereo Apply normalization if requested Rename with "_autoswelled_stereo" suffix STEP 5: CLEANUP Remove temporary objects Select final output Auto-play result OUTPUT: Stereo sound with dynamic modulation

Swell Shapes

Standard Waveforms

1. Sine wave (smooth)

Shape: ▄▅▆▇█▇▆▅▄ Smooth sinusoidal curve

Formula: 0.5 + 0.5 × sin(2π × rate × t)

Character: Natural, musical, classic tremolo

Best for: General purpose, vocal tremolo, string vibrato simulation

2. Triangle wave (linear)

Shape: ▁▂▃▄▅▆▇█▇▆▅▄▃▂▁ Linear ramps up and down

Formula: Triangle function with 0-1 range

Character: Clean, synthetic, even sweeps

Best for: Synthetic sounds, sci-fi effects, even dynamics

3. Sawtooth (rise, instant drop)

Shape: ▁▂▃▄▅▆▇█▁▂▃▄▅▆▇█ Gradual rise, instant reset

Formula: (rate × t) mod 1

Character: Forward-moving, building tension

Best for: Rhythmic builds, scanner effects, tension creation

4. Reverse sawtooth (instant rise, fall)

Shape: █▇▆▅▄▃▂▁█▇▆▅▄▃▂▁ Instant attack, gradual decay

Formula: 1 - ((rate × t) mod 1)

Character: Percussive, decaying, reversed

Best for: Reverse effects, percussive sweeps, impact tails

5. Square wave (hard gate)

Shape: ████▁▁▁▁████▁▁▁▁ Instant on/off transitions

Formula: 1 if (rate × t mod 1) < 0.5 else 0

Character: Rhythmic, choppy, trance-like

Best for: Trance gates, rhythmic chopping, on/off effects

Complex Envelopes

6. Exponential rise

Shape: ▁▂▃▄▅▆▇█ Exponential curve up

Formula: 1 - exp(-6 × (rate × t mod 1))

Character: Natural attack, building intensity

Best for: Crescendos, swells, intensity builds

7. Exponential fall

Shape: █▇▆▅▄▃▂▁ Exponential decay down

Formula: exp(-6 × (rate × t mod 1))

Character: Natural decay, release tail

Best for: Decays, releases, echo tails

8. S-curve (ease in-out)

Shape: ▁▂▃▄▅▆▇█▇▆▅▄▃▂▁ Smooth acceleration/deceleration

Formula: Cosine-based ease function

Character: Very smooth, natural, musical

Best for: Vocal phrases, string lines, natural dynamics

9. Double peak (two swells per cycle)

Shape: ▁▂▃▄▅▆▇█▆▅▄▃▂▁▂▃▄▅▆▇█ Two peaks per period

Formula: |sin(4π × rate × t)|

Character: Rhythmic, double-time feel

Best for: Fast rhythms, double-time effects, energetic patterns

Specialized Shapes

10. Random walk (organic chaos)

Shape: ▁▃▂▅▄█▆▂▄▇▅▁ Unpredictable, smooth random

Formula: Smoothed Gaussian random values

Character: Organic, evolving, unpredictable

Best for: Evolving textures, natural sounds, aleatoric music

11. Pulse gate (rhythmic chopping)

Shape: ██▁▁▁▁██▁▁▁▁ Variable width pulses

Formula: 1 if (rate × t mod 1) < pulse_width else 0

Character: Rhythmic, stuttering, precise

Best for: Stutter effects, rhythmic patterns, glitch effects

12. Rise-fall envelope (single arc)

Shape: ▁▂▃▄▅▆▇█▇▆▅▄▃▂▁ Single rise and fall over entire duration

Formula: Exponential rise/fall across full sound

Character: Macro dynamics, overall shape

Best for: Overall dynamics, phrase shaping, macro envelopes

Shape Selection Guide

Musical ApplicationRecommended ShapesTypical RateTypical Depth
Vocal tremoloSine, S-curve5-8 Hz20-40%
String vibratoSine, Triangle4-7 Hz15-30%
Rhythmic gatingSquare, Pulse gate1-4 Hz60-90%
Ambient evolutionRandom walk, Exponential0.1-0.5 Hz30-60%
Build-up tensionSawtooth, Exponential rise0.5-2 Hz50-80%
Trance effectSquare, Double peak2-4 Hz70-95%
Natural phrasingS-curve, Exponential0.2-1 Hz40-70%
Special FXReverse sawtooth, Random0.5-3 Hz80-100%

Stereo Modes

Mode 1: Same effect both sides (mono)

🎵 Centered Dynamic Effects

Behavior: Identical modulation on left and right channels

Spatial effect: Centered, no movement

Perception: Overall amplitude changes, traditional tremolo

Best for: Mono compatibility, centered instruments, when stereo width already exists

Mode 2: Phase offset (left/right out of phase)

🌀 Rotating Auto-Pan

Behavior: Same shape and rate, but right channel phase-shifted

Spatial effect: Sound appears to rotate between speakers

Phase options: 90° (quadrature), 180° (opposite), custom 0-180°

Best for: Auto-panning, rotating effects, stereo enhancement

Phase Offset Examples

90° offset (quadrature): Left: ▄▅▆▇█▇▆▅▄▅▆▇█▇▆▅▄ Right: ▅▆▇█▇▆▅▄▅▆▇█▇▆▅▄▅ Creates smooth circular motion 180° offset (opposite): Left: ▄▅▆▇█▇▆▅▄▅▆▇█▇▆▅▄ Right: ▇▆▅▄▅▆▇█▇▆▅▄▅▆▇█ Hard left/right alternation 45° offset (subtle): Left: ▄▅▆▇█▇▆▅▄▅▆▇█▇▆▅▄ Right: ▆▇█▇▆▅▄▅▆▇█▇▆▅▄▅ Gentle left/right motion

Mode 3: Different rates (polyrhythmic)

🎶 Polyrhythmic Dynamics

Behavior: Same shape, but different rates for left/right

Spatial effect: Complex, evolving patterns as rates interact

Rate relationships: Simple ratios create predictable patterns

Best for: Complex textures, evolving patterns, mathematical music

Rate Ratio Examples

2:1 ratio (octave): Left rate = 1 Hz, Right rate = 2 Hz Right completes 2 cycles per left cycle Creates stable, repeating pattern 3:2 ratio (perfect fifth): Left rate = 1.5 Hz, Right rate = 1 Hz Pattern repeats every 2 seconds Musical, consonant relationship Golden ratio (1.618:1): Left rate = 1 Hz, Right rate = 0.618 Hz Never exactly repeats, constantly evolving Organic, mathematical complexity

Mode 4: Different shapes (contrasting textures)

🎨 Textural Contrast

Behavior: Different swell shapes on left/right channels

Spatial effect: Contrasting dynamic characters create complexity

Shape combinations: Smooth vs rhythmic, rising vs falling, etc.

Best for: Complex textures, experimental music, sound design

Effective Shape Combinations

Left ShapeRight ShapeResult Character
Sine waveSquare waveSmooth vs rhythmic contrast
SawtoothReverse sawtoothRising vs falling tension
Exponential riseExponential fallBuilding vs releasing energy
Random walkSine waveChaotic vs ordered interplay
TriangleDouble peakSimple vs complex rhythms

Parameters & Settings

Core Modulation Parameters

ParameterTypeDefaultDescription
Swell_shapeoptionmenuSine waveModulation waveform shape
Swell_rate_Hzpositive0.5Modulation frequency in Hz
Depth_percentpositive80Modulation depth (0-100%)

Stereo Spatialization Parameters

ParameterTypeDefaultDescription
Stereo_modeoptionmenuPhase offsetLeft/right channel relationship
Phase_offset_degreespositive90Phase difference for offset mode
Right_rate_multiplierpositive1.5Rate multiplier for different rates mode
Right_swell_shapeoptionmenuTriangle waveShape for right channel (different shapes mode)

Advanced Parameters

ParameterTypeDefaultDescription
Normalize_outputboolean1Normalize output to prevent volume loss
Phase_startoptionmenuStart at minimumInitial phase of modulation
Pulse_width_percentpositive50Pulse width for pulse gate shape
Random_smoothnesspositive10Smoothing amount for random walk

Parameter Interactions

Depth calculation: modulation_scaled = (1 - depth) + depth × modulation_raw Example: depth = 80% (0.8), modulation ranges [0,1] Scaled range = [0.2, 1.0] (20% to 100% amplitude) Rate to period: period_seconds = 1 / swell_rate_Hz Example: rate = 2 Hz → period = 0.5 seconds Phase offset conversion: phase_radians = phase_degrees × π / 180 Example: 90° → 1.57 radians (π/2) Pulse width: on_time = pulse_width × period off_time = (1 - pulse_width) × period

Applications

Music Production

Use case: Adding dynamic interest to static sounds

Technique: Apply subtle modulation to pads, strings, vocals

Example: Sine wave tremolo on synth pads for organic movement

Sound Design

Use case: Creating rhythmic and textural effects

Technique: Extreme settings with complex shapes

Example: Random walk on noise for evolving textures

Live Performance

Use case: Auto-accompaniment and dynamic backing

Technique: Pre-programmed modulation patterns

Example: Polyrhythmic patterns for electronic performance

Film Scoring

Use case: Emotional dynamics and tension building

Technique: Slow rates with exponential shapes

Example: Exponential rise for building tension in scenes

Practical Workflow Examples

🎤 Vocal Tremolo Enhancement

Goal: Add natural-sounding vibrato to sustained vocals

Settings:

  • Shape: Sine wave
  • Rate: 6 Hz (natural vibrato rate)
  • Depth: 25% (subtle enhancement)
  • Stereo: Same both sides
  • Phase: Start at middle

Result: Natural vocal vibrato without artificial sound

🎹 Trance Gate Effect

Goal: Create rhythmic trance gate on synth chords

Settings:

  • Shape: Pulse gate
  • Rate: 3 Hz (180 BPM feel)
  • Depth: 90% (strong effect)
  • Pulse width: 30% (short pulses)
  • Stereo: Phase offset 90°

Result: Rhythmic gating with auto-pan movement

🎻 String Section Swell

Goal: Create natural phrasing for string ensemble

Settings:

  • Shape: S-curve
  • Rate: 0.3 Hz (slow phrasing)
  • Depth: 60% (musical dynamics)
  • Stereo: Different rates (1:0.9)
  • Phase: Start at minimum

Result: Natural string section phrasing with stereo width

Advanced Techniques

Layering multiple effects:
  • Fast + Slow: Apply both fast tremolo and slow swells simultaneously
  • Different stereo modes: Process left/right separately with different settings
  • Serial processing: Apply auto-swell, then other effects like reverb
  • Parallel processing: Mix dry and wet signals for subtle effects
  • Automation: Process short segments with different settings for evolving effects
Creative parameter combinations:
  • Extreme rates: 0.01 Hz for very slow evolution, 20+ Hz for tonal effects
  • Minimal depth: 5-10% for barely perceptible movement
  • Complex ratios: Use irrational numbers for never-repeating patterns
  • Contrasting shapes: Combine organic and mechanical shapes
  • Phase relationships: Experiment with unusual phase offsets

Troubleshooting Common Issues

Problem: Output too quiet
Cause: High depth with normalization disabled
Solution: Enable normalize_output or reduce depth
Problem: Clicking artifacts
Cause: Hard transitions in square/pulse shapes
Solution: Use smoother shapes or apply gentle fade-in
Problem: Unnatural sounding
Cause: Too high rate or inappropriate shape
Solution: Lower rate, choose more natural shape (sine, S-curve)
Problem: Stereo image collapses
Cause: Same mode with high depth
Solution: Use phase offset or different rates modes
Problem: Random too chaotic
Cause: Low smoothness setting
Solution: Increase random_smoothness (10-30 typical)