What this does
This script implements morphing resonance — an advanced audio processing technique that creates evolving resonant textures through frequency-morphing impulse patterns and stereo chorus enhancement. Generates stochastic Poisson impulse trains that morph in frequency over time, convolves them with audio to create complex resonant textures, then applies chorus effects for rich stereo imaging. Process combines mathematical impulse generation, frequency modulation, convolution processing, and stereo enhancement in a sophisticated processing pipeline.
Key Features:
- 4 Morphing Presets — From subtle evolution to extreme spectral transformation
- Poisson Impulse Generation — Stochastic pulse patterns for natural texture
- Frequency Morphing — Evolving modulation that changes over time
- Convolution Processing — Complex resonant texture creation
- Stereo Chorus — Independent left/right processing for width
- Exponential Decay — Natural amplitude fade over time
What is morphing resonance? Traditional resonance: static filtering or fixed modulation. Morphing resonance: creates evolving resonant textures that change character over time through frequency morphing and stochastic patterns. Advantages: (1) Dynamic evolution: Effects change and develop over duration. (2) Natural texture: Poisson distribution creates organic patterns. (3) Spectral richness: Frequency morphing creates complex harmonic content. (4) Stereo immersion: Independent processing creates spatial depth. (5) Multi-stage processing: Combines multiple techniques for unique results. Use cases: Evolving sound design, ambient music, cinematic textures, experimental processing, spatial audio.
Morphing Theory
Multi-Stage Processing Pipeline
🔄 Advanced Processing Chain
Complete morphing resonance algorithm:
1. PREPARE AUDIO:
- Create silent tail (tail_duration_seconds)
- Concatenate with original sound
- Handle stereo/mono conversion
2. GENERATE MORPHING IMPULSES:
Create Poisson process with density = poisson_density
Convert to pulse train:
sampling_rate, amplitude=1, pulse_width, pulse_period
Apply morphing formula:
self × exponential_base^(-time) ×
(1 + modulation_depth × sin(2π × x ×
(frequency_start + frequency_range × time)) ×
exp(-3 × time))
3. CONVOLUTION PROCESSING:
Convolve original sound with morphing impulses
Multiply by convolution_mix for wet/dry balance
4. CHORUS ENHANCEMENT:
Copy convolved signal
Apply chorus formula:
0.7 × (self + chorus_mix × delayed_self)
Delay = chorus_delay_seconds × sampling_rate
5. FINAL MIXING:
Combine dry and processed signals
Apply fadeout for natural decay
Scale peak to prevent clipping
Frequency Morphing Mathematics
🎛️ Evolving Modulation System
Core morphing formula analysis:
Morphing impulse formula:
output = impulse × A(t) × (1 + M(t) × carrier(t) × E(t))
Where:
A(t) = exponential_base^(-time) ; Amplitude decay
M(t) = modulation_depth ; Modulation intensity
carrier(t) = sin(2π × x × F(t)) ; Frequency carrier
F(t) = frequency_start + frequency_range × time ; Morphing frequency
E(t) = exp(-3 × time) ; Modulation envelope
Frequency morphing:
Starting frequency = frequency_start
Ending frequency = frequency_start + frequency_range
Linear frequency sweep over time
Creates evolving spectral character
Amplitude evolution:
Exponential decay: exponential_base^(-time)
Higher base = faster decay
Lower base = slower decay
Modulation envelope:
exp(-3 × time) creates natural fade
Prevents excessive modulation at end
Ensures smooth evolution
Parameter Interactions
| Parameter | Function | Effect |
| poisson_density | Impulse density | Higher = denser, more complex textures |
| pulse_width | Impulse duration | Wider = smoother, more sustained impulses |
| exponential_base | Decay rate | Higher = faster amplitude decay |
| modulation_depth | Modulation intensity | Higher = stronger frequency morphing |
| frequency_start/range | Morphing range | Controls frequency sweep characteristics |
| convolution_mix | Effect intensity | Wet/dry balance for convolution |
| chorus_mix | Stereo enhancement | Higher = more chorus, wider stereo |
Stereo Processing Differences
Independent channel processing:
Left channel:
Uses main parameter settings
poisson_density = user setting (1200-3200)
pulse_width = user setting (0.045-0.08)
exponential_base = user setting (65-95)
modulation_depth = user setting (0.35-0.8)
Right channel (slightly different):
poisson_density = 1750 (fixed, different from left)
pulse_width = 0.05 (slightly narrower)
exponential_base = 80 (slightly different decay)
modulation_depth = 0.45 (slightly less modulation)
frequency_start = 240, range = 800 (different sweep)
Benefits:
Natural stereo imaging
Different morphing characters per ear
Creates spatial depth and movement
Avoids artificial symmetry
Chorus processing:
Left: chorus_mix × delay(0.008-0.015s)
Right: 0.25 × delay(0.008s) (different intensity)
Creates rich stereo field
Resonance Presets
| Preset | Poisson Density | Mod Depth | Freq Range | Conv Mix | Character |
| Subtle Morphing | 1200 | 0.35 | 600 Hz | 0.22 | Gentle evolution, subtle texture |
| Medium Morphing | 1800 | 0.50 | 880 Hz | 0.32 | Balanced evolving resonance |
| Heavy Morphing | 2400 | 0.65 | 1150 Hz | 0.42 | Pronounced spectral transformation |
| Extreme Morphing | 3200 | 0.80 | 1500 Hz | 0.52 | Intense, complex evolution |
🎵 Evolving Texture Applications
Subtle Morphing: Create gentle, evolving textures for ambient music and subtle sound design. Minimal transformation preserves original character.
Medium Morphing: Generate balanced evolving resonances for most musical applications. Noticeable transformation without overwhelming.
Heavy Morphing: Produce dramatic spectral evolution for sound design and experimental music. Clear morphing character that transforms audio.
Extreme Morphing: Create intense, complex evolving textures for cinematic scoring and extreme sound design. Maximum spectral transformation.
Technical Processing Details
Poisson process characteristics:
Density range: 1200-3200 pulses per second
Creates stochastic, natural patterns
Higher density = more complex convolution
Pulse train parameters:
Pulse width: 0.045-0.08 seconds
Affects impulse character and duration
Wider pulses create smoother textures
Frequency morphing ranges:
Start: 180-300 Hz (low-mid frequency)
Range: 600-1500 Hz (sweep width)
Creates evolving spectral emphasis
Convolution effects:
Mix: 0.22-0.52 (wet/dry balance)
Higher mix = more processed character
Combines impulse texture with original
Chorus enhancement:
Mix: 0.2-0.5 (stereo intensity)
Delay: 0.008-0.015 seconds
Creates spatial width and movement
Applications
Evolving Sound Design
Dynamic Textures: Use Heavy or Extreme Morphing to create evolving textures that change character over time. Ideal for ambient backgrounds, cinematic pads, and dynamic soundscapes.
Spectral Transformation: Apply morphing resonance to transform static sounds into dynamic, evolving textures. The frequency morphing creates natural-sounding evolution.
Music Production
Evolving Effects: Use Medium Morphing to add dynamic character to vocals, instruments, or entire mixes. The evolving nature creates interest without repetition.
Spatial Enhancement: The stereo processing creates rich spatial fields perfect for creating immersive mixes and wide stereo images.
Cinematic and Media
Dynamic Scoring: Use morphing resonance to create evolving textures that match visual developments in film, games, or media. The changing character can follow narrative arcs.
Ambient Environments: Create believable evolving environments for virtual reality, installations, or atmospheric media. The stochastic patterns feel natural and non-repetitive.
Experimental Audio
Spectral Studies: Use the script to explore how frequency morphing affects different sound types. The controlled parameters allow systematic investigation of spectral evolution.
Algorithmic Composition: Combine morphing resonance with other processing to create complex, evolving compositions that develop over time through algorithmic transformation.
Technical Considerations
Processing Time: The multi-stage processing (Poisson generation, convolution, chorus) can be computationally intensive, especially for long audio files or high density settings.
Extreme Parameters: Very high convolution_mix values combined with extreme morphing settings can create overwhelming effects that mask the original sound. Use balanced settings for musical applications.
Natural Evolution: The combination of Poisson stochastic patterns, exponential decay, and frequency morphing creates particularly natural-sounding evolution that avoids mechanical or repetitive character.