Cross Synthesis — User Guide

LPC source–filter cross synthesis: extract excitation from one Sound, impose the spectral envelope of another, and control how strongly that envelope is transferred.

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

What this does

Cross Synthesis separates a Source Sound into an LPC excitation and uses the LPC spectral envelope measured from a Filter Sound to shape that excitation. The result keeps much of the Source's temporal and excitation structure while adopting resonant characteristics from the Filter.

Signal roles: selected Sound #1 is the Source (excitation donor); selected Sound #2 is the Filter (envelope donor). Swapping them is a different process.

The current implementation uses Burg LPC analysis for both sides. There is no separate manual pre-emphasis/de-emphasis stage: Praat's LPC analysis performs its own 50 Hz pre-emphasis internally.

Quick start

  1. Select exactly two Sound objects in Praat.
  2. Make sure selected Sound #1 is the Source and selected Sound #2 is the Filter.
  3. Run Cross_Synthesis.praat.
  4. Choose a preset or use Manual.
  5. Set Envelope_transfer: 0 bypasses LPC transfer; 1 applies the full cross-synthesized envelope.
  6. Choose how the two durations are reconciled and how the final output level is handled.
  7. Optionally enable playback and visualization.
Important: a 0% envelope transfer bypasses LPC analysis, but preprocessing still applies. The Source may still be resampled, duration-adjusted, duplicated to match a multichannel Filter, and attenuated by the selected output-level policy.

Presets

Presets override only the LPC window, time step, LPC order, envelope detail, and envelope transfer. They do not change the duration policy, output-level mode, ceiling, playback, or visualization settings.

PresetWindowStepLPC orderEnvelope detailEffective envelope orderTransfer
Manual50 ms5 ms160.80130.80
Speech40 ms5 ms160.80130.80
Sustained Tones70 ms8 ms180.85150.90
Percussive30 ms3 ms140.6590.70
Vocal Formants45 ms5 ms200.75150.85
Extreme Smooth60 ms7 ms120.90110.95

The effective envelope order is round(Lpc_order × Envelope_detail), clamped to 1…Lpc_order. Higher Envelope_detail means a higher-order, more detailed LPC envelope; it is not a smoothing amount.

Controls

ControlDefaultWhat it controls
Window_ms50LPC analysis window in milliseconds. On very short material the script can reduce it automatically, but it will not continue below 5 ms.
Step_ms5Time step between LPC frames.
Lpc_order16Natural-number LPC order used to estimate the Source excitation.
Envelope_detail0.80Fraction of the LPC order used for the Filter envelope. Values are clamped to 0.05…1.00.
Envelope_transfer0.80Blend between the preprocessed Source and the cross-synthesized result. Values are clamped to 0…1.
Duration_matchShorterChooses the common working duration or loops the Filter to the Source duration.
Output_level_modeMatch source RMS + safety ceilingControls the final level stage; see below.
Ceiling_peak0.95Peak target used by ceiling and peak-normalization modes. Must be greater than 0 and at most 1.
Play_after_processingYesPlays the result. If the stored output exceeds 1.0, playback uses a temporary copy scaled to 0.95.
Draw_visualizationYesDraws the source/filter/output diagnostics and summary.

How it works

  1. Work copies: both Sounds are copied and shifted so their working start time is 0.
  2. Common sample rate: the lower-rate Sound is resampled to the higher of the two input sample rates.
  3. Duration policy: the work copies are truncated, lengthened, or the Filter is looped according to Duration_match.
  4. Source excitation: the Source is analysed with Burg LPC at Lpc_order, then inverse-filtered to obtain its excitation.
  5. Filter envelope: the Filter is analysed with Burg LPC at the effective envelope order.
  6. Cross synthesis: the Source excitation is filtered by the Filter LPC envelope with LPC gain disabled.
  7. Envelope transfer: if transfer is below 1, the cross-synthesized signal is linearly blended with the preprocessed Source.
  8. Output level: the selected RMS/ceiling/normalization policy is applied.
  9. Time domain: the final Sound is shifted back to the original Source start time.
LPC convergence: Burg LPC is substantially safer on tonal input than the older autocorrelation path, but strongly tonal or difficult material can still fail. The script checks for undefined or unbounded output and stops with suggestions to lower the LPC order or use a longer analysis window.

Channels, duration, and sample rate

Channel policy

Cross synthesis is performed channel by channel. Equal channel counts are paired directly. A mono Source may be paired with every channel of a multichannel Filter, and a mono Filter may be paired with every channel of a multichannel Source. If both inputs are multichannel and their channel counts differ, the script stops rather than silently reusing a channel.

The output channel count is therefore the larger of the two input channel counts when one side is mono; otherwise it is their common channel count.

Duration policies

PolicyBehavior
Source lengthOutput uses the Source duration. The Filter is truncated or lengthened to match it.
Filter lengthOutput uses the Filter duration. The Source is truncated or lengthened to match it.
ShorterUses the shorter duration; the longer Sound is truncated. This is the default and avoids lengthening.
Loop filter to source lengthKeeps the Source duration and loops or truncates the Filter. No time stretching is used.

When a Sound must be lengthened, the script uses Praat Lengthen (overlap-add) over a 75–600 Hz pitch range. This is a pitch-based time-stretch, not a neutral duration conversion, and can affect noise, percussion, and transients.

Sample rate and start time

The working sample rate is the higher input sample rate. The lower-rate Sound is resampled to that rate. Processing takes place at time 0, then the final output start time is restored to the original Source xmin.

Output level

Level measurements are taken from the multichannel work Sounds, not from the mono visualization folds.

ModeBehavior
None (natural level)No level scaling.
Match source RMS + safety ceilingFirst matches the preprocessed Source RMS; if the resulting peak exceeds Ceiling_peak, attenuates to the ceiling. The ceiling can therefore reduce the exact RMS match. This is the default.
Match source RMS onlyMatches Source RMS with no peak protection. The stored Sound may exceed 1.0.
Safety ceilingAttenuates only when the natural peak is above Ceiling_peak; never boosts.
Peak normalizeAlways scales a non-silent result so its peak equals Ceiling_peak; it may boost or attenuate.

If a stored output still exceeds 1.0, the script warns about integer-PCM clipping. Playback does not alter the stored object: it creates a temporary 0.95-peak copy solely for playback.

Visualization

The v1.3 visualization uses an 8-inch-wide suite page and shows up to the first 12 seconds of the processed time domain.

Source and Filter waveforms
The work copies actually used by the analysis, shown as mono fold-downs.
Source and Filter spectrograms
Mono fold-down spectrograms up to 5 kHz or Nyquist, whichever is lower.
Filter LPC envelope
A separate frequency-vs-dB panel at the midpoint of the processed duration, using the effective envelope order.
Output waveform and spectrogram
The level-staged result, folded to mono for display when multichannel.

The summary strip reports the original Source/Filter durations, processed duration, duration policy, sample rate, LPC and envelope orders, window, step, transfer, preset, pre-level and final peaks, level action, and output channel count.

Visualization scale: waveform panels use Praat's automatic amplitude scaling independently; they are not a shared-amplitude comparison. The waveform and spectrogram displays are mono folds, so anti-phase multichannel material can cancel visually even though the actual multichannel processing and RMS measurement remain active.

Output and cleanup

The final Sound is named:

<SourceName>_x_<FilterName>_<PresetName>

The original input Sounds remain unchanged. Temporary work copies, mono visualization references, LPC objects, excitation signals, per-channel temporary outputs, and playback-safe copies are removed. The final output remains selected.

There is no random stage in v1.3, so the processing path is deterministic for the same inputs and settings.