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.
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.
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
- Select exactly two Sound objects in Praat. The first selected Sound is A (source contour); the second is B (audio to transform).
- Run
Pitch_Contour_Transfer.praat. - Set the pitch-analysis ranges for A and B so that Praat tracks their usable F0 correctly.
- Choose Register: keep B's register or match A's register.
- Set Blend_strength from 0 to 1.
- Choose whether to draw the visualization and play the result.
- Click OK. The output is named
<B name>_matched.
Transfer model
1. Express both contours relative to their own mean
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
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
4. Choose the register anchor
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
| Parameter | Default | Description |
|---|---|---|
| Analysis_time_step | 0.01 s | Pitch-analysis time step for both A and B. Must be greater than zero. |
| Pitch_floor_A | 75 Hz | Lower analysis bound for Sound A. |
| Pitch_ceiling_A | 300 Hz | Upper analysis bound for Sound A; must remain below 45% of A's sample rate. |
| Pitch_floor_B | 50 Hz | Lower analysis bound for Sound B. |
| Pitch_ceiling_B | 300 Hz | Upper analysis bound for Sound B; must remain below 45% of B's sample rate. |
| Register | Keep B's register | Choose whether the transferred contour is anchored at B's mean F0 or A's mean F0. |
| Blend_strength | 1.0 | Contour-shape interpolation from B (0) to A (1). Values outside 0…1 are rejected. |
| Draw_visualization | Yes | Draw waveforms, contour comparison, mean-pitch summary, and run summary in the Picture window. |
| Play_result | Yes | Play the final Sound after processing. |
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.
- Output name:
<B name>_matched. - Channel count: B's original channel count is preserved.
- Duration and time domain: B's original start time, end time, and duration are preserved.
- Sample rate: B's sampling frequency is preserved.
- Spatial image: each B channel is resynthesized independently; the channels are not folded to mono for output.
- Peak handling: if the final absolute peak exceeds 0.95, it is scaled down to 0.95. Quieter outputs are not boosted.
Visualization
When Draw_visualization is enabled, the Picture window shows:
- Sound A waveform and Sound B waveform.
- Result waveform.
- Pitch comparison: B's original F0 in grey, A's time-warped contour on the selected register in green dotted lines, and the transferred target contour in blue.
- B mean reference as a horizontal dotted line.
- Mean-pitch summary: A mean, B original mean, and the re-analyzed result mean.
- Run summary: source, target, register mode, and blend setting.