supernova: fixes for boost-1.49 and gcc-4.7
[supercollider.git] / Help / UGens / FFT / PV_ConformalMap.html
blob8ba5da64a11235b18244728fd29a5736d7e66da1
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <meta http-equiv="Content-Style-Type" content="text/css">
6 <title></title>
7 <meta name="Generator" content="Cocoa HTML Writer">
8 <meta name="CocoaVersion" content="949.35">
9 <style type="text/css">
10 p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Helvetica}
11 p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; min-height: 12.0px}
12 p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
13 p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px}
14 p.p5 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; color: #0021e7}
15 p.p6 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #ad140d; min-height: 12.0px}
16 p.p7 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #ad140d}
17 p.p8 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco}
18 p.p9 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #000000}
19 span.s1 {color: #000000}
20 span.s2 {text-decoration: underline}
21 span.s3 {color: #0000bf}
22 span.s4 {color: #001bb9}
23 span.s5 {color: #2c7014}
24 span.Apple-tab-span {white-space:pre}
25 </style>
26 </head>
27 <body>
28 <p class="p1"><b>PV_ConformalMap<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>complex plane attack<span class="Apple-converted-space"> </span></b></p>
29 <p class="p2"><br></p>
30 <p class="p3"><b>PV_ConformalMap(buffer, real, imag)</b></p>
31 <p class="p2"><br></p>
32 <p class="p3">Applies the conformal mapping z -&gt; (z-a)/(1-za*) to the phase vocoder bins z with a given by the real and imag inputs to the UGen.</p>
33 <p class="p4"><br></p>
34 <p class="p3">ie, makes a transformation of the complex plane so the output is full of phase vocoder artifacts but may be musically fun. Usually keep |a|&lt;1 but you can of course try bigger values to make it really noisy. a=0 should give back the input mostly unperturbed.</p>
35 <p class="p4"><br></p>
36 <p class="p3">See http://mathworld.wolfram.com/ConformalMapping.html</p>
37 <p class="p4"><br></p>
38 <p class="p3"><b>buffer</b> - buffer number of buffer to act on, passed in through a chain (see examples below).</p>
39 <p class="p3"><b>real</b> - real part of a.<span class="Apple-converted-space"> </span></p>
40 <p class="p3"><b>imag</b> - imaginary part of a.</p>
41 <p class="p2"><br></p>
42 <p class="p5"><span class="s1">See also <a href="FFT Overview.html"><span class="s2">FFT Overview</span></a>.</span></p>
43 <p class="p2"><br></p>
44 <p class="p6"><br></p>
45 <p class="p7">// examples</p>
46 <p class="p6"><br></p>
47 <p class="p8">(</p>
48 <p class="p9">{</p>
49 <p class="p9"><span class="Apple-tab-span"> </span><span class="s3">var</span> in, chain;</p>
50 <p class="p9"><span class="Apple-tab-span"> </span>in = <span class="s3">SinOsc</span>.ar(450) * 0.1;</p>
51 <p class="p9"><span class="Apple-tab-span"> </span>chain = <span class="s3">FFT</span>(<span class="s3">LocalBuf</span>(2048), in);</p>
52 <p class="p9"><span class="Apple-tab-span"> </span>chain = <span class="s3">PV_ConformalMap</span>(chain, <span class="s3">MouseX</span>.kr(-1.0,1.0), <span class="s3">MouseY</span>.kr(-1.0,1.0));</p>
53 <p class="p9"><span class="Apple-tab-span"> </span><span class="s3">IFFT</span>(chain).dup;</p>
54 <p class="p9">}.play;</p>
55 <p class="p8">)</p>
56 <p class="p6"><br></p>
57 <p class="p6"><br></p>
58 <p class="p7">// microphone input - use headphones to prevent feedback</p>
59 <p class="p8">(</p>
60 <p class="p8">{</p>
61 <p class="p8"><span class="Apple-tab-span"> </span><span class="s4">var</span> in, chain;</p>
62 <p class="p8"><span class="Apple-tab-span"> </span>in = <span class="s4">SoundIn</span>.ar(0, 0.5);</p>
63 <p class="p8"><span class="Apple-tab-span"> </span>chain = <span class="s4">FFT</span>(<span class="s3">LocalBuf</span>(2048), in);</p>
64 <p class="p8"><span class="Apple-tab-span"> </span>chain = <span class="s4">PV_ConformalMap</span>(chain, <span class="s4">MouseX</span>.kr(-1.0,1.0), <span class="s4">MouseY</span>.kr(-1.0,1.0));</p>
65 <p class="p8"><span class="Apple-tab-span"> </span><span class="s4">IFFT</span>(chain).dup;</p>
66 <p class="p8">}.play;</p>
67 <p class="p8">)</p>
68 <p class="p2"><br></p>
69 <p class="p2"><br></p>
70 <p class="p2"><br></p>
71 <p class="p8">(</p>
72 <p class="p8">{</p>
73 <p class="p8"><span class="Apple-tab-span"> </span><span class="s4">var</span> in, chain, signal;</p>
74 <p class="p8"><span class="Apple-tab-span"> </span>var real = <span class="s4">MouseX</span>.kr(0.01,2.0, <span class="s5">'exponential'</span>);</p>
75 <p class="p8"><span class="Apple-tab-span"> </span>var imag = <span class="s4">MouseY</span>.kr(0.01,10.0, <span class="s5">'exponential'</span>);</p>
76 <p class="p8"><span class="Apple-tab-span"> </span>in = <span class="s4">Mix</span>(</p>
77 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s4">LFSaw</span>.ar(</p>
78 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s4">SinOsc</span>.kr(<span class="s4">Array</span>.rand(3, 0.1, 0.5), 0, 10, [1, 1.1, 1.5, 1.78, 2.45, 6.7] * 220),</p>
79 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>0, 0.3</p>
80 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>)</p>
81 <p class="p8"><span class="Apple-tab-span"> </span>);</p>
82 <p class="p8"><span class="Apple-tab-span"> </span>chain = <span class="s4">FFT</span>(<span class="s3">LocalBuf</span>(2048), in);</p>
83 <p class="p8"><span class="Apple-tab-span"> </span>chain = <span class="s4">PV_ConformalMap</span>(chain, real, imag);</p>
84 <p class="p8"><span class="Apple-tab-span"> </span>signal = <span class="s4">IFFT</span>(chain);</p>
85 <p class="p2"><span class="Apple-tab-span"> </span></p>
86 <p class="p8"><span class="Apple-tab-span"> </span>(<span class="s4">CombN</span>.ar(signal, 0.1, 0.1, 10, 0.5) + signal).dup;</p>
87 <p class="p8">}.play;</p>
88 <p class="p8">)</p>
89 </body>
90 </html>