Added help for Pen and updated some other docs
[supercollider.git] / HelpSource / Classes / PV_Mul.schelp
bloba8797d5fdb7e6ec9f01982d78bebf2fe57a90b6e
1 class:: PV_Mul
2 summary:: Complex multiply.
3 related:: Classes/FFT, Classes/IFFT, Classes/PV_Add, Classes/PV_CopyPhase, Classes/PV_MagMul, Classes/PV_Max, Classes/PV_Min
4 categories:: UGens>FFT
6 Description::
8 Complex Multiplication:
10 formula::
12 (RealA * RealB) - (ImagA * ImagB),
13 (ImagA * RealB) + (RealA * ImagB)
18 classmethods::
20 method::new
22 argument::bufferA
23 FFT buffer A.
25 argument::bufferB
26 FFT buffer B.
28 Examples::
30 code::
32 s = Server.internal.boot;
35 SynthDef("help-mul", { arg out=0;
36         var inA, chainA, inB, chainB, chain ;
37         inA = SinOsc.ar(500, 0, 0.5);
38         inB =  SinOsc.ar(Line.kr(100, 400, 5), 0, 0.5);
39         chainA = FFT(LocalBuf(2048), inA);
40         chainB = FFT(LocalBuf(2048), inB);
41         chain = PV_Mul(chainA, chainB);
42         Out.ar(out,  0.1 * IFFT(chain).dup);
43 }).play(s);
44 s.scope;
48 SynthDef("help-mul2", { arg out=0;
49         var inA, chainA, inB, chainB, chain ;
50         inA = SinOsc.ar(500, 0, 0.5) * Line.kr;
51         inB = LFNoise1.ar(20);
52         chainA = FFT(LocalBuf(2048), inA);
53         chainB = FFT(LocalBuf(2048), inB);
54         chain = PV_Mul(chainA, chainB);
55         Out.ar(out,  0.1 * IFFT(chain).dup);
56 }).play(s);
57 s.scope;