cmake: supernova - missing include_directories() for Jack
[supercollider.git] / Help / UGens / Multichannel / Panners / SplayAz.html
blobe1b65e9537cd05f2cac946a49af7674cf066e652
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.43">
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: 12.0px Helvetica; min-height: 14.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: 9.0px Monaco; min-height: 12.0px}
14 p.p5 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco}
15 p.p6 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #0020b4}
16 p.p7 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #95241b}
17 p.p8 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #bf0000}
18 span.s1 {text-decoration: underline ; color: #0018ea}
19 span.s2 {color: #0020b4}
20 span.s3 {color: #000000}
21 span.s4 {color: #426d1a}
22 span.s5 {color: #95241b}
23 span.s6 {color: #0000bf}
24 span.Apple-tab-span {white-space:pre}
25 </style>
26 </head>
27 <body>
28 <p class="p1"><b>SplayAz</b></p>
29 <p class="p2"><b></b><br></p>
30 <p class="p3"><b>*ar(numChans,inArray, spread,level, width, center, orientation, levelComp)</b></p>
31 <p class="p3"><b>*arFill(numChans, n, function, spread,level, width, center, orientation, levelComp)</b></p>
32 <p class="p4"><br></p>
33 <p class="p3">SplayAz spreads an array of channels across a ring of channels.</p>
34 <p class="p3">Optional spread and center controls, and levelComp(ensation) (equal power).</p>
35 <p class="p3">numChans and orientation are as in PanAz.</p>
36 <p class="p2"><br></p>
37 <p class="p3"><b>See also:</b> <a href="PanAz.html"><span class="s1">PanAz</span></a>, SplayZ (deprecated)</p>
38 <p class="p2"><br></p>
39 <p class="p5">(</p>
40 <p class="p5">x = { <span class="s2">arg</span> spread=1, level=0.2, width=2, center=0.0;<span class="Apple-converted-space"> </span></p>
41 <p class="p6"><span class="s3"><span class="Apple-converted-space"> </span></span>SplayAz<span class="s3">.ar(</span></p>
42 <p class="p5"><span class="Apple-converted-space">  </span>4,</p>
43 <p class="p5"><span class="Apple-converted-space">  </span><span class="s2">SinOsc</span>.ar( { <span class="s2">|i|</span> <span class="s2">LFNoise2</span>.kr( rrand(10, 20), 200, i + 3 * 100) } ! 10),<span class="Apple-converted-space"> </span></p>
44 <p class="p5"><span class="Apple-converted-space">  </span>spread,<span class="Apple-converted-space"> </span></p>
45 <p class="p5"><span class="Apple-converted-space">  </span>level,<span class="Apple-converted-space"> </span></p>
46 <p class="p5"><span class="Apple-converted-space">  </span>width,</p>
47 <p class="p5"><span class="Apple-converted-space">  </span>center</p>
48 <p class="p5"><span class="Apple-converted-space"> </span>);</p>
49 <p class="p5">}.scope;</p>
50 <p class="p5">)</p>
51 <p class="p4"><br></p>
52 <p class="p5">x.set(<span class="s4">\spread</span>, 1, <span class="Apple-converted-space">  </span><span class="s4">\center</span>, 0);<span class="Apple-converted-space">  </span><span class="s5">// full n chans</span></p>
53 <p class="p5">x.set(<span class="s4">\spread</span>, 0.5, <span class="s4">\center</span>, -0.25); <span class="s5">// less wide</span></p>
54 <p class="p7"><span class="s3">x.set(</span><span class="s4">\spread</span><span class="s3">, 0, </span><span class="s4">\center</span><span class="s3">, 0);<span class="Apple-converted-space">  </span></span>// mono center (depends on orientation, see PanAz)</p>
55 <p class="p5">x.set(<span class="s4">\spread</span>, 0, <span class="s4">\center</span>, -0.25); <span class="s5">//<span class="Apple-converted-space"> </span></span></p>
56 <p class="p7"><span class="s3">x.set(</span><span class="s4">\spread</span><span class="s3">, 0.0, </span><span class="s4">\center</span><span class="s3">, 0.5); </span>// mono, but rotate 1 toward the higher channels</p>
57 <p class="p7"><span class="s3">x.set(</span><span class="s4">\spread</span><span class="s3">, 0.5, </span><span class="s4">\center</span><span class="s3">, 0.5); </span>// spread over the higher channels</p>
58 <p class="p5">x.set(<span class="s4">\spread</span>, 0, <span class="Apple-converted-space">  </span><span class="s4">\center</span>, -0.25); <span class="s5">// all on first channel</span></p>
59 <p class="p5">x.set(<span class="s4">\spread</span>, 1, <span class="Apple-converted-space">  </span><span class="s4">\center</span>, 0);<span class="Apple-converted-space">  </span><span class="s5">// full n chans</span></p>
60 <p class="p4"><br></p>
61 <p class="p5">x.free;</p>
62 <p class="p4"><br></p>
63 <p class="p7"><span class="s3"><span class="Apple-converted-space"> </span></span>// the same example written with arFill:</p>
64 <p class="p5">(</p>
65 <p class="p5">x = { <span class="s2">arg</span> spread=1, level=0.5, width=2, center=0.0;</p>
66 <p class="p5"><span class="Apple-converted-space"> </span><span class="s2">SplayAz</span>.arFill(</p>
67 <p class="p5"><span class="Apple-converted-space">  </span>4,</p>
68 <p class="p5"><span class="Apple-converted-space">  </span>10,<span class="Apple-converted-space"> </span></p>
69 <p class="p5"><span class="Apple-converted-space">  </span>{ <span class="s2">|i|</span> <span class="s2">SinOsc</span>.ar( <span class="s2">LFNoise2</span>.kr( rrand(10, 20), 200, i + 3 * 100) ) },<span class="Apple-converted-space"> </span></p>
70 <p class="p5"><span class="Apple-converted-space">  </span>spread,<span class="Apple-converted-space"> </span></p>
71 <p class="p5"><span class="Apple-converted-space">  </span>level,<span class="Apple-converted-space"> </span></p>
72 <p class="p5"><span class="Apple-converted-space">  </span>width,</p>
73 <p class="p5"><span class="Apple-converted-space">  </span>center</p>
74 <p class="p5"><span class="Apple-converted-space"> </span>);</p>
75 <p class="p5">}.scope;</p>
76 <p class="p5">)</p>
77 <p class="p4"><br></p>
78 <p class="p5"><span class="Apple-converted-space"> </span>// or with mouse control</p>
79 <p class="p5">(</p>
80 <p class="p5">x = { var src;<span class="Apple-converted-space"> </span></p>
81 <p class="p5"><span class="Apple-converted-space"> </span>src = <span class="s2">SinOsc</span>.ar( { |i| <span class="s2">LFNoise2</span>.kr( rrand(10, 20), 200, i * 100 + 400) } ! 10);</p>
82 <p class="p5"><span class="Apple-converted-space"> </span><span class="s2">SplayAz</span>.ar(4, src, MouseY.kr(1, 0), 0.2, center: MouseX.kr(-1, 1));</p>
83 <p class="p5">}.scope;</p>
84 <p class="p5">)</p>
85 <p class="p4"><br></p>
86 <p class="p5">// test for correct behavior:<span class="Apple-converted-space"> </span></p>
87 <p class="p8"><span class="s3"><span class="Apple-tab-span"> </span></span>// only on chan 0</p>
88 <p class="p5">{ <span class="s2">SplayAz</span>.ar(4, <span class="s6">SinOsc.ar * 0.2</span>, orientation: 0) }.scope;</p>
89 <p class="p4"><br></p>
90 <p class="p8"><span class="s3"><span class="Apple-tab-span"> </span></span>//<span class="Apple-converted-space">  </span>on chan 0, 3, i.e. equally around the ring</p>
91 <p class="p5">{ <span class="s2">SplayAz</span>.ar(6, <span class="s6">SinOsc</span>.ar([2, 3] * 200) <span class="s6">* 0.2</span>, orientation: 0) }.scope;</p>
92 <p class="p4"><br></p>
93 <p class="p8"><span class="s3"><span class="Apple-tab-span"> </span></span>// equal spread on 0, 2, 4</p>
94 <p class="p5">{ <span class="s2">SplayAz</span>.ar(6, <span class="s6">SinOsc</span>.ar([2, 3, 5] * 200) * 0.2, orientation: 0) }.scope;</p>
95 <p class="p4"><br></p>
96 <p class="p4"><br></p>
97 <p class="p8"><span class="s3"><span class="Apple-tab-span"> </span></span>// wrong behavior of SplayZ: <span class="Apple-converted-space"> </span></p>
98 <p class="p8"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>// plays on chan 2, but should play on 0</p>
99 <p class="p5">{ <span class="s2">SplayZ</span>.ar(4, <span class="s6">SinOsc.ar * 0.2</span>, orientation: 0) }.scope;</p>
100 <p class="p4"><br></p>
101 <p class="p8"><span class="s3"><span class="Apple-tab-span"> </span></span>//<span class="Apple-converted-space">  </span>wrong: mixes both to chan 2,<span class="Apple-converted-space"> </span></p>
102 <p class="p8"><span class="Apple-tab-span"> </span>// because pan values [-1, 1] are the same pos on the ring</p>
103 <p class="p5">{ <span class="s2">SplayZ</span>.ar(6, <span class="s6">SinOsc</span>.ar([2, 3] * 200) <span class="s6">* 0.2</span>, orientation: 0) }.scope;</p>
104 <p class="p4"><br></p>
105 <p class="p8"><span class="s3"><span class="Apple-tab-span"> </span></span>// wrong equal spread to pan values [-1, 0, 1], which outputs to chans 2, 0, 2</p>
106 <p class="p5">{ <span class="s2">SplayZ</span>.ar(6, <span class="s6">SinOsc</span>.ar([2, 3, 5] * 200) * 0.2, orientation: 0) }.scope;</p>
107 <p class="p4"><br></p>
108 <p class="p4"><br></p>
109 </body>
110 </html>