Pitch Morphing Between Targets — User Guide

Builds an absolute pitch trajectory from semitone waypoints around the source median F0, with elastic interpolation, bounded overshoot and tension, transition-shaped vibrato, and channel-preserving overlap-add resynthesis.

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

Pitch Morphing Between Targets replaces the source's detected pitch trajectory with a new trajectory that moves through a sequence of user-defined semitone targets. The targets are interpreted relative to the median F0 of the selected source, not relative to the source's moment-to-moment pitch contour.

The script interpolates between consecutive targets, adds optional overshoot, tension, and vibrato in semitone space, converts the resulting trajectory to Hz, applies synthesis-safe frequency limits, and resynthesizes every original channel with one shared PitchTier.

Important distinction: this is target-pitch morphing, not pitch modulation added to the original contour. Once the median F0 has been measured, the new PitchTier is built from the target sequence itself.

Quick start

  1. Select exactly one Sound object.
  2. Run Pitch_Morphing_Between_Targets.praat.
  3. Choose one of the seven built-in presets or Manual.
  4. For Manual, enter at least two underscore-separated semitone targets, for example 0_7_12_-5.
  5. Adjust morph smoothness, overshoot, tension, and vibrato as needed.
  6. Set the pitch-analysis range so the source F0 can be detected reliably.
  7. Enable or disable the Picture-window visualization and automatic playback.
The script stops cleanly if no usable voiced pitch is detected in the selected analysis range. The source may be mono or multichannel.

Targets and reference pitch

Target_pitches is an underscore-separated list of semitone values. At least two finite numeric values are required, and each value must lie between −120 and +120 semitones.

Target sequence: 0_12_-8_15 Reference frequency = median F0 of the source A target of 0 st → median F0 A target of +12 st → 2 × median F0 A target of −12 st → 0.5 × median F0

The targets are distributed evenly across the entire source time domain from its original xmin to xmax. If there are N targets, the morph contains N−1 equal-duration transitions.

Pitch analysis uses a mono reference when the source has more than one channel. The analysis returns the source median voiced F0; it does not copy the source's original melodic contour into the morph trajectory.

Morph curve

Elastic interpolation

Within each target-to-target transition, the normalized position fraction runs from 0 to 1. The base path is:

a = fraction ^ Morph_smoothness b = (1 − fraction) ^ Morph_smoothness elastic = a / (a + b) base_pitch_st = low_target + elastic × (high_target − low_target)

Morph_smoothness must be greater than zero. A value of 1 gives linear interpolation. Values above 1 spend more time near the two targets and move more rapidly around the midpoint; values below 1 move more quickly away from the endpoints and flatten more around the middle.

Overshoot and tension

Both components are bounded semitone offsets whose maximum scale depends on the absolute interval between the current pair of targets. Both are zero at each target boundary.

pitch_distance = |high_target − low_target| over_st = Overshoot_factor × pitch_distance × sin(2π × fraction) × sin(π × fraction) tension_st = Tension_strength × pitch_distance × sin(3π × fraction) × sin(π × fraction)

Setting either amount to 0 removes that component completely. Tension changes pitch only; it does not alter audio intensity.

Transition-shaped vibrato

Vibrato is expressed in semitones and uses a true-Hz sinusoid based on elapsed source time. Its triangular transition envelope is zero at target boundaries and strongest halfway through each transition.

envelope = 1 − |2 × fraction − 1| vibrato_st = Vibrato_amount × sin(2π × Vibrato_frequency × elapsed_time) × envelope

The final semitone path is the sum of the base interpolation, overshoot, tension, and vibrato.

From semitones to Hz

new_F0 = median_F0 × 2^(final_pitch_st / 12)

The generated F0 is then limited to the synthesis-safe range 20 Hz to 0.45 × source sample rate. This safety range is independent of Minimum_pitch and Maximum_pitch, which are analysis/resynthesis settings.

Presets

The menu contains seven built-in presets plus Manual. Presets replace the target sequence and the four morph-character parameters shown below. They do not replace Vibrato_frequency, Time_step, Minimum_pitch, Maximum_pitch, Draw_visualization, or Play_result.

PresetTargetsSmoothOvershootTensionVibrato
Gentle Waves0_3_-2_5_-1_2_02.00.200.050.20 st
Emotional Arcs0_7_-5_12_-8_15_-121.80.300.150.40 st
Dramatic Leaps0_12_-12_24_-24_12_01.20.600.250.50 st
Chromatic Walk0_2_4_5_7_9_11_12_11_9_7_5_4_2_01.50.100.080.15 st
Microtonal Glide0_1.5_-1_2.5_-0.5_1_-1.5_0.52.50.150.030.10 st
Tension Build0_3_1_6_2_9_4_12_51.30.400.300.25 st
Chaotic Dance0_7_-3_15_-8_5_12_-5_20_-120.80.800.400.60 st
ManualUses the values entered in the form unchanged.

Parameters

ParameterDefaultMeaning
PresetManualSeven built-in configurations or direct use of the form values.
Target_pitches0_12_-8_15_-12_20_5_-5Underscore-separated semitone targets relative to the source median F0.
Morph_smoothness1.5Exponent controlling the shape of each target-to-target interpolation.
Overshoot_factor0.4Non-negative interval-scaled spring-like pitch deviation.
Tension_strength0.1Non-negative interval-scaled pitch deviation with a different oscillatory shape.
Vibrato_amount0.3 stPeak semitone amplitude before application of the transition envelope; 0 disables vibrato.
Vibrato_frequency25 HzFrequency of the vibrato sinusoid in true cycles per second.
Time_step0.005 sPraat Pitch/Manipulation analysis step. It does not set the density of the generated morph curve.
Minimum_pitch50 HzLower analysis/resynthesis pitch bound.
Maximum_pitch900 HzUpper analysis/resynthesis pitch bound; must remain below 45% of the source sample rate.
Draw_visualizationYesDraw the run in the Picture window.
Play_resultYesPlay the final Sound after processing.
Morph-curve density: the PitchTier is built with approximately one point per 10 ms, but never fewer than 200 points and never more than 2000 points over the entire Sound. This grid is separate from Time_step.

Resynthesis and output

A mono analysis copy is used only to obtain the source median F0. The generated PitchTier is then applied independently to every original source channel through Praat Manipulation → Replace pitch tier → overlap-add resynthesis.

After resynthesis, the script checks the absolute peak. Only results above 0.95 are scaled down to 0.95; quieter signals are left unchanged. This is an attenuate-only safety ceiling, not target normalization.

Visualization

When Draw_visualization is enabled, the Picture window contains:

For display efficiency, the morph curve stores at most 500 visualization points. The synthesis PitchTier itself still uses the complete 200–2000-point morph grid.