LPC Excitation Lab — User Guide
Offline LPC analysis–resynthesis for driving a source sound’s spectral envelope with synthetic or cross-synthesized excitation.
What this does
LPC Excitation Lab separates the roles of excitation, spectral envelope, and articulation. It analyzes a source with linear predictive coding (LPC), builds or extracts an excitation signal, inverse-filters that excitation with its own LPC model to obtain a residual, then filters the residual through the LPC model chosen as the destination spectral envelope. Finally, it applies an intensity contour as the articulation envelope.
The result is not a conventional pitch shifter or formant editor. The spectral coloration is imposed by an LPC all-pole model, while the temporal fine structure comes from the selected excitation. In cross-synthesis modes, different Sounds can provide these roles.
Signal flow
Excitation ↓ LPC analysis of excitation ↓ Inverse LPC filter → residual ↓ Destination LPC filter ↓ IntensityTier multiplication ↓ Peak scale to 0.99 ↓ Mono output
The destination LPC is derived with Praat’s To LPC (burg) using a fixed 25 ms analysis window, 5 ms frame step, 50 Hz pre-emphasis frequency, and the user-selected LPC order.
Quick start
- Select one Sound for Off (single Sound), or exactly two Sounds for either cross-synthesis mode.
- Run
LPC_Excitation_Lab.praat. - Choose a preset or Custom.
- Choose the Cross_synth_mode. Preset Cross-Synth automatically selects mode 2.
- For modes using synthetic excitation, choose an excitation method and adjust only the parameters relevant to that method.
- Set Lpc_order. Higher orders allow a more detailed all-pole envelope, but can also make the model more sensitive to the material.
- Optionally enable the visualization and playback.
Cross-synthesis modes
| Mode | Excitation / residual | LPC filter | Intensity contour | Duration |
|---|---|---|---|---|
| 1. Off (single Sound) | Synthetic excitation selected in the form | Sound1 | Sound1 | Sound1 duration; Time Stretch can extend it |
| 2. Sound2 residual through Sound1 filter | Sound2 is LPC-inverse-filtered; synthetic excitation controls are ignored | Sound1 | Sound2 | min(duration1, duration2) |
| 3. Synth excitation through Sound2 filter | Synthetic excitation selected in the form | Sound2 | Sound1 | min(duration1, duration2) |
Mode 2 is the direct cross-synthesis configuration: Sound2 contributes residual/fine temporal structure and articulation, while Sound1 contributes the LPC spectral envelope. Mode 3 keeps a synthetic excitation but substitutes Sound2’s LPC envelope; Sound1 supplies only the articulation contour.
Excitation methods
1. Pitch Sweep
A Praat PitchTier drives a pulse-train source whose base frequency moves linearly in Hz from Start_freq_hz to End_freq_hz. The tier is sampled every 5 ms so optional vibrato and random-walk pitch jitter can be added.
- Vibrato_rate_hz and Vibrato_depth_cents add sinusoidal vibrato.
- Pitch_jitter_cents adds a bounded, mean-reverting random walk in cents.
2. Pulse Train
Builds a PointProcess with nominal period Period_s, then converts it to a pulse-train Sound.
- Pulse_jitter_pct randomizes each period around the nominal value.
- Pulse_shimmer_pct applies a deterministic two-sine amplitude modulation after pulse generation; it is a shimmer-like amplitude wobble, not a measured acoustic shimmer parameter.
3. Time Stretch
Uses Gaussian noise as the synthetic excitation. In single-source mode only, the destination LPC time axis and the Sound1 intensity contour are scaled by Time_stretch_factor, so the output duration becomes approximately the source duration multiplied by that factor.
Noise_am_rate_hz and Noise_am_depth optionally modulate the noise amplitude with a sinusoid. In cross-synthesis mode 3, Time_stretch_factor is ignored; the mode uses the normal cross-synthesis duration.
4. Chirp Burst
Generates one or more exponential chirps between Chirp_start_hz and Chirp_end_hz. Additional layers multiply both endpoints by values parsed from Layer_ratios. Up to eight layers are used; frequencies are clamped below 95% of Nyquist. If the requested layer count exceeds the number of supplied ratios, the parser falls back to the last available ratio.
5. Granular Noise
Builds a noise excitation from Gaussian-windowed grains. The nominal grain size is 40 ms; Grain_size_modulation_pct adds per-grain random size variation. Density changes linearly from Grain_density_start to Grain_density_end, with grain spacing calculated as 40 ms / density. Thus higher density means more frequent grains.
Presets
Presets override the parameters listed below. Other form fields retain their current values, so a preset does not necessarily reset unrelated modulation controls.
| Preset | Overrides |
|---|---|
| Custom | No preset override. |
| Voiced Sweep | Pitch Sweep; 80 → 400 Hz; LPC order 46. |
| Robotic Pulse | Pulse Train; period 8 ms; LPC order 46. |
| Stretched Whisper | Time Stretch; factor 5.0; LPC order 50. |
| Chirp Texture | Chirp Burst; 60 → 8000 Hz; LPC order 46. |
| Grain Cloud | Granular Noise; density 0.4 → 0.4; LPC order 40. |
| Vibrato Voice | Pitch Sweep; 120 → 220 Hz; 5.5 Hz vibrato; ±35 cents vibrato depth; ±8 cents pitch jitter; LPC order 46. |
| Jittered Pulse | Pulse Train; 7.3 ms period; ±8% period jitter; ±25% shimmer-like amplitude wobble; LPC order 46. |
| Density Cloud | Granular Noise; density 0.2 → 0.9; ±30% grain-size modulation; LPC order 42. |
| Chirp Stack | Chirp Burst; 80 → 3000 Hz; 4 layers; ratios 1.0, 1.5, 2.7, 4.2; LPC order 50. |
| Cross-Synth | Cross-synthesis mode 2; LPC order 48. The displayed excitation method is irrelevant because mode 2 uses Sound2’s residual. |
Parameters
| Parameter | Default | Meaning |
|---|---|---|
| Cross_synth_mode | Off | Selects the assignment of excitation/residual, LPC filter, and articulation source. |
| Excitation_method | Pitch Sweep | Synthetic source used in modes 1 and 3. Ignored in mode 2. |
| Start_freq_hz / End_freq_hz | 80 / 300 Hz | Pitch Sweep endpoints. |
| Vibrato_rate_hz / depth | 0 / 0 | Pitch Sweep vibrato; depth is in cents. |
| Pitch_jitter_cents | 0 | Random-walk pitch deviation for Pitch Sweep. |
| Period_s | 0.01 s | Nominal Pulse Train period. |
| Pulse_jitter_pct | 0 | Random period variation. |
| Pulse_shimmer_pct | 0 | Depth of the post-generation amplitude wobble. |
| Time_stretch_factor | 3.0 | Single-source Time Stretch only. |
| Noise_am_rate_hz / depth | 0 / 0 | Sinusoidal amplitude modulation of Time Stretch noise. |
| Chirp_start_hz / end_hz | 100 / 4000 Hz | Base exponential-chirp endpoints. |
| Chirp_layers | 1 | Number of stacked chirps, clamped to 1–8 internally. |
| Layer_ratios | 1.0, 1.5, 2.0, 2.7 | Multipliers applied to chirp start/end frequencies. |
| Grain_density_start / end | 0.6 / 0.6 | Start/end grain-rate control, internally constrained to 0.01–1. |
| Grain_size_modulation_pct | 0 | Per-grain random size variation. |
| Lpc_order | 46 | Prediction order for both the destination LPC and the excitation LPC. |
| Draw_visualization | On | Draw the Praat AudioTools diagnostic page. |
| Play_result | On | Play the output after processing. |
Input & output behavior
- Selection: exactly one Sound in mode 1; exactly two Sounds in modes 2 and 3.
- Minimum duration: at least 64 ms of effective material.
- Sample rate: preserved from Sound1. In two-Sound modes, both Sounds must have exactly the same sample rate.
- Channels: LPC processing and output are always mono. Multichannel inputs are averaged to mono before analysis/resynthesis.
- Duration: mode 1 normally preserves Sound1 duration. Single-source Time Stretch multiplies the duration by Time_stretch_factor. Modes 2 and 3 use the shorter of Sound1 and Sound2.
- Start time: internal processing uses a 0-based working domain; the final output is shifted back to Sound1’s original
xmin. - Output level: after intensity multiplication, the final Sound is always peak-scaled to 0.99. There is no Natural-level or bypass output mode.
- Output name:
Sound1_Method_Preset. In mode 2 the method label isSound2Residual.
Visualization
When Draw_visualization is enabled, the 8-inch Praat AudioTools page contains:
- Excitation waveform — the synthetic excitation, or Sound2 in residual cross-synthesis mode.
- LPC residual waveform — the excitation after inverse filtering by its own LPC model.
- Output waveform — the re-filtered signal after intensity articulation.
- Spectrum overlay — matched 80 ms Hanning-windowed excerpts from the destination filter source and output, displayed from 0–8 kHz.
- Summary strip — preset, method, cross-synthesis mode, LPC order, analysis settings, source durations, output duration, peak, and sample rate.
The spectrum overlay is a local comparison, not a plot of the LPC coefficients themselves. For equal-duration material, both spectra use the same midpoint interval. For Time Stretch, the same 80 ms window length is taken at the relative midpoint of each signal.
Notes & limitations
- LPC is an all-pole model. The result is therefore shaped by what that model can represent; it is not an exact spectral transplant.
- LPC order is not a formant count. This tool uses LPC as a creative time-varying spectral envelope, not as a formant-measurement command.
- Randomness: Time Stretch noise and Granular Noise are random on every run. Pitch jitter and pulse jitter also introduce randomness when nonzero. There is no random-seed control, so such settings are not reproducible sample-for-sample across runs.
- Pulse shimmer is synthetic modulation. It is not calculated from the source and should not be interpreted as a measured shimmer statistic.
- Time Stretch factor is ignored in mode 3. Mode 2 does not use synthetic excitation controls at all.
- Very high LPC orders or unsuitable material can produce strongly resonant or unstable-sounding resynthesis even when the script completes normally.
- Peak normalization is unconditional. Level comparisons with the source should therefore be made after accounting for the final 0.99 scaling.
Further reading
- Praat manual: Source-filter synthesis 4. Using existing sounds — LPC inverse filtering and resynthesis with an existing source/filter.
- Praat manual: Sound: To LPC (burg)... — Burg LPC analysis, prediction order, analysis window, frame step, and pre-emphasis.
- Praat manual: Sound & IntensityTier: Multiply — application of an IntensityTier to a Sound.
- Anderson, N. (1978). On the calculation of filter coefficients for maximum entropy spectral analysis. Geophysics, 43(1), 69–72. Cited by the Praat documentation for Burg LPC analysis.