Forgot a help fix: Drag a dock's title bar, not divider, to reposition
[supercollider.git] / HelpSource / Classes / PV_Conj.schelp
blob7998bf4e7fa5f9c3a0b6ddfb5d245a0884f76893
1 class:: PV_Conj
2 summary:: Complex conjugate
3 categories:: UGens>FFT
5 description::
6 Converts the FFT frames to their complex conjugate (i.e. reverses the sign of their imaginary part). This is not usually a useful audio effect in itself, but may be a component of other analysis or transformation processes...
8 classmethods::
9 method:: new
10 argument:: chain
11 fft chain.
13 examples::
14 code::
15 s.boot;
18 b = Buffer.alloc(s,2048,1);
19 c = Buffer.read(s, Platform.resourceDir +/+ "sounds/a11wlk01.wav");
20 d = Buffer.alloc(s,2048,1);
24 SynthDef(\help_pvconj, {  arg out=0, bufnum=0, soundBufnum=2;
25         var in, chain;
26         in = PlayBuf.ar(1, soundBufnum, BufRateScale.kr(soundBufnum), loop: 1);
27         chain = FFT(bufnum, in);
28         chain = PV_Conj(chain);
29         // Original is left, conj is right
30         Out.ar(out, 0.3 * [in, IFFT(chain)]);
31 }).play(s,[\out, 0, \bufnum, b, \soundBufnum, c]);
35 SynthDef(\help_pvconj2, {  arg out=0, bufnum=0, soundBufnum=2;
36         var in, chainA, chainB;
37         in = PlayBuf.ar(1, soundBufnum, BufRateScale.kr(soundBufnum), loop: 1);
38         chainA = FFT(bufnum, in);
39         chainB = PV_Copy(chainA, d);
40         chainB = PV_Conj(chainB);
41         // Now we have the original and conjugate, what happens if we add them?
42         Out.ar(out, 0.3 * (IFFT(PV_Add(chainA, chainB)).dup));
43 }).play(s,[\out, 0, \bufnum, b, \soundBufnum, c]);