1title:: WarpOverlap 2summary:: Create a texture of Warps 3categories:: Libraries>JoshUGens 4keyword:: JoshUGens 5 6Description:: 7Inspired by Chad Kirby's SuperCollider2 Warp1 class, which was inspired by Richard Karpen's sndwarp for CSound. A granular time strecher and pitchshifter. See the link::Classes/Warp1:: helpfile for more information about Warp1's specifics. This texture will create a series of Warp1s that keep up with the current time. 8 9classmethods:: 10 11method::ar 12 13argument::numChans 14 15argument::buffer 16The buffer number of a mono soundfile. 17 18argument::overlaps 19The number of overlapping warps to create (should be equal to or greater then 3). This must be a fixed integer. The architechture of the SynthDef cannot change after it is compiled. 20 21argument::starttime 22An initial starttime for the warp pointer (in the total buffer) 23 24argument::stretch 25A stretch factor for the individual Warps. 26 27argument::harm 28A float, or an instance of a Ref. If a Ref is used, its values are sequentially distributed among the larger overlapping windows. 29 30argument::windowsize 31The windowsize in seconds of the larger overlapping windows. 32 33argument::step 34A control on the pointer increment. 1 keeps the pointer up with the current time, 0 will halt time. 35 36argument::warpwindowsize 37A float, or an instance of a Ref. The size of the individual warp windows. 38 39argument::warpwindowoverlaps 40A float, or an instance of a Ref. The number of window overlaps for each warp. 41 42argument::warpwindowran 43A float, or an instance of a Ref. The amount of randomness in each warp's windows. 44 45Examples:: 46 47code:: 48s.boot; 49 50( 51s.sendMsg(\b_allocRead, 0, "sounds/a11wlk01.wav", 0, -1); 52 53SynthDef(\warpoverlap, {arg buffer = 0, stretch = 1, windowsize = 6, mul = 1, gate = 1; 54 var out, env, overlaps, harm, wwinsize, wwinoverlap, wwinran; 55 overlaps = 8; 56 harm = [3, 7, 5, -12].midiratio.asRef; 57 wwinsize = `[0.11, 0.11, 0.11, 0.2]; 58 wwinsize = 0.11; 59 wwinoverlap = 8; 60 wwinran = 0.1; 61 env = EnvGen.kr(Env([0.01, 1, 0.01], [0.1, 0.1], 'exp', 1), gate, doneAction: 2); 62 out = WarpOverlap.ar(1, buffer, overlaps, 0, stretch, harm, windowsize, wwinsize, wwinoverlap, wwinran, mul); 63 Out.ar(0, out * env); 64}).send(s); 65 66) 67 68s.sendMsg(\s_new, \warpoverlap, a=s.nextNodeID, 0, 1, \buffer, 0, \stretch, 30, \mul, 0.1) 69 70s.sendMsg(\n_free, a); 71 72:: 73