Tempo-Pitch Curves (Accelerando & Ritardando) — User Guide

Local tempo curves with optional pitch tracking of the same effective tempo trajectory.

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 builds one of three tempo shapes across the input: Accelerando, Ritardando, or Slow-Fast-Slow. A 101-point DurationTier carries the final applied time-scaling curve. The user can keep the original total duration or request a new duration between 0.3× and 3.0× the source.

In Pitch changes with tempo mode, voiced F0 follows the same local effective tempo factor used by the final normalized DurationTier. In Keep pitch constant mode, only the DurationTier is replaced.

Quick start

  1. Select exactly one Sound.
  2. Choose Pattern_type.
  3. Choose Pitch_behavior.
  4. Set Strength from 0 to 5.
  5. Keep original duration or enter a Target_duration.
  6. Run. Output naming identifies pattern and pitch mode.

Tempo curve

minTempo = max(0.4, 1 - 0.25*Strength) maxTempo = min(3.0, 1 + 0.35*Strength) Accelerando: rawTempo(x) = minTempo + (maxTempo-minTempo)*x Ritardando: rawTempo(x) = maxTempo - (maxTempo-minTempo)*x Slow-Fast-Slow: c = 2*(x-0.5) rawTempo(x) = minTempo + (maxTempo-minTempo)*(1-c^2) rawDurationFactor = 1/rawTempo, clamped to 0.3 .. 3.0

The script samples this curve at 101 points (i=0..100). It then finds one global scale factor by bisection so the integrated applied DurationTier matches the requested total-duration ratio after safety clamping. The visualization shows effectiveTempo = 1 / appliedDurationFactor, not the unnormalized raw curve.

Pitch behavior

Pitch changes with tempo

Pitch is source-relative and local: at every detected F0 point, the original pitch is multiplied by the interpolated effective tempo factor at that time. It is not an average pitch shift.

newF0(t) = originalF0(t) * effectiveTempo(t)

Synthesis pitch is limited to 20 Hz .. 0.45*SR. The pitch analysis reference is mono, 40 Hz .. min(1200, 0.45*SR). If no voiced pitch is detected, the script automatically performs duration-only processing.

Keep pitch constant

The source PitchTier inside each channel's Manipulation object is left unchanged; only the shared DurationTier is replaced.

Duration control

ModeBehavior
Keep original durationDesired duration ratio = 1.0. The curve is globally scaled so its integrated applied duration equals the source duration.
Specify new durationDesired ratio = Target_duration / source duration. Requests outside 0.3× .. 3.0× are rejected.
Pitch+Duration interaction: because pitch follows the effective tempo curve, changing Target_duration also changes the global pitch level in Pitch+Duration mode. For example, a globally slower effective curve also lowers F0.

Processing

The shared curve is constructed in the source's true xmin/xmax domain. For multichannel input, a mono copy is used only for pitch analysis. Each original channel is then converted separately to a Manipulation object, given the same DurationTier and, when requested and available, the same shifted PitchTier, and resynthesized with overlap-add. The original channel count is rebuilt exactly.

No Change gender post-stage is used. Target duration is represented directly in the DurationTier. Peak safety is attenuation-only at 0.99.

Identity path: Strength=0 with Keep original duration returns an exact copy and bypasses PSOLA, regardless of the selected pitch behavior.

Visualization

Output

PatternPitch+DurationDuration only
Accelerando<source>_accel_pitched<source>_accel_PSOLA
Ritardando<source>_ritard_pitched<source>_ritard_PSOLA
Slow-Fast-Slow<source>_slowFastSlow_pitched<source>_slowFastSlow_PSOLA

Channel count is preserved. The Info window reports requested ratio, represented tier ratio, actual result duration and whether peak safety was applied.