Adaptive Pitch Shifter – User Guide

Adaptive pitch transformation driven by amplitude, detected pitch contour, a sinusoidal LFO, or a combined amplitude/LFO signal.

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

What this does

The script modifies the pitch tier of a Praat Manipulation object. At each voiced pitch-tier point, it derives a bipolar modulation signal, optionally smooths that signal, combines it with a base pitch multiplier, writes the resulting frequency back to the pitch tier, and resynthesizes the sound.

The modulation source can follow the sound's measured intensity, its detected pitch contour, a sine-wave LFO, or the average of amplitude modulation and the LFO. The source-dependent modulation is centred around zero, so Base_pitch_shift acts as the centre of the pitch multiplier.

Input requirement: select exactly one Sound. The selected material must contain voiced pitch points within the analysis range chosen by Quality; if no voiced points are detected, the script stops without creating an output.

Quick start

  1. Select exactly one Sound object in Praat.
  2. Run Adaptive_Pitch_Shifter.praat.
  3. Choose Custom or one of the six named presets.
  4. Set the processing, quality, visualization, and playback options.
  5. Click OK. The output Sound remains selected when processing finishes.

Presets

The menu contains Custom plus six named presets. A named preset overwrites only Base_pitch_shift, Modulation_amount, Modulation_source, LFO_frequency, and Smoothing_factor. The other form settings remain as entered by the user.

PresetBaseAmountSourceLFOSmoothing
Customform valueform valueform valueform valueform value
Subtle Wobble1.000.15Amplitude4.0 Hz0.20
Robot Voice0.800.80Time-based LFO8.0 Hz0.05
Harmonic Shimmer1.500.30Pitch Contour2.0 Hz0.30
Deep Bass Mod0.501.00Combined1.5 Hz0.15
Vibrato Effect1.000.08Time-based LFO5.5 Hz0.40
Extreme Warp1.201.50Combined10.0 Hz0.00

LFO_frequency is used only by Time-based LFO and Combined. A stored LFO value therefore has no effect when the selected source is Amplitude or Pitch Contour.

Parameters

Pitch and modulation controls

ParameterDefaultCurrent behavior
PresetCustomSelects manual control or applies one of the six parameter sets listed above.
Base_pitch_shift1.0Positive multiplier that forms the centre of the pitch-shift calculation. For example, 0.5 corresponds to one octave down and 2.0 to one octave up before modulation and safety limiting.
Modulation_amount0.5Positive amount added to or subtracted from the base multiplier according to the modulation signal.
Modulation_sourceAmplitudeChooses Amplitude, Pitch Contour, Time-based LFO, or Combined modulation.
LFO_frequency3.0 HzFrequency of the sine LFO. Used only by Time-based LFO and Combined.
Smoothing_factor0.1One-pole memory coefficient for the modulation signal; valid range 0–1. A value of 0 follows the raw modulation point by point. Increasing values retain more of the preceding modulation state.

Processing and output controls

ParameterDefaultCurrent behavior
Apply_formant_preservationYesYes selects Praat's Get resynthesis (LPC), a speech-oriented spectral-envelope/formant-preserving resynthesis path. No selects Get resynthesis (overlap-add).
Add_stereo_widthNoIf the resynthesized output is mono, duplicates it to stereo and modifies the right channel with a 12 ms delayed component. If the resynthesized output already has more than one channel, this branch is skipped.
Output_gain1.0Final linear amplitude multiplier applied after resynthesis and optional widening. No peak normalization or limiter is applied afterwards.
Draw_visualizationYesDraws the analysis/processing summary in the Picture window when pitch points were stored.
Play_resultYesPlays the finished output after processing.

Quality

Quality directly sets the analysis time step and pitch bounds used by the Manipulation analysis. The same time step and pitch floor are also used by the amplitude-envelope analysis; Pitch Contour additionally uses the corresponding pitch ceiling.

QualityTime stepPitch floorPitch ceiling
Fast0.010 s75 Hz600 Hz
Standard0.005 s75 Hz600 Hz
High Quality0.001 s50 Hz800 Hz

Modulation

The script computes a raw bipolar modulation value m at each voiced pitch-tier point.

Amplitude

Praat Intensity is measured across the input using the current quality time step and pitch floor. The script takes the minimum and maximum measured Intensity values over the sound and maps the value at each voiced point to approximately −1…+1:

normalized = clamp((Intensity(t) - Intensity_min) /
                   (Intensity_max - Intensity_min), 0, 1)
m_raw = 2 * normalized - 1

The Intensity object is in Praat's dB SPL scale. If the measured range collapses to a single value, the modulation at that point remains zero.

Pitch Contour

A separate Pitch analysis is measured over the input. Its detected minimum and maximum frequencies define the adaptive range:

normalized = clamp((Pitch(t) - Pitch_min) /
                   (Pitch_max - Pitch_min), 0, 1)
m_raw = 2 * normalized - 1

If the detected pitch range collapses to a single value, the modulation at that point remains zero.

Time-based LFO

m_raw = sin(2 * pi * LFO_frequency * time)

The sine wave is bipolar, so the base pitch multiplier is its centre.

Combined

Combined modulation averages the bipolar amplitude signal and the sine LFO:

m_raw = (amplitude_modulation + lfo) / 2

Smoothing

The first available modulation point is used directly. Each later voiced point is smoothed with a one-pole recurrence:

m = m_raw * (1 - Smoothing_factor)
    + previous_m * Smoothing_factor

The smoothing is applied to the modulation state before it is combined with the base pitch shift.

Pitch transformation

For each voiced pitch-tier point, the script converts the smoothed modulation into a multiplicative pitch factor:

pitchMultiplier = Base_pitch_shift
                  + m * Modulation_amount
pitchMultiplier = max(0.05, pitchMultiplier)
newFrequency = originalFrequency * pitchMultiplier
newFrequency = clamp(newFrequency, 20, 2000) Hz

The 0.05 multiplier floor prevents a non-positive multiplier under strong negative modulation. The final 20–2000 Hz bounds are safety limits on written pitch-tier frequencies; they do not change the analysis bounds selected by Quality.

Resynthesis & stereo

Resynthesis path

Apply_formant_preservationPraat commandBehavior
YesGet resynthesis (LPC)Uses LPC-based resynthesis so the changed pitch source is combined with a speech-oriented spectral-envelope model derived from the original signal.
NoGet resynthesis (overlap-add)Uses Praat's overlap-add resynthesis from the original sound, pulses, and modified pitch tier.

The script changes the pitch tier only; it does not add or modify a DurationTier.

Stereo width

When Add_stereo_width is enabled and the resynthesized Sound is mono, the mono result is duplicated to two channels. The left channel remains unchanged. The right channel becomes:

right = 0.85 * current
        + 0.15 * left delayed by 12 ms

The delay is converted to samples with the input sampling frequency. This widening stage is applied before Output_gain.

Visualization

When Draw_visualization is enabled, the script samples pitch/modulation points across the entire file for display. At most about 500 points are retained, using a regular stride through the complete pitch tier; this decimation affects only the visualization, not the pitch transformation.

The Picture output contains:

The input and output waveform panels are drawn with their own automatic amplitude ranges, so their plotted heights are not a shared amplitude comparison.

Outputs

The Info window reports the source, selected preset and modulation source, base shift, modulation amount, LFO frequency when applicable, creation progress, selected resynthesis method, output name, and final gain.