QcPenPrinter: no need to allocate QPrintDialog on heap
[supercollider.git] / HelpSource / Classes / PV_Add.schelp
blob4e40929d08e0761a30863cdfed3d470c8d04c26f
1 class:: PV_Add
2 summary:: Complex addition.
3 related:: Classes/FFT, Classes/IFFT, Classes/PV_CopyPhase, Classes/PV_MagMul, Classes/PV_Max, Classes/PV_Min, Classes/PV_Mul
4 categories:: UGens>FFT
6 Description::
8 Complex addition:
10 formula::
12 RealA + RealB, ImagA + ImagB
17 classmethods::
19 method::new
21 argument::bufferA
22 FFT buffer A.
24 argument::bufferB
25 FFT buffer B.
27 Examples::
29 code::
31 s.boot;
32 b = Buffer.read(s, Help.dir +/+ "sounds/a11wlk01.wav");
35 SynthDef("help-add", { arg out=0, soundBufnum;
36         var inA, chainA, inB, chainB, chain ;
37         inA = PlayBuf.ar(1, soundBufnum, BufRateScale.kr(soundBufnum), loop: 1);
38         inB =  PlayBuf.ar(1, soundBufnum, BufRateScale.kr(soundBufnum) * 0.5, loop: 1);
39         chainA = FFT(LocalBuf(2048), inA);
40         chainB = FFT(LocalBuf(2048), inB);
41         chain = PV_Add(chainA, chainB);
42         Out.ar(out,  0.1 * IFFT(chain).dup);
43 }).play(s, [\soundBufnum, b.bufnum]);
46 b.free