Golden Ratio Processor — User Guide

Mathematical audio transformation: applies the Golden Ratio (φ = 1.618...) to pitch, intensity, spectral, and spatial parameters for harmonically balanced sound design.

Author: Shai Cohen Version: 2.3 Mathematical Basis: Golden Ratio φ = (1+√5)/2 Application: Praat scripting language
Contents:

What this does

This script implements Golden Ratio audio processing — applying mathematical proportions derived from φ (1.618...) to multiple aspects of sound. The processor transforms audio by imposing φ-based relationships on pitch contours, intensity envelopes, spectral characteristics, and stereo imaging, creating harmonically balanced transformations that follow natural proportional relationships.

Key Features:

What is the Golden Ratio? φ (phi) = (1+√5)/2 ≈ 1.618033988749895. This irrational number appears throughout nature, art, architecture, and music as a proportion considered aesthetically pleasing. Key properties: φ = 1 + 1/φ, φ² = φ + 1, φ⁻¹ = φ - 1 ≈ 0.618. In music: octave ratio 2:1, perfect fifth 3:2 ≈ 1.5, major sixth 5:3 ≈ 1.667 all approximate φ. The Golden Ratio Processor applies these proportions to audio parameters for "naturally balanced" transformations.

Technical Implementation: (1) Analysis Phase: Extract pitch, intensity, and spectral characteristics from input. (2) Golden Division: Calculate T₁ = duration × φ⁻¹ (≈0.618) and T₂ = duration - T₁. Climax at T₁. (3) Module Processing: Apply φ-proportioned transformations to selected parameters. (4) Integration: Combine processed components into final output. (5) Visualization: Display original, golden panning architecture, and processed result. Key insight: Audio parameters evolve proportionally to φ relationships, with climax at golden section point (0.618 of duration).

Quick start

  1. In Praat, select exactly one Sound object (mono or stereo).
  2. Run script… → select Golden_Ratio_Processor.praat.
  3. Choose Preset intensity: Subtle, Standard, or Pronounced.
  4. Enable desired processing modules (pitch, intensity, spectral, filtering, panning, modulation).
  5. Set analysis parameters (pitch floor/ceiling, time step) if needed.
  6. Enable Draw_visualization for graphical feedback.
  7. Enable Play_result for immediate audition.
  8. Click OK — processor analyzes, transforms, creates "original_GoldenRatio_preset" sound object.
Quick tip: Start with Standard preset and enable Apply_pitch_architecture, Apply_intensity_structure, and Apply_golden_panning for balanced transformation. Check Draw_visualization to see the golden time division and stereo bloom effect. The climax point (0.618 of duration) is marked with red dotted line in visualizations. Output appears as "originalName_GoldenRatio_PresetName" in Objects window. For subtle enhancement, use Subtle preset with just pitch and intensity modules. For dramatic transformation, use Pronounced with all modules enabled.
Important: MONO CONVERSION — Processor converts stereo inputs to mono for analysis, then re-applies stereo processing if golden panning enabled. PITCH ANALYSIS requires pitched material (speech, singing, instruments) — un-pitched material may produce undefined pitch values. PROCESSING ORDER matters: pitch → intensity → spectral scaling → filtering → modulation → panning (sequential application). CLIPPING RISK — intensity modulation and spectral scaling can increase amplitude; output is peak-normalized to 0.95. PHASE EFFECTS — spectral scaling changes timing slightly (resampling involved). STEREO OUTPUT — even mono inputs become stereo if golden panning enabled.

Golden Ratio Theory

The Golden Ratio φ

Mathematical Definition: φ = (1 + √5) / 2 ≈ 1.618033988749895 φ⁻¹ = φ - 1 ≈ 0.618033988749895 φ² = φ + 1 ≈ 2.618033988749895 Key Properties: 1. Self-similarity: φ = 1 + 1/φ 2. Quadratic: φ² - φ - 1 = 0 3. Continued fraction: φ = 1 + 1/(1 + 1/(1 + 1/(1 + ...))) 4. Nested radicals: φ = √(1 + √(1 + √(1 + ...))) Audio Applications: • Time division: T₁ : T₂ = φ : 1 ≈ 1.618 : 1 • Frequency ratios: f₂ = f₁ × φ (golden interval ≈ 833 cents) • Amplitude envelopes: peak at φ⁻¹ point (0.618 of duration) • Stereo imaging: width evolution following φ progression

Golden Section in Time

Given total duration T: T₁ = T × φ⁻¹ ≈ T × 0.618 (developmental section) T₂ = T - T₁ ≈ T × 0.382 (resolution section) Climax point = T₁ (golden section point) Example: T = 10 seconds T₁ = 10 × 0.618 = 6.18 seconds T₂ = 10 - 6.18 = 3.82 seconds Climax at 6.18 seconds Processing Strategy: Section 1 (0 → T₁): Build toward climax Section 2 (T₁ → T): Resolve from climax Intensity Evolution: Start: soft_intensity (baseline - φ⁻¹ × deviation) Climax: peak_intensity (baseline + (φ-1) × deviation) End: soft_intensity (return to baseline - φ⁻¹ × deviation)

φ-Derived Audio Parameters

📐 Pitch Architecture

Formula: pitch_factor = 1 ± scaling_strength × (φ - 1)

Development (0→T₁): Linear increase from 1 to upper_pitch_factor

Resolution (T₁→T): Linear decrease to lower_pitch_factor

Range: Clamped to pitch_floor_Hz – pitch_ceiling_Hz

Effect: Pitch contour follows golden proportion evolution

📈 Intensity Structure

Formula: intensity = baseline ± deviation × φ factors

Peak: baseline + deviation × (φ - 1) at climax

Troughs: baseline - deviation × φ⁻¹ at start/end

Evolution: Linear interpolation between these points

Effect: Natural dynamic contour peaking at golden section

🎚️ Spectral Scaling

Formula: spectral_ratio = 1 + (φ - 1) × scaling_strength

Implementation: Resample at rate × ratio, then back to original rate

Effect: Subtle spectral warp upward by φ factor

Preset scaling: Subtle=×1.185, Standard=×1.371, Pronounced=×1.618

Golden Panning Architecture

Stereo Width Evolution: Width envelope (0 → 1): Section 1 (0 → T₁): width = t / T₁ (linear increase to 1) Section 2 (T₁ → T): width = 1 - (t - T₁) / T₂ (linear decrease to 0) Panning speed: Section 1: pan_speed = pan_speed_base → pan_speed_climax pan_speed_base = 0.5 / φ ≈ 0.309 pan_speed_climax = 0.5 × φ ≈ 0.809 Section 2: Reverse progression Panning oscillation: phase = ∫ pan_speed(t) dt (accumulated phase) pan_position = 0.5 + 0.5 × width × sin(2π × phase) Stereo gains: left_gain = cos(pan_position × π/2) right_gain = sin(pan_position × π/2) Result: "Bloom" effect — stereo width expands to maximum at climax, with oscillation speed also following φ progression

Micro-Modulation (Vibrato Cascade)

Dual-Rate Vibrato: rate_1 = mean_f0 / (φ × 40) (primary vibrato rate) rate_2 = rate_1 × φ⁻¹ (secondary, golden-related rate) Depth: depth_cents = 20 × scaling_strength Combined modulation: mod_1 = sin(2π × rate_1 × t) mod_2 = sin(2π × rate_2 × t) combined = (mod_1 + 0.5 × mod_2) / 1.5 cents_offset = depth_cents × combined f_modulated = f_original × 2^(cents_offset / 1200) Effect: Natural-sounding vibrato with golden-related secondary modulation creating richness

Processing Components

Module 1: Pitch Architecture

🎵 φ-Proportioned Pitch Contours

Function: Applies time-varying pitch scaling based on golden section timing

Parameters:

  • Upper pitch factor: 1 + scaling_strength × (φ - 1)
  • Lower pitch factor: 1 - scaling_strength × (1 - φ⁻¹)
  • Progression: Linear scaling during each section

Effect: Pitch rises to climax, then descends, following φ proportion

Use when: Processing melodic material, vocals, instruments

Module 2: Intensity Structure

📊 Golden Dynamic Envelope

Function: Imposes φ-proportioned amplitude envelope peaking at climax

Parameters:

  • Peak intensity: mean + 2×stddev × (φ - 1)
  • Soft intensity: mean - 2×stddev × φ⁻¹
  • Envelope: Piecewise linear between these points

Effect: Natural-sounding dynamics with emphasized climax

Use when: Adding dramatic shape to flat recordings

Module 3: Spectral Scaling

🎚️ Global Spectral Warp

Function: Applies gentle spectral scaling by φ factor

Implementation: Resampling with golden ratio, then back to original rate

Parameters:

  • Spectral ratio: 1 + (φ - 1) × scaling_strength
  • Resampling quality: 50-point interpolation

Effect: Subtle brightening/timbre shift upward by φ proportion

Use when: Enhancing spectral balance, adding "golden" sheen

Module 4: Spectral Filtering

🔊 φ-Scaled Bandwidth

Function: Gentle bandpass filtering with φ-proportioned bandwidth

Parameters:

  • Low anchor: max(100, mean_f0 × 0.5)
  • High anchor: min(Nyquist×0.9, 5000)
  • Bandwidth expansion: ±30% of range × scaling_strength
  • Smoothing: 20–50 Hz based on strength

Effect: Gentle spectral focus around fundamental regions

Use when: Cleaning/coloring noisy recordings

Module 5: Micro-Modulation

🎛️ φ-Cascade Vibrato

Function: Adds dual-rate pitch modulation with φ-related frequencies

Parameters:

  • Primary rate: mean_f0 / (φ × 40)
  • Secondary rate: primary × φ⁻¹ (golden ratio)
  • Depth: 20 × scaling_strength cents
  • Mix ratio: 1:0.5 (primary:secondary)

Effect: Rich, natural-sounding vibrato with golden harmonics

Use when: Adding warmth/expression to sterile recordings

Module 6: Golden Panning

🎧 Stereo Width Bloom

Function: Creates evolving stereo image peaking at climax

Parameters:

  • Width envelope: Expands to full at climax, contracts thereafter
  • Panning speed: Accelerates to φ×base at climax, decelerates after
  • Base speed: 0.5/φ ≈ 0.309 cycles/second
  • Climax speed: 0.5×φ ≈ 0.809 cycles/second

Effect: "Bloom" — stereo image expands and becomes most active at golden section

Use when: Creating spatial interest, emphasizing climax points

Preset Intensity Levels

PresetScaling StrengthSpectral RatioVibrato DepthCharacter
Subtle0.31.1856 centsGentle enhancement
Standard0.61.37112 centsBalanced transformation
Pronounced1.01.61820 centsStrong φ influence

Processing Workflow

Phase 1: Global Analysis

1. INPUT VALIDATION • Check exactly one Sound selected • Get sampling rate, channels, duration 2. MONO CONVERSION (Golden Core) • Convert to mono if stereo (for analysis) • Preserve original for later processing 3. PITCH ANALYSIS • To Pitch: time_step_s, pitch_floor_Hz, pitch_ceiling_Hz • Calculate mean, min, max F0 • Handle undefined pitch (use defaults) 4. INTENSITY ANALYSIS • To Intensity: pitch_floor_Hz, time_step_s • Calculate mean and standard deviation 5. SPECTRAL ANALYSIS (if spectral scaling enabled) • To Formant (burg): time_step_s, 5 formants • Extract mean F2 for spectral target • Calculate target_f2 = mean_f2 × φ 6. SPECTRUM ANALYSIS • To Spectrum • Calculate centre of gravity

Phase 2: Golden Time Structure

Calculate Golden Section: φ = 1.618033988749895 φ⁻¹ = 0.618033988749895 T = total_duration T₁ = T × φ⁻¹ (developmental section, to climax) T₂ = T - T₁ (resolution section, from climax) climax_time = T₁ Example Output: Duration: 8.500 s T₁ (developmental): 5.253 s Climax at: 5.253 s (0.618T) T₂ (resolution): 3.247 s All subsequent processing references these time divisions

Phase 3: φ-Derived Target Calculation

PITCH FACTORS: upper_pitch_factor = 1 + scaling_strength × (φ - 1) lower_pitch_factor = 1 - scaling_strength × (1 - φ⁻¹) INTENSITY TARGETS: delta_intensity = intensity_stddev × 2 peak_intensity = mean_intensity + delta_intensity × (φ - 1) soft_intensity = mean_intensity - delta_intensity × φ⁻¹ SPECTRAL FILTERING: low_anchor = max(100, mean_f0 × 0.5) high_anchor = min(sample_rate/2×0.9, 5000) filter_range = high_anchor - low_anchor gentle_lower = max(50, low_anchor - filter_range × 0.3) gentle_upper = min(sample_rate/2×0.95, high_anchor + filter_range × 0.3) VIBRATO RATES: base_vibrato_rate = mean_f0 / (φ × 40) rate_1 = base_vibrato_rate rate_2 = base_vibrato_rate × φ⁻¹ PANNING SPEEDS: pan_speed_base = 0.5 / φ pan_speed_climax = 0.5 × φ

Phase 4: Sequential Module Processing

Processing Order (Fixed): 1. PITCH ARCHITECTURE • Create Manipulation object • Extract and modify PitchTier • Resynthesize with scaled pitch 2. INTENSITY STRUCTURE • Apply piecewise linear amplitude envelope • Peak at climax_time • Scale peak to 0.95 3. SPECTRAL SCALING • Override sampling frequency (× spectral_ratio) • Resample back to original rate • 50-point interpolation quality 4. SPECTRAL FILTERING • Apply Hann bandpass filter • Gentle bandwidth centered on analysis • Mix with original based on strength 5. MICRO-MODULATION • Add dual-rate vibrato • φ-related modulation frequencies • Depth scaled by preset strength 6. GOLDEN PANNING • Create stereo from mono • Generate IntensityTiers for L/R • Apply evolving panning envelope • Combine to stereo output Each module works on cumulative result of previous modules

Phase 5: Visualization & Output

VISUALIZATION ELEMENTS: 1. Header: "Golden Ratio Processor v2.3" • φ value and preset name 2. Original Waveform (Mono) • Gray waveform • Red dotted line at climax_time 3. Golden Panning Architecture • Shows stereo "bloom" envelope • Width expands to climax, contracts after • Annotated "BLOOM" at climax 4. Output Waveform (Stereo) • Green waveform (both channels) • Shows final processed result 5. Info Panel • Parameters: φ, climax time, panning status OUTPUT: • Sound object: "originalName_GoldenRatio_PresetName" • Peak normalized to 0.95 • Stereo (if panning enabled) or mono • Info window shows processing details

Applications

Musical Enhancement

Use case: Adding natural-sounding expression to recordings

Technique: Standard preset with pitch + intensity + panning

Example workflow:

Sound Design

Use case: Creating evolving textures with mathematical structure

Technique: Pronounced preset with all modules enabled

Applications:

Audio Restoration

Use case: Enhancing old or flat recordings

Technique: Subtle preset with spectral filtering + intensity

Advantages:

Educational Demonstration

Use case: Teaching golden ratio in audio context

Technique: Enable visualization, process simple tones

Learning outcomes:

Compositional Tool

Use case: Applying golden proportions to composed material

Technique: Custom parameter combinations

Workflow:

Practical Workflow Examples

🎵 Vocal Enhancement (Pop/Rock)

Goal: Add professional expression to lead vocal

Settings:

  • Preset: Standard (balanced transformation)
  • Modules: Pitch, Intensity, Golden Panning
  • Analysis: Pitch_floor_Hz=75, Pitch_ceiling_Hz=600
  • Disable: Spectral scaling, filtering, modulation

Result: Vocal gains natural dynamic contour, slight pitch expression, subtle stereo movement at climax

🎚️ Ambient Texture Creation

Goal: Generate evolving pad from simple source

Settings:

  • Preset: Pronounced (strong φ influence)
  • Modules: All enabled
  • Source: Simple sine wave or noise burst
  • Duration: 30+ seconds for slow evolution

Result: Rich, evolving texture with spectral warping, modulation, and spatial bloom

🔊 Drum Processing (Experimental)

Goal: Add organic movement to rhythmic material

Settings:

  • Preset: Subtle (gentle influence)
  • Modules: Intensity, Spectral filtering, Golden Panning
  • Disable: Pitch (unpitched material)
  • Adjust: Pitch_floor_Hz=50 for low frequency analysis

Result: Drums gain dynamic shape, spectral focus, and subtle stereo animation

Troubleshooting Common Issues

Problem: Pitch processing creates artifacts
Cause: Input has undefined pitch (noise, drums, consonants)
Solution: Disable pitch architecture module, or adjust pitch floor/ceiling
Problem: Output sounds phasey or metallic
Cause: Spectral scaling combined with other modules
Solution: Reduce scaling strength, or disable spectral scaling
Problem: Stereo image collapses or fluctuates oddly
Cause: Golden panning with very short or very long material
Solution: Adjust panning speed base (modify script), or disable panning
Problem: Processing very slow
Cause: Many modules enabled on long file
Solution: Disable unneeded modules, reduce time_step_s (0.02 instead of 0.01)

Advanced Techniques

Module combination strategies:
  • Pitch + Intensity only: Natural expression without spectral changes
  • Spectral + Filtering only: Timbre enhancement without pitch effects
  • Panning + Modulation only: Spatial animation without fundamental changes
  • All modules subtle: Holistic gentle enhancement
  • Single module pronounced: Focused strong effect

Different combinations create distinctly different transformation characters

Source material considerations:
  • Vocals: Enable pitch, intensity, panning (disable spectral if wanting natural)
  • Instruments: All modules can work well (adjust based on instrument)
  • Percussion: Disable pitch, enable intensity and panning
  • Pads/Textures: Enable all modules for maximal transformation
  • Full mixes: Use subtle preset, careful with spectral changes