1 <!DOCTYPE html PUBLIC
"-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
5 <meta http-equiv=
"Content-Type" content=
"text/html; charset=UTF-8">
7 <meta http-equiv=
"Content-Style-Type" content=
"text/css">
8 <title>SuperCollider Help - Splay
</title>
11 <meta name=
"Generator" content=
"Cocoa HTML Writer">
13 <meta name=
"CocoaVersion" content=
"824.42">
15 <style type=
"text/css">
16 p
.p1
{margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Helvetica
}
17 p
.p2
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
; min-height: 12.0px}
18 p
.p3
{margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica
}
19 p
.p4
{margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica
; min-height: 14.0px}
20 p
.p5
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
}
21 p
.p6
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
; color: #a71e12}
22 span
.s1
{color: #0019b7}
23 span
.s2
{color: #326f17}
24 span
.s3
{color: #a71e12}
25 span
.s4
{color: #000000}
26 span
.Apple-tab-span
{white-space:pre
}
33 <p class=
"p1"><b>Splay
</b></p>
39 <p class=
"p3"><b>*ar(inArray, spread,level, center,
42 <p class=
"p3"><b>*arFill(n, function, spread,level,
43 center, levelComp)
</b></p>
53 <p class=
"p3">Splay spreads an array of channels across
56 <p class=
"p3">Optional spread and center controls, and
57 levelComp(ensation) (equal power).
</p>
65 <p class=
"p5">x = {
<span class=
"s1">arg
</span>
66 spread=
1, level=
0.2, center=
0.0;
<span class=
"Apple-converted-space"> </span></p>
68 <p class=
"p5"><span class=
"Apple-tab-span"> </span><span class=
"s1">Splay
</span>.ar(
</p>
70 <p class=
"p5"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"s1">SinOsc
</span>.ar(
71 { |i|
<span class=
"s1">LFNoise2
</span>.kr(
72 rrand(
10,
20),
200,
400) } !
10),
<span class=
"Apple-converted-space"> </span></p>
74 <p class=
"p5"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>spread,
<span class=
"Apple-converted-space"> </span></p>
76 <p class=
"p5"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>level,
<span class=
"Apple-converted-space"> </span></p>
78 <p class=
"p5"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>center
</p>
80 <p class=
"p5"><span class=
"Apple-tab-span"> </span>);
</p>
82 <p class=
"p5">}.play;
</p>
90 <p class=
"p5">x.set(
<span class=
"s2">\spread
</span>,
91 1,
<span class=
"Apple-converted-space"> </span><span class=
"s2">\center
</span>,
0);
<span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"s3">//
92 full stereo
</span></p>
94 <p class=
"p5">x.set(
<span class=
"s2">\spread
</span>,
95 0.5,
<span class=
"s2">\center
</span>,
0);
<span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"s3">//
98 <p class=
"p5">x.set(
<span class=
"s2">\spread
</span>,
99 0,
<span class=
"Apple-converted-space"> <span class=
"Apple-tab-span"> </span> </span><span class=
"s2">\center
</span>,
0);
<span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"s3">//
100 mono center
</span></p>
102 <p class=
"p6"><span class=
"s4">x.set(
</span><span class=
"s2">\spread
</span><span class=
"s4">,
103 0.5,
</span><span class=
"s2">\center
</span><span class=
"s4">,
0.5);
<span class=
"Apple-tab-span"><br>
104 </span></span>// spread from center to right
</p>
106 <p class=
"p5">x.set(
<span class=
"s2">\spread
</span>,
107 0,
<span class=
"Apple-converted-space"> </span><span class=
"s2">\center
</span>, -
1);
<span class=
"Apple-tab-span"> </span><span class=
"s3">//
110 <p class=
"p5">x.set(
<span class=
"s2">\spread
</span>,
111 1,
<span class=
"Apple-converted-space"> </span><span class=
"s2">\center
</span>,
0);
<span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"s3">//
112 full stereo
</span></p>
126 <p class=
"p6"><span class=
"s4"><span class=
"Apple-tab-span"> </span></span>// the
127 same example written with arFill:
</p>
131 <p class=
"p5">x = {
<span class=
"s1">arg
</span>
132 spread=
1, level=
0.2, center=
0.0;
<span class=
"Apple-converted-space"> </span></p>
134 <p class=
"p5"><span class=
"Apple-tab-span"> </span><span class=
"s1">Splay
</span>.arFill(
10,
<span class=
"Apple-converted-space"> </span></p>
136 <p class=
"p5"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>{ |i|
<span class=
"s1">SinOsc
</span>.ar(
<span class=
"s1">LFNoise2
</span>.kr(
137 rrand(
10,
20),
200, i +
3 *
100))
<span class=
"Apple-converted-space">
138 </span>},
<span class=
"Apple-converted-space"> </span></p>
140 <p class=
"p5"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>spread,
<span class=
"Apple-converted-space"> </span></p>
142 <p class=
"p5"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>level,
<span class=
"Apple-converted-space"> </span></p>
144 <p class=
"p5"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>center
</p>
146 <p class=
"p5"><span class=
"Apple-tab-span"> </span>);
</p>
148 <p class=
"p5">}.play;
</p>
156 <p class=
"p5"><span class=
"Apple-tab-span"> </span>//
157 with mouse control
</p>
161 <p class=
"p5">x = { var src;
<span class=
"Apple-converted-space"> </span></p>
163 <p class=
"p5"><span class=
"Apple-tab-span"> </span>src
164 =
<span class=
"s1">SinOsc
</span>.ar( { |i|
<span class=
"s1">LFNoise2
</span>.kr( rrand(
10,
20),
200, i +
165 3 *
100) } !
10);
</p>
167 <p class=
"p5"><span class=
"Apple-tab-span"> </span><span class=
"s1">Splay
</span>.ar(src, MouseY.kr(
1,
0),
0.2,
168 MouseX.kr(-
1,
1));
</p>
170 <p class=
"p5">}.play;
</p>