Time-Domain PSOLA with Independent Pitch and Formant Controls

Published: July 30, 2026 · Read Time: 6 min read · Category: DSP & Audio

Author: Abhishek Shivakumar (Systems & Audio Engineering)

Real-time pitch correction on a TD-PSOLA engine. F0 estimation, pitch mark allocation, Hann grain overlap-add, and vocal tract preservation.

Time-Domain PSOLA Fundamentals

Time-Domain Pitch Synchronous Overlap and Add (TD-PSOLA) modifies fundamental frequency by adjusting the spacing between periodic waveform grains. Performing the operation directly in the time domain avoids the spectral phase smearing common in phase vocoders.

Pitch shifting moves grain intervals while formant preservation maintains the spectral envelope shape of the singer vocal tract.

NSDF Pitch Tracking

Fundamental frequency estimation runs every 5.8 ms using a Normalized Square Difference Function (NSDF). Peak detection identifies periodicity candidates, which are evaluated through parabolic interpolation.

Grain Slicing and Overlap-Add

Pitch marks align with local energy peaks across periodic cycles. Hann windows extract grains spanning two fundamental periods. Retimed grain positions are accumulated and normalized by the window overlap sum to prevent amplitude distortion.

SDK Processor Interface

The pitch and formant engine is accessible through the Quilio C++ SDK. The processor handles buffer management and parameter smoothing within the realtime audio callback.

#include <quilio/dsp/td_psola.h>

void AudioCallback::process(float** channelData, int numChannels, int numSamples) {
    quilio::PitchShiftParams params;
    params.pitchShiftSemitones = 4.0f;     // Transpose up a major third
    params.formantShiftSemitones = 0.0f;   // Hold natural vocal tract formants
    params.retuneSpeedMs = 25.0f;

    psolaEngine_.processBlock(channelData, numChannels, numSamples, params);
}
Engine Specification

Latency is fixed at 33.5 ms at 44.1 kHz. The engine operates in stereo with separate processing instances per channel.

Buffer-Size Invariance

Audio processing pipelines must yield identical results regardless of host buffer configurations. The TD-PSOLA implementation produces bit-identical output across buffer sizes from 64 to 517 samples.

Back to Quilio Blog