Gizmo Pitch Shift — User Guide

An exact-frame phase-vocoder pitch shifter with per-bin phase tracking, arbitrary-even FFT frames, overlap-weight normalization and preserved duration.

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

What this does

Gizmo Pitch Shift is a short-time Fourier phase vocoder pitch shifter. It analyzes overlapping frames, estimates each source bin's true phase advance, scales that advance by the requested pitch ratio, gathers source magnitudes into transposed target bins, integrates new synthesis phases and reconstructs the signal with overlap-add.

Unlike a varispeed shift, it keeps the original duration and sample rate. Unlike Praat's PSOLA/Manipulation tools, it does not depend on voiced pitch marks; the transform works on the full short-time spectrum and can therefore process speech, music, noise and polyphonic material, although quality depends on frame size, overlap and source transients.

No automatic output normalization: the phase-vocoder result is deliberately left at its reconstructed level. If the final peak exceeds ±1, the script reports a warning but does not scale it down.

What is a phase vocoder?

A phase vocoder analyzes a signal as a sequence of overlapping short-time spectra. Magnitude tells how strong each bin is; changes in phase between frames reveal the bin's actual instantaneous frequency more accurately than the nominal FFT-bin centre alone. Resynthesis then uses those phase advances to maintain coherent motion from one frame to the next.

In this script, pitch transposition uses the ratio:

ratio = 2^(semitones / 12) target_bin = round(source_bin · ratio)

Magnitudes from source bins that land on the same target bin are summed. The measured phase advance is also scaled by the ratio and accumulated on the target bin. For upward shifts, source content above Nyquist / ratio cannot survive because its destination would lie above Nyquist and is therefore discarded.

Quick start

  1. Select exactly one Sound.
  2. Run Gizmo_Pitch_Shift.praat.
  3. Start with Fifth up or Minor third up.
  4. Use shorter frames for tighter transient localization; use longer frames for more frequency resolution and smoother sustained material.
  5. Lower Hop_fraction for more overlap.
  6. Use Dry_wet_mix for parallel detuning or partial transposition.

Presets

PresetShiftFrameHop fractionWindowWet
Fifth up+7 st80 ms0.25Hann1.0
Octave up+12 st40 ms0.25Hann1.0
Octave down−12 st120 ms0.125Hann1.0
Minor third up+3 st80 ms0.25Hamming1.0
Detune shimmer+0.2 st60 ms0.25Hann0.5
Smeared drone−5 st250 ms0.50Gaussian1.0
Transient-focused+7 st23 ms0.125Hann1.0

Controls

ControlDefaultMeaning
Semitones7Requested transposition, clamped to −12…+12 semitones.
Frame_length_s0.08Requested analysis/synthesis frame. Rounded to an even sample count and limited to 64…32768 samples.
Hop_fraction0.25Hop as a fraction of frame length; clamped to 0.03125…1.0. Overlap = 100·(1-hop/frame).
Window_typeHannHann, Hamming or Gaussian analysis/synthesis window.
Dry_wet_mix1.0Linear aligned dry/wet mix, clamped to 0…1.
Draw_visualizationOnDraws the phase-vocoder diagnostic figure.
Show_infoOnPrints geometry, overlap, COLA weight and pitch verification.
Play_resultOnPlays the result after processing.

Processing pipeline

  1. Compute pitch ratio from semitones and derive exact even frame size, hop, bin count and overlap.
  2. Build one analysis/synthesis window and a global w² overlap weight buffer.
  3. For each source channel independently, create a zero-padded input buffer.
  4. For every frame: window → exact-length FFT → magnitude/phase → true phase advance relative to the expected bin rotation.
  5. Multiply source phase advance by pitch ratio.
  6. Gather source magnitudes into target bins round(k·ratio); magnitudes sum where bins collide.
  7. Integrate the target-bin synthesis phases, inverse-transform, apply the synthesis window and overlap-add.
  8. Divide by the accumulated w² weight, so unity reconstruction does not depend on the window/hop satisfying a textbook COLA condition.
  9. Copy the valid interior back to a source-length output and optionally mix the sample-aligned dry signal.

Frame length, overlap and pitch-shift trade-offs

Short frames localize attacks more tightly but provide wider FFT bins and less frequency resolution. Long frames improve frequency resolution and can help large downward shifts, but they spread changes over a longer time region and can soften transients. More overlap increases temporal sampling of the short-time spectra at greater computational cost.

Smeared Drone is intentionally smeared: its 250 ms Gaussian frame is a compositional choice, not a transparency setting. Conversely, Transient-focused uses a 23 ms frame and 87.5% overlap to reduce time smear, but it does not guarantee transient-perfect reconstruction.

Channels, time domain, bandwidth and level

Output name: <source>_gizmo_shift_+7st, ..._-5st, etc., according to the actual clamped semitone value.

Visualization and verification

Technological and compositional context

The phase vocoder emerged from speech-analysis and telecommunications research. J. L. Flanagan and R. M. Golden's 1966 Bell System paper described a representation based on short-time amplitude and phase spectra, including applications to time compression and expansion. By the 1980s, computer musicians had adopted the technique as a general transformation instrument; Mark Dolson's 1986 tutorial explicitly framed the phase vocoder as a tool for composers interested in modifying natural sounds and for high-quality time-scale and pitch transformation.

Gizmo Pitch Shift belongs to that lineage but implements its own compact Praat-native variant: exact frame-length FFTs, per-bin phase-advance tracking, discrete bin gathering and explicit overlap-weight normalization. The musical controls — frame length, overlap and window — are therefore not cosmetic “quality” switches; they define the time-frequency resolution through which the sound is re-composed.

Max/MSP connection: The name also recalls Cycling '74's gizmo~, a frequency-domain pitch-shifting object designed for use inside pfft~. Both belong to the same FFT-based transformation tradition, but this Praat script is an independent implementation rather than a port or emulation of the Max/MSP object.

Further reading: J. L. Flanagan & R. M. Golden, “Phase Vocoder,” Bell System Technical Journal 45(9), 1966, DOI 10.1002/j.1538-7305.1966.tb01706.x; Mark Dolson, “The Phase Vocoder: A Tutorial,” Computer Music Journal 10(4), 1986, pp. 14–27.