WarpZ:
Filter:
Classes (extension) | Libraries > JoshUGens

WarpZ : MultiOutUGen : UGen : AbstractFunction : Object
ExtensionExtension

Warp a buffer with a time pointer
Source: WarpZ.sc
 

Description

Inspired by Chad Kirby's SuperCollider2 Warp1 class, which was inspired by Richard Karpen's sndwarp for CSound. A granular time strecher and pitchshifter.

Class Methods

WarpZ.ar(numChannels: 1, bufnum: 0, pointer: 0, freqScale: 1, windowSize: 0.2, envbufnum: -1, overlaps: 8, windowRandRatio: 0.0, interp: 1, zeroSearch: 0, zeroStart: 0, mul: 1, add: 0)

Arguments:

numChannels

The number of channels in the soundfile used in bufnum.

bufnum

The buffer number of a mono soundfile.

pointer

The position in the buffer. The value should be between 0 and 1, with 0 being the begining of the buffer, and 1 the end.

freqScale

The amount of frequency shift. 1.0 is normal, 0.5 is one octave down, 2.0 is one octave up. Negative values play the soundfile backwards.

windowSize

The size of each grain window.

envbufnum

The buffer number containing a singal to use for the grain envelope. -1 uses a built-in Hanning envelope.

overlaps

The number of overlaping windows.

windowRandRatio

The amount of randomness to the windowing function. Must be between 0 (no randomness) to 1.0 (probably to random actually)

interp

The interpolation method used for pitchshifting grains. 1 = no interpolation. 2 = linear. 4 = cubic interpolation (more computationally intensive).

zeroSearch

If > 0.0, the UGen will search through the buffer from the current 'pointer' looking for a zero crossing in the signal to start the grain with. The search is limitied to zeroSearch seconds (i.e., if zeroSearch is 0.01, the UGen will only try to find a zero crossing within 0.01 seconds of the pointer).

zeroStart

If > 0.0, an attempt will be made to scuedule the next grain according to a zero crossing in the current grain. This value limits the search to zeroStart as a percentage of the current grain's duration (i.e., if the current grain's duration is 0.2, and zeroStart is 0.1, the algorithm will attempt to find the closest zero crossing in the current grain +/- 0.02 seconds from when the next grain was originally scheduled according to windowSize / overlaps).

mul

Scale.

add

Offset.

Inherited class methods

Instance Methods

.argNamesInputsOffset

.init(argNumChannels ... theInputs)

Inherited instance methods

Examples