1 //third party FFT UGens
3 //sick lincoln remembers complex analysis courses
4 PV_ConformalMap : PV_ChainUGen
7 *new { arg buffer, areal = 0.0, aimag = 0.0;
8 ^this.multiNew('control', buffer, areal, aimag)
12 //in and kernel are both audio rate changing signals
15 *ar { arg in, kernel, framesize=512,mul = 1.0, add = 0.0;
16 ^this.multiNew('audio', in, kernel, framesize).madd(mul, add);
20 //fixed kernel convolver with fix by nescivi to update the kernel on receipt of a trigger message
23 *ar { arg in, kernel, trigger = 0, framesize=2048,mul = 1.0, add = 0.0;
24 ^this.multiNew('audio', in, kernel, trigger, framesize).madd(mul, add);
28 //fixed kernel convolver with linear crossfade
31 *ar { arg in, kernel, trigger = 0, framesize=2048, crossfade=1, mul = 1.0, add = 0.0;
32 ^this.multiNew('audio', in, kernel, trigger, framesize, crossfade).madd(mul, add);
36 //fixed kernel stereo convolver with linear crossfade
37 StereoConvolution2L : MultiOutUGen
39 *ar { arg in, kernelL, kernelR, trigger=0, framesize=2048, crossfade=1, mul = 1.0, add = 0.0;
40 ^this.multiNew('audio', in, kernelL, kernelR, trigger, framesize, crossfade).madd(mul, add);
42 init { arg ... theInputs;
45 OutputProxy(rate, this, 0),
46 OutputProxy(rate, this, 1)
52 //time based convolution by nescivi
55 *ar { arg in, kernel, trigger=0, framesize=2048, mul = 1.0, add = 0.0;
56 ^this.multiNew('audio', in, kernel, trigger, framesize).madd(mul, add);
58 *kr { arg in, kernel, trigger=0, framesize=2048, mul = 1.0, add = 0.0;
59 ^this.multiNew('control', in, kernel, trigger, framesize).madd(mul, add);
64 //jensen andersen inspired FFT feature detector
65 PV_JensenAndersen : PV_ChainUGen
67 *ar { arg buffer, propsc=0.25, prophfe=0.25, prophfc=0.25, propsf=0.25, threshold=1.0, waittime=0.04;
68 ^this.multiNew('audio', buffer, propsc, prophfe, prophfc, propsf, threshold, waittime);
73 PV_HainsworthFoote : PV_ChainUGen
75 *ar { arg buffer, proph=0.0, propf=0.0, threshold=1.0, waittime=0.04;
76 ^this.multiNew('audio', buffer, proph, propf, threshold, waittime);
80 //not FFT but useful for time domain onset detection
83 *ar { arg in, numsamp=40;
84 ^this.multiNew('audio', in, numsamp);
87 *kr { arg in, numsamp=40;
88 ^this.multiNew('control', in, numsamp);
91 *rms { arg in, numsamp=40;
92 ^(RunningSum.ar(in.squared,numsamp)*(numsamp.reciprocal)).sqrt;