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.
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.
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:
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
- Select exactly one Sound.
- Run
Gizmo_Pitch_Shift.praat. - Start with Fifth up or Minor third up.
- Use shorter frames for tighter transient localization; use longer frames for more frequency resolution and smoother sustained material.
- Lower Hop_fraction for more overlap.
- Use Dry_wet_mix for parallel detuning or partial transposition.
Presets
| Preset | Shift | Frame | Hop fraction | Window | Wet |
|---|---|---|---|---|---|
| Fifth up | +7 st | 80 ms | 0.25 | Hann | 1.0 |
| Octave up | +12 st | 40 ms | 0.25 | Hann | 1.0 |
| Octave down | −12 st | 120 ms | 0.125 | Hann | 1.0 |
| Minor third up | +3 st | 80 ms | 0.25 | Hamming | 1.0 |
| Detune shimmer | +0.2 st | 60 ms | 0.25 | Hann | 0.5 |
| Smeared drone | −5 st | 250 ms | 0.50 | Gaussian | 1.0 |
| Transient-focused | +7 st | 23 ms | 0.125 | Hann | 1.0 |
Controls
| Control | Default | Meaning |
|---|---|---|
| Semitones | 7 | Requested transposition, clamped to −12…+12 semitones. |
| Frame_length_s | 0.08 | Requested analysis/synthesis frame. Rounded to an even sample count and limited to 64…32768 samples. |
| Hop_fraction | 0.25 | Hop as a fraction of frame length; clamped to 0.03125…1.0. Overlap = 100·(1-hop/frame). |
| Window_type | Hann | Hann, Hamming or Gaussian analysis/synthesis window. |
| Dry_wet_mix | 1.0 | Linear aligned dry/wet mix, clamped to 0…1. |
| Draw_visualization | On | Draws the phase-vocoder diagnostic figure. |
| Show_info | On | Prints geometry, overlap, COLA weight and pitch verification. |
| Play_result | On | Plays the result after processing. |
Processing pipeline
- Compute pitch ratio from semitones and derive exact even frame size, hop, bin count and overlap.
- Build one analysis/synthesis window and a global w² overlap weight buffer.
- For each source channel independently, create a zero-padded input buffer.
- For every frame: window → exact-length FFT → magnitude/phase → true phase advance relative to the expected bin rotation.
- Multiply source phase advance by pitch ratio.
- Gather source magnitudes into target bins
round(k·ratio); magnitudes sum where bins collide. - Integrate the target-bin synthesis phases, inverse-transform, apply the synthesis window and overlap-add.
- Divide by the accumulated w² weight, so unity reconstruction does not depend on the window/hop satisfying a textbook COLA condition.
- 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.
Channels, time domain, bandwidth and level
- Channel count: preserved. Every input channel is processed independently with the same settings.
- Duration: preserved.
- Sample rate: preserved.
- Start time: preserved; the internal zero-time output container is shifted back to the source
xmin. - Latency: analysis padding is removed when the valid interior is copied out, so dry and wet are sample-aligned for mixing.
- Upward shifts: source frequencies above
Nyquist / ratioare discarded because their transposed targets would exceed Nyquist. - Level: no output normalization is applied. Peaks above ±1 are reported, not corrected.
- Dry_wet_mix = 0: the final formula is the original sample-aligned dry signal, so this is a true dry amplitude bypass even though the wet path has already been computed.
Output name: <source>_gizmo_shift_+7st, ..._-5st, etc., according to the actual clamped semitone value.
Visualization and verification
- Input and output waveforms with their actual peaks; the output panel explicitly states that no normalization is used.
- The FFT-bin mapping
k → round(k × ratio). - Input/output spectra on one shared dB reference, so level differences remain visible.
- Window overlap and measured overlap-weight ripple.
- Pitch-track verification when Praat can obtain enough voiced frames. The reported median F0 shift is a verification aid, not the DSP control path.
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.