polymorphism: better names for .binaryValue and .booleanValue are .asInteger and...
[supercollider.git] / Help / Libraries / JITLib / GUI / ProxyMixer.html
blob7a81b825d2deb2f1fa89722ea8cdb4628971db30
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="1038.29">
9 <style type="text/css">
10 p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; min-height: 12.0px}
11 p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 16.0px Helvetica}
12 p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Helvetica; min-height: 22.0px}
13 p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
14 p.p5 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px}
15 p.p6 {margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Helvetica}
16 p.p7 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; color: #0000ee}
17 p.p8 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Helvetica}
18 p.p9 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Helvetica; min-height: 17.0px}
19 p.p10 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #000000}
20 p.p11 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #000000; min-height: 12.0px}
21 p.p12 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #cd0b0b}
22 p.p13 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #2024c7}
23 span.s1 {font: 18.0px Helvetica}
24 span.s2 {text-decoration: underline ; color: #2832ee}
25 span.s3 {color: #2b30fa}
26 span.s4 {color: #000000}
27 span.s5 {text-decoration: underline ; color: #2b30fa}
28 span.s6 {text-decoration: underline}
29 span.s7 {font: 9.0px Monaco}
30 span.s8 {color: #2024c7}
31 span.s9 {color: #737373}
32 span.s10 {color: #008417}
33 span.s11 {color: #cd0b0b}
34 span.Apple-tab-span {white-space:pre}
35 </style>
36 </head>
37 <body>
38 <p class="p1"><br></p>
39 <p class="p2"><b>ProxyMixer has been updated - some little adaptations to existing<span class="Apple-converted-space"> </span></b></p>
40 <p class="p2"><b>uses may be needed.</b> If you like, you can also replace "ProxyMixer"<span class="Apple-converted-space"> </span></p>
41 <p class="p2">with "ProxyMixerOld" to keep using the old style of ProxyMixer.</p>
42 <p class="p3"><br></p>
43 <p class="p3"><br></p>
44 <p class="p4"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>Old:<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>New:</b></p>
45 <p class="p5"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b></p>
46 <p class="p4"><b>ProxyMixerOld<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>ProxyMixer</b></p>
47 <p class="p4"><b><span class="Apple-tab-span"> </span>*new(<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>*new(</b></p>
48 <p class="p4"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>space,<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>-&gt;<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>object,</b></p>
49 <p class="p4"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>nProxies,<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>-&gt;<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>numItems,</b></p>
50 <p class="p4"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>title, <span class="Apple-tab-span"> </span>//</b>is inferred from <span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>parent</b>, <span class="Apple-tab-span"> </span>// a view to display proxymixer on,</p>
51 <p class="p4"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>// ProxySpace.asCode<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>// if nil, a new window is made.</p>
52 <p class="p4"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>where </b>// can be set in bounds<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>bounds</b>,<span class="Apple-tab-span"> </span>// can be nil for default size,<span class="Apple-converted-space"> </span></p>
53 <p class="p4"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>// or a point for a specific location onscreen,</p>
54 <p class="p4"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>// or a Rect</p>
55 <p class="p4"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>[makeSkip,<span class="Apple-converted-space"> </span></b></p>
56 <p class="p4"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>options]</b></p>
57 <p class="p4"><b><span class="Apple-tab-span"> </span>)<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>)</b></p>
58 <p class="p3"><br></p>
59 <p class="p6"><b>//////</b></p>
60 <p class="p4"><span class="s1"><b>ProxyMixer<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b></span><b>mix control for a proxyspace</b></p>
61 <p class="p1"><br></p>
62 <p class="p1"><br></p>
63 <p class="p1"><br></p>
64 <p class="p4"><b>Inherits from:</b> <a href="../../../Core/Object.html"><span class="s2">JITGui</span></a></p>
65 <p class="p5"><br></p>
66 <p class="p4">ProxyMixer provides controls for handling and editing the node proxies in a proxyspace and their monitors (cross-platform graphics). It replaces the earlier ProxyMixer class. For Ndefs, use <a href="NdefMix.html"><span class="s3">NdefMix</span></a>.</p>
67 <p class="p5"><br></p>
68 <p class="p7"><span class="s4">See also: <a href="SC://ProxySpace"><span class="s5">ProxySpace</span></a>, <a href="NPGui.html"><span class="s6">NdefGui</span></a><a href="NodeProxyEditor.html"><span class="s6">, </span></a><a href="JITGui.html"><span class="s6">JITGui</span></a><a href="NodeProxyEditor.html"><span class="s6">, </span></a><a href="MonitorGui.html"><span class="s6">MonitorGui</span></a><a href="NodeProxyEditor.html"><span class="s6">, </span></a><a href="NPParamGui.html"><span class="s6">NdefParamGui</span></a></span></p>
69 <p class="p4">Overview: <a href="SC://JITLib"><span class="s3">JITLib</span></a></p>
70 <p class="p1"><br></p>
71 <p class="p1"><br></p>
72 <p class="p8"><b>Creation / Class Methods</b></p>
73 <p class="p1"><br></p>
74 <p class="p1"><br></p>
75 <p class="p4"><b>*new(object, numItems, parent, bounds, makeSkip, options)</b></p>
76 <p class="p4"><b><span class="Apple-tab-span"> </span>object<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b>the proxyspace to show and control</p>
77 <p class="p4"><span class="Apple-tab-span"> </span><b>numItems<span class="Apple-tab-span"> </span></b>how many ar and kr proxies can be shown</p>
78 <p class="p5"><span class="Apple-tab-span"> </span></p>
79 <p class="p4"><b><span class="Apple-tab-span"> </span>parent:<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b>by default nil, so a window is made automatically.<span class="Apple-converted-space"> </span></p>
80 <p class="p4"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>if a parent is supplied, the ProxyMixer will be shown there.</p>
81 <p class="p4"><b><span class="Apple-tab-span"> </span>bounds</b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>window bounds - default is nil, so it determines it size.</p>
82 <p class="p4"><span class="s7"><span class="Apple-tab-span"> </span></span><b>makeSkip</b><span class="Apple-tab-span"> </span>a flag whether to make make a skijack</p>
83 <p class="p4"><span class="s7"><span class="Apple-tab-span"> </span></span><b>options</b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>additional settings - currently none provided.</p>
84 <p class="p9"><br></p>
85 <p class="p9"><br></p>
86 <p class="p8"><b>Example</b><span class="s7"><span class="Apple-tab-span"> </span></span></p>
87 <p class="p9"><br></p>
88 <p class="p10">(</p>
89 <p class="p10">p = <span class="s8">ProxySpace</span>.push(s.boot, p);<span class="Apple-converted-space"> </span></p>
90 <p class="p10"><span class="s9">"abcde"</span>.do { <span class="s8">|k|</span> p[k.asSymbol].ar };</p>
91 <p class="p10">m = <span class="s8">ProxyMixer</span>(p, 8, options: [<span class="s10">\playN</span>]);</p>
92 <p class="p10">p.do(<span class="s8">_</span>.play(0));</p>
93 <p class="p10">)</p>
94 <p class="p11"><br></p>
95 <p class="p10">m.object_(<span class="s8">nil</span>);</p>
96 <p class="p10">m.object_(p);</p>
97 <p class="p11"><br></p>
98 <p class="p10"><span class="s9">"abcdefghijk"</span>.do { <span class="s8">|k|</span> p[k.asSymbol].ar };</p>
99 <p class="p11"><br></p>
100 <p class="p10"><span class="s9">"lmnopqrtuvw"</span>.do { <span class="s8">|k|</span> p[k.asSymbol].kr };</p>
101 <p class="p11"><br></p>
102 <p class="p10"><span class="s9">"abcdefghijk"</span>.do { <span class="s8">|k|</span> p[k.asSymbol].playN };</p>
103 <p class="p11"><br></p>
104 <p class="p11"><br></p>
105 <p class="p11"><br></p>
106 <p class="p12"><span class="s4"><span class="Apple-tab-span"> </span></span>// the top left menu sets which proxies will be shown.</p>
107 <p class="p11"><br></p>
108 <p class="p12"><span class="s4"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span>// existingProxies: even an empty proxy is shown</p>
109 <p class="p10">~test.ar;<span class="Apple-converted-space"> <span class="Apple-tab-span"> </span></span></p>
110 <p class="p11"><br></p>
111 <p class="p12"><span class="s4">(<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span>// activeProxies: proxy appears when it is alive</p>
112 <p class="p13"><span class="s4">~test = { </span>|freq=250, intv=19, timescale=1, curve=0, loopnode=0|<span class="s4"><span class="Apple-converted-space"> </span></span></p>
113 <p class="p10"><span class="Apple-tab-span"> </span><span class="s8">var</span> env = <span class="s8">EnvGen</span>.kr(</p>
114 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s8">Env</span>({ 1.0.rand2 }!11, {1.0.rand}!10, curve, releaseNode: 9, loopNode: loopnode),<span class="Apple-converted-space"> </span></p>
115 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>timeScale: timescale);</p>
116 <p class="p10"><span class="Apple-tab-span"> </span><span class="s8">var</span> pitch = (env * [1, 0.33, -1] * intv).midiratio * freq;</p>
117 <p class="p10"><span class="Apple-tab-span"> </span><span class="s8">Splay</span>.ar(<span class="s8">Formant</span>.ar(pitch, pitch.scramble * 2, pitch.scramble)) * 0.1;</p>
118 <p class="p10">};</p>
119 <p class="p10">)</p>
120 <p class="p10">~test.lag(<span class="s10">\freq</span>, 4);</p>
121 <p class="p11"><br></p>
122 <p class="p12"><span class="s4"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span>// playingProxies : only those that really play are shown.</p>
123 <p class="p10">~test.playN(vol: 1);</p>
124 <p class="p11"><br></p>
125 <p class="p12">// switch back to active proxies...</p>
126 <p class="p11"><span class="Apple-tab-span"> </span></p>
127 <p class="p12"><span class="s4"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span>// the reduce button removes all proxies that are not playing</p>
128 <p class="p12"><span class="s4"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span>// and that are not used as sources in other proxies:</p>
129 <p class="p10">~otto = { <span class="s8">|dens=12|</span> <span class="s8">Dust</span>.ar(dens) };</p>
130 <p class="p11"><br></p>
131 <p class="p10">~otto.clear;<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s11">// remove it</span></p>
132 <p class="p10">p.reduce;</p>
133 <p class="p11"><br></p>
134 <p class="p12"><span class="s4"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span>// doc and docSel post the current proxyspace as code</p>
135 <p class="p10">p.document;</p>
136 <p class="p11"><br></p>
137 <p class="p12"><span class="s4"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span>// ProxyMixer has three preset widths:<span class="Apple-converted-space"> </span></p>
138 <p class="p10">m.switchSize(0);<span class="Apple-tab-span"> </span><span class="s11">// ar zone only</span></p>
139 <p class="p10">m.switchSize(1);<span class="Apple-tab-span"> </span><span class="s11">// ar + kr</span></p>
140 <p class="p12"><span class="s4">m.switchSize(2);<span class="Apple-tab-span"> </span></span>// ar = kr + edit zone</p>
141 <p class="p11"><br></p>
142 <p class="p12"><span class="s4"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span>// R opens a Record utility, see below.<span class="Apple-converted-space"> </span></p>
143 <p class="p11"><br></p>
144 <p class="p12"><span class="s4"><span class="Apple-tab-span"> </span></span>// the line of controls for one proxy and its monitor is<span class="Apple-converted-space"> </span></p>
145 <p class="p12"><span class="s4"><span class="Apple-tab-span"> </span></span>// a ProxyMonitorGui, so for full details see ProxyMonitorGui.help.</p>
146 <p class="p11"><span class="Apple-tab-span"> </span></p>
147 <p class="p12"><span class="s4"><span class="Apple-tab-span"> </span></span>// it displays current volume,<span class="Apple-converted-space"> </span></p>
148 <p class="p10">~test.vol_(0.05);<span class="Apple-tab-span"> </span></p>
149 <p class="p10">~test.vol_(0.1);<span class="Apple-tab-span"> </span></p>
150 <p class="p11"><br></p>
151 <p class="p12"><span class="s4"><span class="Apple-tab-span"> </span></span>// proxy name; play/stop/end control:</p>
152 <p class="p10">~test.playN;<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s11">// playN as is</span></p>
153 <p class="p10">~test.stop;<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s11">// stop<span class="Apple-converted-space"> </span></span></p>
154 <p class="p12"><span class="s4">~test.end;<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span>// option-click on stop : end the monitor and the proxy itself.</p>
155 <p class="p12"><span class="s4">~test.playN(vol: 0);<span class="Apple-tab-span"> </span></span>// option-click on play : start playing with volume zero.</p>
156 <p class="p11"><br></p>
157 <p class="p10">~test.vol_(0.1);</p>
158 <p class="p11"><br></p>
159 <p class="p10">s.scope(8);</p>
160 <p class="p12"><span class="s4">~test.playN(4);<span class="Apple-tab-span"> </span></span>// set proxy's first output channel:</p>
161 <p class="p10">~test.playN(0);<span class="Apple-tab-span"> </span></p>
162 <p class="p11"><br></p>
163 <p class="p12"><span class="s4"><span class="Apple-tab-span"> </span></span>// the "-=" / "-&lt;" button supports multichannel monitoring,<span class="Apple-converted-space"> </span></p>
164 <p class="p12"><span class="s4"><span class="Apple-tab-span"> </span></span>// see ProxyMonitorGui.help</p>
165 <p class="p11"><br></p>
166 <p class="p12"><span class="s4"><span class="Apple-tab-span"> </span></span>//<span class="Apple-tab-span"> </span>paus/rsum toggles pause and resume:</p>
167 <p class="p10">~test.pause;</p>
168 <p class="p10">~test.resume;<span class="Apple-tab-span"> </span></p>
169 <p class="p11"><br></p>
170 <p class="p12"><span class="s4"><span class="Apple-tab-span"> </span></span>// send button resends the proxy,<span class="Apple-converted-space"> </span></p>
171 <p class="p12"><span class="s4"><span class="Apple-tab-span"> </span></span>// option-click on send rebuilds the proxy</p>
172 <p class="p12"><span class="s4"><span class="Apple-tab-span"> </span></span>// (e.g. for lookup in client-site state)</p>
173 <p class="p10">~test.send;<span class="Apple-tab-span"> </span></p>
174 <p class="p10">~test.send;<span class="Apple-tab-span"> </span></p>
175 <p class="p10">~test.send;<span class="Apple-tab-span"> </span></p>
176 <p class="p10">~test.rebuild;<span class="Apple-tab-span"> </span></p>
177 <p class="p10">~test.rebuild;<span class="Apple-tab-span"> </span></p>
178 <p class="p10">~test.rebuild;<span class="Apple-tab-span"> </span></p>
179 <p class="p11"><br></p>
180 <p class="p11"><br></p>
181 <p class="p12"><span class="s4"><span class="Apple-tab-span"> </span></span>// the ed button sends this proxy to the editor - see below</p>
182 <p class="p11"><br></p>
183 <p class="p12"><span class="s4"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span>// kr proxies show up in the middle</p>
184 <p class="p10">~lfo = { <span class="s8">SinOsc</span>.kr(2) };</p>
185 <p class="p10">~lfnoyz0 = { <span class="s8">|lofreq = 0.5, mul=1, add|</span> <span class="s8">LFDNoise0</span>.kr(lofreq, mul, add) };</p>
186 <p class="p11"><br></p>
187 <p class="p12"><span class="s4"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span>// the editor zone is a <a href="NodeProxyEditor.html"><span class="s6">NodeProxyEditor</span></a></p>
188 <p class="p12"><span class="s4"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span>// open it and set some params</p>
189 <p class="p10">m.switchSize(2);</p>
190 <p class="p10">m.editGui.object_(~test);</p>
191 <p class="p10">~test.set(<span class="s10">\freq</span>, exprand(80, 1250));<span class="Apple-tab-span"> </span><span class="s11">// set ~tests parameters</span></p>
192 <p class="p10">~test.set(<span class="s10">\intv</span>, 1.0.linrand);</p>
193 <p class="p11"><br></p>
194 <p class="p12"><span class="s4"><span class="Apple-tab-span"> </span></span>//<span class="Apple-tab-span"> </span>if you declare global specs for the range of a parameter,<span class="Apple-converted-space"> </span></p>
195 <p class="p12"><span class="s4"><span class="Apple-tab-span"> </span></span>//<span class="Apple-tab-span"> </span>they can be used in the editor:</p>
196 <p class="p10"><span class="s8">Spec</span>.add(<span class="s10">\intv</span>, [0, 36, <span class="s10">\lin</span>]);</p>
197 <p class="p10"><span class="s8">Spec</span>.add(<span class="s10">\timescale</span>, [0.001, 10, <span class="s10">\exp</span>]);</p>
198 <p class="p10"><span class="s8">Spec</span>.add(<span class="s10">\loopnode</span>, [0, 7, <span class="s10">\lin</span>, 1]);</p>
199 <p class="p10"><span class="s8">Spec</span>.add(<span class="s10">\curve</span>, [-10, 10]);</p>
200 <p class="p11"><br></p>
201 <p class="p10">m.editGui.object_(~test);</p>
202 <p class="p11"><br></p>
203 <p class="p12"><span class="s4"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span>// you can map a kr proxy to a control param;</p>
204 <p class="p10">~test.map(<span class="s10">\intv</span>, ~lfnoyz0);</p>
205 <p class="p10">~test.unmap(<span class="s10">\intv</span>);</p>
206 <p class="p12"><span class="s4"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span>// this also works by dragging the kr proxy name<span class="Apple-converted-space"> </span></p>
207 <p class="p12"><span class="s4"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span>// the field left of the param name.</p>
208 <p class="p11"><br></p>
209 <p class="p11"><br></p>
210 <p class="p12"><span class="s4"><span class="Apple-tab-span"> </span></span>//<span class="Apple-tab-span"> </span>some more tests :</p>
211 <p class="p12"><span class="s4"><span class="Apple-tab-span"> </span></span>// if there are too many ar proxies, a scroller appears</p>
212 <p class="p12"><span class="s4">(<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span>// test too many<span class="Apple-converted-space"> </span></p>
213 <p class="p10">10.do { <span class="s8">|i|</span> p[(<span class="s9">"test"</span> ++ i).asSymbol] = {<span class="Apple-converted-space"> </span></p>
214 <p class="p10"><span class="Apple-tab-span"> </span><span class="s8">Pan2</span>.ar(<span class="s8">Ringz</span>.ar(<span class="s8">Impulse</span>.ar(exprand(0.5, 4)), exprand(300, 3000), 0.02), 1.0.rand2, 0.2) };<span class="Apple-converted-space"> </span></p>
215 <p class="p10">};</p>
216 <p class="p10">)</p>
217 <p class="p11"><br></p>
218 <p class="p10">10.do { <span class="s8">|i|</span> p[(<span class="s9">"test"</span> ++ i).asSymbol].playN(vol: linrand(1.0), fadeTime: exprand(0.01, 5)) };</p>
219 <p class="p11"><br></p>
220 <p class="p12"><span class="s4"><span class="Apple-tab-span"> </span></span>// and the same for kr proxies</p>
221 <p class="p10">10.do { <span class="s8">|i|</span> p[(<span class="s9">"kr"</span> ++ i).asSymbol] = { <span class="s8">LFNoise0</span>.kr(exprand(5, 50)) }; };</p>
222 <p class="p11"><br></p>
223 <p class="p10">p.krProxyNames.do { <span class="s8">|key|</span> p.removeAt(key) };</p>
224 <p class="p11"><br></p>
225 <p class="p10">p.reduce(method: <span class="s10">\clear</span>);</p>
226 <p class="p11"><br></p>
227 <p class="p10">p.clean;</p>
228 <p class="p11"><br></p>
229 </body>
230 </html>