Inspired by Chad Kirby's SuperCollider2 Warp1 class, which was inspired by Richard Karpen's sndwarp for CSound. A granular time stretcher and pitchshifter.
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 beginning 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 signal to use for the grain envelope. -1 uses a built-in Hanning envelope. |
overlaps |
the number of overlapping windows. |
windowRandRatio |
the amount of randomness to the windowing function. Must be between 0 (no randomness) to 1.0 (probably too random actually) |
interp |
the interpolation method used for pitchshifting grains. 1 = no interpolation. 2 = linear. 4 = cubic interpolation (more computationally intensive). |
mul | |
add |