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.
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.
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
- Select exactly two Sound objects in Praat.
- Make sure selected Sound #1 is the Source and selected Sound #2 is the Filter.
- Run
Cross_Synthesis.praat. - Choose a preset or use Manual.
- Set Envelope_transfer: 0 bypasses LPC transfer; 1 applies the full cross-synthesized envelope.
- Choose how the two durations are reconciled and how the final output level is handled.
- Optionally enable playback and visualization.
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.
| Preset | Window | Step | LPC order | Envelope detail | Effective envelope order | Transfer |
|---|---|---|---|---|---|---|
| Manual | 50 ms | 5 ms | 16 | 0.80 | 13 | 0.80 |
| Speech | 40 ms | 5 ms | 16 | 0.80 | 13 | 0.80 |
| Sustained Tones | 70 ms | 8 ms | 18 | 0.85 | 15 | 0.90 |
| Percussive | 30 ms | 3 ms | 14 | 0.65 | 9 | 0.70 |
| Vocal Formants | 45 ms | 5 ms | 20 | 0.75 | 15 | 0.85 |
| Extreme Smooth | 60 ms | 7 ms | 12 | 0.90 | 11 | 0.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
| Control | Default | What it controls |
|---|---|---|
| Window_ms | 50 | LPC analysis window in milliseconds. On very short material the script can reduce it automatically, but it will not continue below 5 ms. |
| Step_ms | 5 | Time step between LPC frames. |
| Lpc_order | 16 | Natural-number LPC order used to estimate the Source excitation. |
| Envelope_detail | 0.80 | Fraction of the LPC order used for the Filter envelope. Values are clamped to 0.05…1.00. |
| Envelope_transfer | 0.80 | Blend between the preprocessed Source and the cross-synthesized result. Values are clamped to 0…1. |
| Duration_match | Shorter | Chooses the common working duration or loops the Filter to the Source duration. |
| Output_level_mode | Match source RMS + safety ceiling | Controls the final level stage; see below. |
| Ceiling_peak | 0.95 | Peak target used by ceiling and peak-normalization modes. Must be greater than 0 and at most 1. |
| Play_after_processing | Yes | Plays the result. If the stored output exceeds 1.0, playback uses a temporary copy scaled to 0.95. |
| Draw_visualization | Yes | Draws the source/filter/output diagnostics and summary. |
How it works
- Work copies: both Sounds are copied and shifted so their working start time is 0.
- Common sample rate: the lower-rate Sound is resampled to the higher of the two input sample rates.
- Duration policy: the work copies are truncated, lengthened, or the Filter is looped according to Duration_match.
- Source excitation: the Source is analysed with Burg LPC at Lpc_order, then inverse-filtered to obtain its excitation.
- Filter envelope: the Filter is analysed with Burg LPC at the effective envelope order.
- Cross synthesis: the Source excitation is filtered by the Filter LPC envelope with LPC gain disabled.
- Envelope transfer: if transfer is below 1, the cross-synthesized signal is linearly blended with the preprocessed Source.
- Output level: the selected RMS/ceiling/normalization policy is applied.
- Time domain: the final Sound is shifted back to the original Source start time.
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
| Policy | Behavior |
|---|---|
| Source length | Output uses the Source duration. The Filter is truncated or lengthened to match it. |
| Filter length | Output uses the Filter duration. The Source is truncated or lengthened to match it. |
| Shorter | Uses the shorter duration; the longer Sound is truncated. This is the default and avoids lengthening. |
| Loop filter to source length | Keeps 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.
| Mode | Behavior |
|---|---|
| None (natural level) | No level scaling. |
| Match source RMS + safety ceiling | First 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 only | Matches Source RMS with no peak protection. The stored Sound may exceed 1.0. |
| Safety ceiling | Attenuates only when the natural peak is above Ceiling_peak; never boosts. |
| Peak normalize | Always 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.
The work copies actually used by the analysis, shown as mono fold-downs.
Mono fold-down spectrograms up to 5 kHz or Nyquist, whichever is lower.
A separate frequency-vs-dB panel at the midpoint of the processed duration, using the effective envelope order.
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.
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.