Pitch Contour Transfer — User Guide

Transfers the time-normalized melodic contour of Sound A onto Sound B, with independent control over contour blend and register.

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

What this does

Pitch Contour Transfer uses two selected Sounds: A supplies the pitch-contour shape and B supplies the audio to be transformed. A's contour is time-normalized to B's duration, expressed as semitone deviations around A's mean F0, then blended with B's own semitone contour.

The Register option is independent of contour shape. You can keep B's overall pitch register while imposing A's melodic shape, or move B to A's register as well.

Two useful full-transfer cases:
Blend = 1 + Keep B's register → B keeps its overall pitch level but follows A's time-warped contour.
Blend = 1 + Match A's register → B follows A's contour and is anchored at A's mean pitch level.

The script does not copy A's audio, spectrum, timing, or amplitude onto B. Only pitch-contour information is transferred.

Quick start

  1. Select exactly two Sound objects in Praat. The first selected Sound is A (source contour); the second is B (audio to transform).
  2. Run Pitch_Contour_Transfer.praat.
  3. Set the pitch-analysis ranges for A and B so that Praat tracks their usable F0 correctly.
  4. Choose Register: keep B's register or match A's register.
  5. Set Blend_strength from 0 to 1.
  6. Choose whether to draw the visualization and play the result.
  7. Click OK. The output is named <B name>_matched.
Blend interpretation: 0 keeps B's own pitch contour; 1 uses A's transferred contour; intermediate values interpolate between the two in semitone space.

Transfer model

1. Express both contours relative to their own mean

devA(t) = 12 × log2(F0A(t) / meanA)
devB(t) = 12 × log2(F0B(t) / meanB)

The deviations are measured in semitones. This separates melodic shape from absolute register.

2. Time-warp A onto B

phase = tB / durationB
tA = phase × durationA

Corresponding relative positions are matched: the beginning of A maps to the beginning of B, the midpoint to the midpoint, and the end to the end, regardless of the two source durations.

3. Blend contour shapes

finalDeviation = Blend_strength × devA + (1 − Blend_strength) × devB

4. Choose the register anchor

Keep B's register: anchor = meanB
Match A's register: anchor = meanA

targetF0 = anchor × 2^(finalDeviation / 12)

Target values are then limited only by the synthesis safety range: 20 Hz to 0.45 × B's sampling frequency.

Parameters

ParameterDefaultDescription
Analysis_time_step0.01 sPitch-analysis time step for both A and B. Must be greater than zero.
Pitch_floor_A75 HzLower analysis bound for Sound A.
Pitch_ceiling_A300 HzUpper analysis bound for Sound A; must remain below 45% of A's sample rate.
Pitch_floor_B50 HzLower analysis bound for Sound B.
Pitch_ceiling_B300 HzUpper analysis bound for Sound B; must remain below 45% of B's sample rate.
RegisterKeep B's registerChoose whether the transferred contour is anchored at B's mean F0 or A's mean F0.
Blend_strength1.0Contour-shape interpolation from B (0) to A (1). Values outside 0…1 are rejected.
Draw_visualizationYesDraw waveforms, contour comparison, mean-pitch summary, and run summary in the Picture window.
Play_resultYesPlay the final Sound after processing.
Analysis bounds are not synthesis clamps. They determine which F0 values Praat can detect in the input. The generated contour may extend beyond those analysis ceilings, subject to the separate 20 Hz…0.45×sample-rate safety range.

Analysis and timing behavior

For pitch analysis, each input is converted to a mono reference when necessary. The analysis references are extracted over the complete input duration with time reset to a zero-based domain. The original Sounds themselves are not replaced by these mono references.

The arithmetic mean F0 and voiced-frame count are measured for both A and B. If either Sound has no usable voiced pitch in its selected analysis range, the script stops.

Voiced and unvoiced regions

A target PitchTier point is created only when B has a defined voiced F0 at that analysis frame. B's original voicing structure therefore governs where pitch targets are supplied to the Manipulation resynthesis.

If the time-mapped position in A is unvoiced, the script carries forward A's most recent valid semitone deviation. Before A's first valid pitch value, the fallback deviation is 0 semitones relative to A's mean.

Different durations

A is mapped proportionally across B's duration rather than copied at absolute times. This means contour landmarks retain their relative position in the phrase even when A and B have different lengths.

Resynthesis and output

One shared transferred PitchTier is created from the analyses. Praat then resynthesizes each original channel of B independently with that same target tier using a Manipulation object and overlap-add resynthesis. The processed channels are rebuilt in their original channel order.

Verification: after synthesis, the result is converted to mono only for a wider-range pitch re-analysis. The resulting mean F0 is reported in the Info window; this verification copy does not alter the final multichannel Sound.

Visualization

When Draw_visualization is enabled, the Picture window shows:

For drawing efficiency, pitch curves are decimated to at most 500 stored visualization points. The blue contour is the target PitchTier schedule used for resynthesis, not a second frame-by-frame pitch analysis of the output. The output's verified mean is shown separately in the statistics bar.