PitchShiftPA:
Filter:
Classes (extension) | UGens > Filters > Pitch

PitchShiftPA : Object
ExtensionExtension

Phase-Aligned Pitch and Formant Shifter

Description

Phase Aligned Wavepacket (Re-)Synthesis (PAWS) pseudo-UGen, allowing for manipulating pitch and formant structure of the sound independently. This allows e.g. shifting pitch while maintaining the formant structure, or changing the formant without changing the pitch.

PitchShiftPA works only for single-voiced (monophonic) sounds and requires tracking of their fundamental frequency (e.g. using the Pitch UGen). Good quality of tracking is crucial for achieving good results.

The technique used is also known as Pitch Synchronous Overlap-Add synthesis (PSOLA) or Pitch-Synchronous Granular Synthesis (PSGS). This pseudo-UGen was created by Marcin PÄ…czkowski at DXARTS at the University of Washington, and is based on Juan Pampin's and Joseph Anderson's implementation of Keith Lent's pitch shifting algorithm.

NOTE: PitchShiftPA can also be used as a regular asynchronous pitch shifter.

References:

Class Methods

PitchShiftPA.ar(in, freq: 440, pitchRatio: 1, formantRatio: 1, minFreq: 10, maxFormantRatio: 10, grainsPeriod: 2, timeDispersion)

Arguments:

in

The monophonic (single-voice) input signal.

freq

The tracked frequency of the input signal (e.g. using Pitch UGen)

pitchRatio

The ratio of the pitch shift (1 = original, 0.5 = octave down, 2 = octave up).

formantRatio

The ratio of the formant shift (1 = original, 0.5 = octave down, 2 = octave up).

NOTE: formantRatio can also be set to nil in order to create a version of the UGen that allocates less memory. In this mode only pitch manipulation is available and the formant is not changed.
minFreq

Minimum frequency that can be processed (needed for allocating internal buffer). Not modulatable.

maxFormantRatio

Maximum formant ratio (needed for allocating internal buffer). Not modulatable.

grainsPeriod

Number of grains per period of the original signal, also known as 'wave packet' quality, or Q (2 grains per period = 1Q).

timeDispersion

Amount of randomness in the frequency for triggering individual grains. This helps to minimize the amount of combing effect when multiple grains overlap (if grainPeriods number is higher). It is mostly useful when using PitchShiftPA as an asynchronous pitch shifter. By default it is nil and does not introduce any randomness.

Discussion:

See more examples below.

Asynchronous use

PitchShiftPA can be used as a regular asynchronous pitch shifter, similarly to PitchShift. In that scenario it does not require pitch tracking and works for polyphonic signals, but the formant is not preserved and changes with the pitch shift. The main advantage over using the regular PitchShift is that it does not have an upper limit for the pitch shift. The processing delay will increase with increasing the pitch shift.

To use PitchShiftPA as asynchronous pitch shifter, set freq to a static value in the low audible range (20-100), set pitchRatio to 1, treat formatRatio as the pitchRatio, increase grainPeriods and add some timeDispersion.

Examples:

Inherited class methods

Instance Methods

Inherited instance methods

Examples