Cross Synthesis — User Guide

LPC-based source-filter cross synthesis: extracts excitation from SOURCE sound, spectral envelope from FILTER sound, combines them — creates hybrid timbres where one sound speaks/plays through another's formants (e.g., drums talking, singing synths).

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

What this does

This script performs LPC-based cross synthesis — combining excitation from one sound with the spectral envelope from another. Process: (1) SOURCE (Sound 1): Excitation extraction via inverse LPC filtering — removes formants, keeps pitch/rhythm/dynamics. (2) FILTER (Sound 2): Spectral envelope extraction via smoothed LPC analysis — captures formants/timbre, discards excitation. (3) Resynthesis: SOURCE excitation filtered through FILTER envelope — creates hybrid where SOURCE's rhythm/pitch speaks through FILTER's timbre. Classic example: "talking drums" (drums as SOURCE, speech as FILTER = drums articulate words). Result: Impossible hybrid timbres — combinations not achievable by natural acoustic means. Includes envelope smoothing for artifact reduction, energy normalization, and configurable transfer amount for dry/wet blending.

What is source-filter cross synthesis? Source-filter theory (speech production): Voice = excitation (vocal fold vibration) + filter (vocal tract resonances/formants). Cross synthesis swaps these: Take excitation from Sound A, filter from Sound B. Examples: Drums (excitation) + Voice (filter) = talking drums. Synth (excitation) + Guitar (filter) = synth with guitar resonances. Voice (excitation) + Orchestra (filter) = voice colored by orchestral timbre. This script uses LPC (Linear Predictive Coding) to separate excitation and envelope, then recombines them from different sources.

Quick start

  1. In Praat, select exactly TWO Sound objects (order matters!).
  2. First selected = SOURCE (excitation), Second = FILTER (envelope).
  3. Run script…Cross_Synthesis.praat.
  4. Choose Preset: Speech, Sustained tones, Percussive sounds, Vocal formants, or Extreme smoothing.
  5. Or customize parameters (window, LPC order, smoothing, transfer).
  6. Enable Match_durations to align SOURCE and FILTER lengths.
  7. Click OK — processing begins, output named "CrossSynth_source_x_filter".
Quick tip: For talking drums: Drums = SOURCE, Voice = FILTER, use Percussive preset. For singing instruments: Voice = SOURCE, Instrument = FILTER, use Speech or Vocal formants preset. For smooth hybrids: Use Extreme smoothing preset (reduces artifacts). Transfer_amount controls dry/wet: 1.0 = pure cross synthesis, 0.5 = 50/50 blend with original SOURCE. Duration matching: Enable for rhythmic alignment (SOURCE and FILTER must be same length for frame-by-frame processing).
Important: ORDER MATTERS — first selected = SOURCE (excitation), second = FILTER (envelope). Swapping order creates different result. Best results when: SOURCE has clear rhythm/pitch (speech, drums, plucked instruments). FILTER has distinct timbre/formants (voice, resonant instruments). Both sounds similar duration (or enable Match_durations). Mono processing only — stereo automatically converted to mono.

Presets

Speech (Default)

Parameters: Window 40ms, Step 5ms, LPC order 16, Smoothing 0.8, Transfer 0.8, Pre-emphasis 0.97

Optimized for: Speech as SOURCE or FILTER. Balanced formant capture and temporal resolution.

Use: General-purpose cross synthesis, voice processing, talking instruments.

Sustained Tones

Parameters: Window 70ms, Step 8ms, LPC order 18, Smoothing 0.85, Transfer 0.9, Pre-emphasis 0.95

Optimized for: Long notes, pads, drones, sustained vowels. Longer window captures stable formants.

Use: Slow-moving material, ambient textures, smooth timbral blends.

Percussive Sounds

Parameters: Window 30ms, Step 3ms, LPC order 14, Smoothing 0.65, Transfer 0.7, Pre-emphasis 0.99

Optimized for: Drums, impacts, transients. Short window captures fast changes, lower smoothing preserves attack.

Use: Talking drums, percussive hybrids, rhythmic cross synthesis.

Vocal Formants

Parameters: Window 45ms, Step 5ms, LPC order 20, Smoothing 0.75, Transfer 0.85, Pre-emphasis 0.96

Optimized for: Capturing detailed vocal formants. Higher LPC order for precise formant tracking.

Use: Voice-to-instrument transfer, singing synthesis, formant emphasis.

Extreme Smoothing

Parameters: Window 60ms, Step 7ms, LPC order 12, Smoothing 0.9, Transfer 0.95, Pre-emphasis 0.93

Optimized for: Artifact reduction, smooth blends. Very high smoothing, lower LPC order for simplified envelope.

Use: When other presets produce buzzing/artifacts, ambient cross synthesis, subtle hybrids.

Parameters

Parameter Type Default Description
Preset Menu Custom Choose preset: Custom, Speech, Sustained tones, Percussive sounds, Vocal formants, Extreme smoothing. Overrides other parameters.
Window_ms Positive 50 LPC analysis window in milliseconds. Range: 20-100ms. Shorter = better time resolution, longer = better spectral resolution. 30-50ms typical.
Step_ms Positive 5 Time between analysis frames in milliseconds. Range: 3-10ms. Smaller = smoother but slower. Typically 1/10 of window size.
LPC_order Positive 16 Number of LPC coefficients (formants captured × 2 + 2). Range: 10-24. Higher = more detail but more artifacts. 16-20 for speech, 12-16 for instruments.
Envelope_smoothing Positive 0.8 Smoothing factor (0.3-0.95). Higher = smoother envelope, fewer artifacts, but less detail. Reduces LPC order: smooth_order = LPC_order × smoothing.
Transfer_amount Real 0.8 Dry/wet mix (0.0-1.0). 1.0 = pure cross synthesis, 0.0 = original SOURCE only. Blend: (cross_synth × transfer) + (source × (1-transfer)).
Pre_emphasis Positive 0.97 High-pass pre-emphasis filter (0.9-0.99). Boosts high frequencies before LPC analysis, compensates in de-emphasis. 0.97 standard for speech.
Energy_normalize Boolean 1 (true) Match output RMS to SOURCE input RMS. Prevents volume loss/gain. Recommended for consistent levels.
Match_durations Boolean 1 (true) Automatically adjust SOURCE and FILTER to same duration. Required for frame-by-frame cross synthesis. Uses time-stretching or truncation.
Duration_ref Menu Shorter If Match_durations enabled: SOURCE (use SOURCE length), FILTER (use FILTER length), Shorter (use shorter of the two).
Play_result Boolean 1 (true) Auto-play result after processing. 1 = play immediately, 0 = silent.
Gain_dB Real 0 Output gain in decibels. Range: -20 to +20 dB. 0 = no change. Adjust if output too quiet/loud after normalization.

Processing Pipeline

STEP 1: PREPROCESSING - Convert stereo to mono - Resample to common sample rate (use higher of the two) - Match durations if enabled (time-stretch or truncate) - Store SOURCE energy for later normalization STEP 2: PRE-EMPHASIS - Apply high-pass filter to both sounds - Formula: output[n] = input[n] - pre_emphasis × input[n-1] - Boosts high frequencies for better LPC analysis STEP 3: EXTRACT SOURCE EXCITATION - Analyze SOURCE with LPC (order = LPC_order) - Inverse filter SOURCE using its LPC coefficients - Result: Excitation signal (pitch/rhythm, no formants) STEP 4: EXTRACT FILTER ENVELOPE - Analyze FILTER with smoothed LPC - smooth_order = round(LPC_order × envelope_smoothing) - Result: Smoothed spectral envelope (formants, no excitation) STEP 5: APPLY ENVELOPE TO EXCITATION - Filter SOURCE excitation through FILTER envelope - Creates hybrid: SOURCE rhythm + FILTER timbre STEP 6: DE-EMPHASIS - Apply inverse of pre-emphasis filter - Formula: output[n] = input[n] + pre_emphasis × input[n-1] - Restores natural frequency balance STEP 7: BLENDING (if transfer_amount < 1.0) - Mix cross synthesis with original SOURCE - output = (cross_synth × transfer) + (source × (1-transfer)) STEP 8: POST-PROCESSING - 3-point moving average smoothing (reduce artifacts) - Energy normalization (match SOURCE RMS) - Apply gain_dB - Scale peak to 0.99 (prevent clipping)

Applications & Use Cases

Classic Cross Synthesis

Talking Drums

Setup: SOURCE = drums/percussion, FILTER = speech/voice

Preset: Percussive sounds

Result: Drums articulate words — drum hits shaped by vowel formants. Creates "talking" percussion.

Tip: Use clear speech (distinct vowels) and punchy drums (kick, snare) for best results.

Singing Instruments

Setup: SOURCE = voice/singing, FILTER = instrument (guitar, synth, strings)

Preset: Speech or Vocal formants

Result: Instrument "sings" with vocal melody/rhythm but instrumental timbre. Voice articulation + instrument color.

Experimental Hybrids

Formant Transfer

Setup: SOURCE = synth/tone, FILTER = voice vowels

Result: Synth acquires vocal formants — creates "vowel synth" or "talking synthesizer" effect.

Timbral Morphing

Setup: SOURCE = instrumental phrase, FILTER = different instrument

Example: SOURCE = piano melody, FILTER = clarinet — piano plays with clarinet resonances.

Sound Design

Robotic/Vocoded Effects

Setup: SOURCE = carrier tone/noise, FILTER = speech

Result: Similar to vocoder — carrier modulated by speech envelope. Creates robotic voices.

Impossible Instruments

Setup: Combine incompatible sources (e.g., SOURCE = waterfall, FILTER = violin)

Result: Surreal hybrid timbres impossible in nature. Useful for sci-fi sound design.

Parameter Strategies

Goal Window LPC Order Smoothing Transfer
Clean vocal formants 40-50 ms 18-20 0.75-0.8 0.8-0.9
Fast percussive 25-35 ms 12-14 0.6-0.7 0.7-0.8
Smooth ambient 60-80 ms 10-12 0.85-0.95 0.9-1.0
Detailed hybrid 40-50 ms 16-18 0.65-0.75 0.85-0.95
Subtle effect 50-60 ms 14-16 0.8-0.85 0.4-0.6

Troubleshooting

Problem: Buzzing, pulsing, or robotic artifacts
Cause: LPC order too high, insufficient smoothing, or poor formant tracking
Solution: Increase envelope_smoothing (0.85-0.95). Reduce LPC_order (12-14). Use Extreme smoothing preset. Increase window_ms (60-80).
Problem: Output too quiet or lacks SOURCE character
Cause: Transfer_amount too high (pure cross synthesis loses SOURCE dynamics)
Solution: Reduce transfer_amount (0.5-0.7) to blend more original SOURCE. Check Energy_normalize is enabled. Adjust Gain_dB (+3 to +6 dB).
Problem: Dull, muffled, or over-smoothed result
Cause: Envelope_smoothing too high, window too long
Solution: Reduce envelope_smoothing (0.6-0.75). Use shorter window (30-40ms). Lower LPC_order (10-12) to capture only main formants.
Problem: No clear effect or sounds like original SOURCE
Cause: FILTER has weak/unclear formants, or duration mismatch
Solution: Ensure FILTER has distinct timbre (voice, resonant instruments work best). Enable Match_durations. Increase transfer_amount to 0.9-1.0.