Skip to main content

pitchshift

pitchshift(
@shift 1
@constantlatency 0
@quality 'basic'
@usecents 0
) -> llll

Generates an audio process operation for applying Ztx-based pitch shifting to a buffer.


Arguments

  • @shift [int/float/list/llll]: Pitch shift as a factor of the original pitch (i.e. 2.0 = doubling of pitch, .5 = halving of the original pitch, etc.), or in cents if @usecents is set to 1. Either as a single value, envelope, or buffer. (default: 1).
  • @constantlatency [int]: Constant latency. (default: 0).
    • 0: Off
    • 1: On
  • @quality [symbol]: Pitch shifting output quality. (default: 'basic').
    • 'basic'
    • 'good'
    • 'better'
    • 'best'
  • @usecents [int]: Use cents for @shift. (default: 0).
    • 0: Off
    • 1: On

Output

Pitch shift operation [llll]


Usage

pitchshift is meant to be used with the process function:

$buffer = importaudio('singing.wav'); ## input buffer
$op = pitchshift(2); ## processing operation
$buffer = $buffer.process($op); ## apply processing
$buffer.view('after pitchshift process')