Golden-Chaos Vibrato Effect — User Guide

Mathematical elegance meets audio processing: creates never-repeating vibrato patterns using nested modulations driven by fundamental irrational constants—π (pi), φ (phi), and e (Euler's number)—for perfectly irregular, musically rich pitch modulation.

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

What this does

This script implements a mathematically-driven vibrato effect that uses fundamental irrational constants as modulation sources to create complex, never-repeating pitch variations. Unlike traditional vibrato with simple periodic modulation, this effect combines three of mathematics' most important constants—π (pi), φ (golden ratio), and e (Euler's number)—in nested sine waves to generate quasi-periodic patterns that are both musically coherent and mathematically elegant. The result is vibrato that feels organic and natural while being generated from pure mathematical principles.

Key Features:

Why irrational constants? Traditional vibrato uses rational frequency ratios that eventually repeat. By using fundamental irrational constants—numbers that cannot be expressed as simple fractions—the modulation patterns never exactly repeat. The golden ratio (φ ≈ 1.61803) is particularly important because ratios involving φ are maximally irrational, creating the most uniform distribution of modulation phases. This mathematical property translates to vibrato that feels perfectly natural and organic.

Technical Implementation: (1) Safety renaming: Prevents Praat formula errors by using explicit object references. (2) Nested modulation: Creates delay = base × (1 + depth × sin(2π×rate1×t + mix2×sin(2π×rate2×t) + mix3×sin(2π×rate3×t))). (3) Irrational frequencies: Uses mathematical constants to ensure non-repeating patterns. (4) Boundary protection: Ensures delay indices stay within valid sample range. (5) Stereo handling: Preserves original channel arrangement through row-based processing.

Quick start

  1. In Praat, select exactly one Sound object (mono or stereo).
  2. Run script…golden_chaos_vibrato_effect.praat.
  3. Choose a Preset or select "Custom" to adjust parameters manually.
  4. Adjust Delay Parameters:
    • Base_delay_ms: Center delay time (4-12 ms)
    • Modulation_depth: Vibrato intensity (0.05-0.25)
  5. Set Modulation Rates using mathematical constants:
    • Rate1_hz: Primary rate (often π, φ, or e)
    • Rate2_hz: Secondary rate (related constant)
    • Rate3_hz: Tertiary rate (completing the set)
  6. Adjust Mixing Ratios for complexity control.
  7. Click OK — effect applied, result named "originalname_chaos".
Quick tip: Start with Golden Shimmer for smooth, organic vibrato. Use Pi Cycle for classic vibrato character. Try Mathematical Chaos for complex, evolving patterns. Lower modulation_depth (0.05-0.1) creates subtle enhancement, while higher values (0.15-0.25) produce dramatic effects. The presets are carefully tuned to exploit mathematical relationships between the constants—experiment with custom values once you understand the patterns.
Important: This effect uses delay-based pitch shifting which works best on monophonic material. Extreme modulation_depth (>0.25) may cause audible artifacts or distortion. Very short base_delay_ms (<3 ms) can produce flanging effects rather than vibrato. Very long base_delay_ms (>15 ms) may cause echo effects. The mathematical constants are used at audio rates—their irrational nature ensures non-repeating patterns but doesn't guarantee musical results with all source material.

Mathematical Theory

Nested Modulation Architecture

The Core Algorithm

The effect uses a sophisticated nested sine structure:

Delay modulation formula: delay(t) = base × [1 + depth × sin(2π × f1 × t + α × sin(2π × f2 × t) + β × sin(2π × f3 × t))] Where: base = base_delay_ms × fs / 1000 (samples) depth = modulation_depth f1 = rate1_hz (primary frequency) f2 = rate2_hz (secondary frequency) f3 = rate3_hz (tertiary frequency) α = rate2_mix (secondary mix) β = rate3_mix (tertiary mix) This creates phase modulation of the primary sine wave by two additional sine waves, producing complex non-sinusoidal waveforms

🎵 Why Nested Modulation?

Simple vibrato: sin(2πft) → pure, repetitive sine wave

Nested vibrato: sin(2πft + mix×sin(2πgt)) → complex, evolving shape

Mathematical result: The nested structure creates frequency modulation (FM) sidebands, producing rich harmonic spectra in the modulation waveform itself

Irrational Frequency Relationships

Non-Repeating Patterns

The key to natural-sounding vibrato is irrational ratios:

For two frequencies f1 and f2: If f1/f2 is rational (e.g., 3/2, 4/3): Pattern repeats after LCM period If f1/f2 is irrational (e.g., π, φ, e): Pattern NEVER repeats exactly With three irrational frequencies: The combined pattern is maximally non-periodic Creates the illusion of "living" vibrato Mimics natural vocal/instrumental imperfections Mathematical guarantee: Any combination of π, φ, and e produces irrational ratios Therefore: pattern never repeats

Quasi-Periodicity

Pattern behavior over time:

Short term (0-10 seconds): Appears to have clear pattern
Medium term (10-60 seconds): Pattern evolves noticeably
Long term (>60 seconds): No exact repetition ever occurs
Very long term: Eventually explores all possible phases

Musical implication: The vibrato feels familiar yet constantly fresh, avoiding the mechanical quality of simple periodic modulation

Mathematical Beauty

✨ The Trinity of Constants

π (Pi) ≈ 3.14159

  • Represents circular motion and cycles
  • Connects linear and rotational motion
  • In vibrato: provides the fundamental oscillation

φ (Golden Ratio) ≈ 1.61803

  • Represents optimal growth and proportion
  • Appears throughout nature and art
  • In vibrato: creates most uniform phase distribution

e (Euler's Number) ≈ 2.71828

  • Represents natural growth and decay
  • Fundamental to calculus and complex analysis
  • In vibrato: adds asymmetric, evolving character

Together, these constants create vibrato that is mathematically optimal and aesthetically pleasing.

Irrational Constants

The Golden Ratio (φ)

📐 φ = (1 + √5)/2 ≈ 1.61803

Mathematical definition: The positive solution to x² = x + 1

Unique properties:

  • Most irrational number:最难被有理数逼近的数
  • Self-similar: 1/φ = φ - 1 ≈ 0.61803
  • Fibonacci connection: Ratio of consecutive Fibonacci numbers approaches φ
  • Optimal spacing: Creates most uniform distribution of points on a circle

In vibrato applications:

  • Creates maximally non-repeating patterns
  • Produces smooth, organic-sounding modulation
  • Prevents beating or periodic reinforcements
  • Golden ratio multiples (φ, 2φ, φ/2) maintain optimal properties

Pi (π) and Euler's Number (e)

π ≈ 3.14159 - The Circle Constant

Properties: - Ratio of circle circumference to diameter - Transcendental: not a root of any polynomial with rational coefficients - Appears throughout physics and engineering - Decimal expansion: 3.141592653589793... In vibrato: - Provides fundamental oscillation rate - Connects to natural periodic phenomena - π and 2π (τ) create complementary patterns - Often used as primary modulation frequency

e ≈ 2.71828 - The Natural Growth Constant

Properties: - Base of natural logarithms - Defined as lim(n→∞) (1 + 1/n)ⁿ - Fundamental to calculus: d/dx eˣ = eˣ - Decimal expansion: 2.718281828459045... In vibrato: - Creates asymmetric, evolving patterns - Adds "natural growth" character to modulation - e and 1/e create interesting complementary effects - Often used as secondary modulation source

Mathematical Relationships

Beautiful Equations Connecting the Constants

Euler's Identity: e^(iπ) + 1 = 0 "The most beautiful equation in mathematics" Golden Ratio relationships: φ = (1 + √5)/2 φ² = φ + 1 1/φ = φ - 1 Constants in combination: π ≈ 3.14159, e ≈ 2.71828, φ ≈ 1.61803 π + e ≈ 5.85987, π × e ≈ 8.53973 φ × π ≈ 5.08320, φ × e ≈ 4.39827 These relationships ensure the modulation frequencies create complex, non-harmonic relationships

Optimal Frequency Selection

Preset frequency strategies:

Golden Shimmer: φ-based frequencies (1.618, 3.236, 0.618)
Note: 3.236 ≈ 2φ, 0.618 ≈ 1/φ

Euler's Wobble: e-based frequencies (2.718, 5.436, 1.0)
5.436 ≈ 2e, 1.0 provides integer anchor

Pi Cycle: π-based frequencies (3.14159, 6.28318, 1.57079)
6.28318 = 2π, 1.57079 = π/2

Mathematical Chaos: All three constants at once
Maximum complexity and non-repetition

Effect Presets

Golden Shimmer (Phi driven)

🌟 Smooth Organic Vibrato

Settings: Base: 5.0 ms, Depth: 0.08, Rates: 1.618/3.236/0.618 Hz, Mix: 0.3/0.5

Character: Smooth, organic vibrato with golden ratio proportions

Best for: Vocals, strings, natural instrument enhancement

Euler's Wobble (e driven)

📈 Asymmetric Natural Motion

Settings: Base: 7.0 ms, Depth: 0.15, Rates: 2.718/5.436/1.0 Hz, Mix: 0.8/0.2

Character: Asymmetric, evolving vibrato with natural growth character

Best for: Experimental sounds, evolving textures

Pi Cycle (Pi driven)

🔄 Classic Circular Motion

Settings: Base: 6.0 ms, Depth: 0.12, Rates: 3.14159/6.28318/1.57079 Hz, Mix: 0.2/0.1

Character: Classic vibrato character with circular motion patterns

Best for: Traditional instruments, straightforward vibrato

Mathematical Chaos (Full Mix)

🎲 Maximum Complexity

Settings: Base: 8.0 ms, Depth: 0.20, Rates: 3.14159/2.71828/1.61803 Hz, Mix: 1.0/1.0

Character: Complex, evolving patterns using all three constants

Best for: Sound design, experimental music

Subtle Irregularity

💫 Gentle Enhancement

Settings: Base: 4.0 ms, Depth: 0.05, Rates: 3.14159/2.71828/1.61803 Hz, Mix: 0.5/0.5

Character: Very subtle vibrato that adds life without obvious effect

Best for: Background elements, subtle vocal enhancement

Deep Math Texture

🌊 Slow Evolution

Settings: Base: 12.0 ms, Depth: 0.25, Rates: 0.314/0.271/0.161 Hz, Mix: 0.7/0.7

Character: Slow, deep vibrato with complex evolving texture

Best for: Pads, atmospheric sounds, deep textures

PresetBase (ms)DepthRate1 (Hz)Rate2 (Hz)Rate3 (Hz)Mix2Mix3Character
Golden Shimmer5.00.081.6183.2360.6180.30.5Smooth, organic
Euler's Wobble7.00.152.7185.4361.00.80.2Asymmetric, evolving
Pi Cycle6.00.123.141596.283181.570790.20.1Classic, circular
Math Chaos8.00.203.141592.718281.618031.01.0Complex, evolving
Subtle Irregularity4.00.053.141592.718281.618030.50.5Gentle, natural
Deep Math Texture12.00.250.3140.2710.1610.70.7Slow, deep

Parameters

Delay Parameters

ParameterTypeRangeDefaultDescription
Base_delay_mspositive3.0-15.06.0Center delay time in milliseconds
Modulation_depthpositive0.05-0.250.14Intensity of pitch modulation

Modulation Rates

ParameterTypeRangeDefaultDescription
Rate1_hzpositive0.1-10.03.14159Primary modulation rate (π)
Rate2_hzpositive0.1-10.02.71828Secondary modulation rate (e)
Rate3_hzpositive0.1-10.01.61803Tertiary modulation rate (φ)

Mixing Ratios

ParameterTypeRangeDefaultDescription
Rate2_mixpositive0.0-1.00.6Secondary rate mixing amount
Rate3_mixpositive0.0-1.00.4Tertiary rate mixing amount

Output Options

ParameterTypeRangeDefaultDescription
Scale_peakpositive0.1-1.00.99Output normalization level
Play_after_processingbooleanyes/noyesAuto-play processed sound

Parameter Interactions

Key parameter relationships:

Base_delay_ms × Modulation_depth: Determines pitch variation range
Typical: 6ms × 0.14 = ±0.84ms variation → moderate vibrato

Rate ratios: Irrational ratios prevent pattern repetition
π : e : φ ≈ 1.16 : 1 : 0.60 (all irrational ratios)

Mix values: Control complexity of modulation waveform
Low mixes (0.1-0.3): Subtle complexity
High mixes (0.7-1.0): Rich, complex patterns

Rate ranges:
0.1-1.0 Hz: Very slow, evolving modulation
1.0-3.0 Hz: Natural vibrato range
3.0-6.0 Hz: Fast, intense vibrato
6.0-10.0 Hz: Very fast, special effects

Applications

Vocal Enhancement

Use case: Adding natural-sounding vibrato to sustained vocals

Technique: Use golden ratio-based presets for organic character

Settings:

Result: Vocals with rich, natural-sounding vibrato that never feels mechanical

String Instrument Realism

Use case: Enhancing sampled or synthetic string instruments

Technique: Use subtle irregularity with appropriate rates

Settings:

Result: String sounds with authentic, non-repeating vibrato character

Sound Design and Textures

Use case: Creating evolving textures from static sounds

Technique: Use extreme settings for dramatic effects

Settings:

Result: Constantly evolving textures with mathematical complexity

Experimental Music Composition

Use case: Exploring mathematical structures in music

Technique: Systematic parameter exploration

Approaches:

Result: Music with embedded mathematical relationships

Practical Workflow Examples

🎤 Natural Vocal Vibrato

Goal: Add believable vibrato to sustained vocal notes

Settings:

  • Preset: Golden Shimmer
  • Increase base_delay_ms to 6.5 for slightly deeper vibrato
  • Reduce rate2_mix to 0.2 for simpler pattern
  • Apply only to sustained vowel sections

Result: Natural-sounding vocal vibrato

🎻 String Section Enhancement

Goal: Add life to sampled string section

Settings:

  • Preset: Subtle Irregularity
  • Reduce modulation_depth to 0.04 for ensemble effect
  • Use rates around 1.5-2.5 Hz for slower string vibrato
  • Apply to entire string section mix

Result: More lively, authentic string section

🌌 Evolving Pad Texture

Goal: Transform static pad into evolving texture

Settings:

  • Preset: Deep Math Texture
  • Increase modulation_depth to 0.3 for stronger effect
  • Use very slow rates (0.1-0.5 Hz) for gradual evolution
  • Apply to synth pad or drone

Result: Constantly evolving pad texture

Advanced Techniques

Layered processing:
  • Apply multiple passes with different constants
  • First pass: π-based for fundamental vibration
  • Second pass: φ-based for organic irregularity
  • Third pass: e-based for evolving character
  • Creates incredibly rich, multi-dimensional vibrato
Mathematical exploration:
  • Try other mathematical constants: √2, √3, γ (Euler-Mascheroni)
  • Explore transcendental vs algebraic irrationals
  • Use continued fraction approximations
  • Create custom mathematical relationships

Troubleshooting Common Issues

Problem: Artifacts or distortion in output
Cause: Too high modulation_depth, extreme rates, or complex source material
Solution: Reduce modulation_depth, use more moderate rates, try simpler source sounds
Problem: Effect too subtle or inaudible
Cause: Too low modulation_depth, inappropriate rates for material
Solution: Increase modulation_depth, adjust rates for source character
Problem: Mechanical or repetitive sounding
Cause: Rational rate ratios causing pattern repetition
Solution: Use irrational constants, ensure proper decimal precision
Problem: Praat formula errors
Cause: Object naming conflicts (script includes safety measures)
Solution: The script automatically handles renaming—ensure you're using latest version

Technical Deep Dive

Algorithm Implementation

Nested Sine Computation

The core formula uses efficient nested evaluation:

Praat formula implementation: "Sound_SourceAudio_Temp[row, max(1, min(ncol, col - round('base' * (1 + 'modulation_depth' * sin(2*pi*'rate1_hz'*x + 'rate2_mix'*sin(2*pi*'rate2_hz'*x) + 'rate3_mix'*sin(2*pi*'rate3_hz'*x))))))]" Key features: - Explicit object reference prevents naming conflicts - Row-based processing preserves stereo channels - max(1, min(ncol, ...)) protects against out-of-bounds access - Single-pass evaluation for efficiency - Direct sample reading for minimal latency

Computational Efficiency

Processing considerations:

Computational load: Moderate - three sine evaluations per sample
Memory usage: Minimal - processes samples in place
Real-time potential: Good - efficient trigonometric operations

Optimization approaches:
- Uses Praat's optimized vector operations
- Single formula evaluation for entire sound
- Efficient boundary checking
- Minimal temporary object creation

Suitable for real-time implementation with lookup tables

Mathematical Foundations

Number Theory Basis

Irrationality and music: The use of irrational numbers in music dates back to ancient Greece, where Pythagoras discovered that musical intervals correspond to rational number ratios. However, the equal temperament system used in modern music actually relies on irrational numbers (12th root of 2) to enable modulation between keys. This script extends this principle to time-domain modulation, using irrational ratios to create maximally non-repeating patterns in the temporal domain rather than the frequency domain.

Phase Space Analysis

For the modulation function: m(t) = sin(2πf₁t + α sin(2πf₂t) + β sin(2πf₃t)) The phase space is three-dimensional: θ₁ = 2πf₁t mod 2π θ₂ = 2πf₂t mod 2π θ₃ = 2πf₃t mod 2π When f₁:f₂:f₂ are irrational: The trajectory (θ₁, θ₂, θ₃) is dense in the 3-torus Meaning: it eventually comes arbitrarily close to every point Therefore: m(t) explores all possible modulation shapes

Psychoacoustic Considerations

Perception of Complex Vibrato

Human perception research:

Vibrato rate preference: 5-7 Hz generally most pleasing
Vibrato depth: ±0.5-2% of fundamental frequency optimal
Irregularity perception: Humans prefer slightly irregular vibrato
Natural vs synthetic: Natural vibrato always contains irregularities

This effect's advantages:
- Provides optimal irregularity through mathematical guarantee
- Avoids the "machine gun" effect of periodic modulation
- Creates the perception of "living" sound
- Matches natural vibrato complexity without randomness