cmake build system: visiblity support for clang
[supercollider.git] / Help / Collections / Array.html
blob5e6e1e06280aa6db3308209cf598a4aaf89b0d2d
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; color: #0021e7}
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: 9.0px Monaco}
15 p.p6 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #ad140d}
16 p.p7 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Helvetica}
17 p.p8 {margin: 0.0px 0.0px 0.0px 42.0px; font: 12.0px Helvetica}
18 p.p9 {margin: 0.0px 0.0px 0.0px 42.0px; font: 12.0px Helvetica; min-height: 14.0px}
19 p.p10 {margin: 0.0px 0.0px 0.0px 42.0px; font: 9.0px Monaco}
20 p.p11 {margin: 0.0px 0.0px 0.0px 42.0px; font: 12.0px Monaco; min-height: 16.0px}
21 p.p12 {margin: 0.0px 0.0px 0.0px 42.0px; font: 9.0px Monaco; min-height: 12.0px}
22 p.p13 {margin: 0.0px 0.0px 0.0px 42.0px; font: 9.0px Monaco; color: #ad140d}
23 p.p14 {margin: 0.0px 0.0px 0.0px 42.0px; font: 9.0px Monaco; color: #2c7014}
24 p.p15 {margin: 0.0px 0.0px 0.0px 42.0px; font: 12.0px Helvetica; color: #0021e7}
25 p.p16 {margin: 0.0px 0.0px 0.0px 42.0px; font: 9.0px Monaco; color: #ad140d; min-height: 12.0px}
26 p.p17 {margin: 0.0px 0.0px 0.0px 42.0px; font: 9.0px Monaco; color: #001bb9}
27 p.p18 {margin: 0.0px 0.0px 0.0px 42.0px; font: 9.0px Monaco; color: #606060}
28 span.s1 {color: #000000}
29 span.s2 {color: #001bb9}
30 span.s3 {color: #ad140d}
31 span.s4 {color: #2c7014}
32 span.s5 {color: #606060}
33 span.s6 {text-decoration: underline}
34 span.Apple-tab-span {white-space:pre}
35 </style>
36 </head>
37 <body>
38 <p class="p1"><b>Array</b></p>
39 <p class="p2"><br></p>
40 <p class="p3"><span class="s1"><b>Inherits from: </b><a href="../Core/Object.html"><b>Object</b></a><b> : </b><a href="Collection.html"><b>Collection</b></a></span><span class="s2"><b> :</b></span><span class="s1"><b> </b><a href="SequenceableCollection.html"><b>SequenceableCollection</b></a></span><span class="s2"><b> </b></span><span class="s1"><b>: </b><a href="ArrayedCollection.html"><b>ArrayedCollection</b></a></span></p>
41 <p class="p2"><br></p>
42 <p class="p4">Arrays are ArrayedCollections whose slots may contain any object. Arrays have a fixed maximum size beyond which they cannot grow. For expandable arrays, use the <a href="List.html"><span class="s2">List</span></a> class.</p>
43 <p class="p2"><br></p>
44 <p class="p4">An array can be created with a fixed maximum capacity:</p>
45 <p class="p2"><span class="Apple-tab-span"> </span></p>
46 <p class="p5"><span class="Apple-tab-span"> </span>z = <span class="s2">Array</span>.new(size);</p>
47 <p class="p2"><br></p>
48 <p class="p4">Which will return an array of size 0, but the capability to add up to 32</p>
49 <p class="p4">objects.<span class="Apple-converted-space"> </span></p>
50 <p class="p2"><br></p>
51 <p class="p5"><span class="Apple-tab-span"> </span>z = z.add(obj);</p>
52 <p class="p2"><br></p>
53 <p class="p4">z now has a size of 1.</p>
54 <p class="p2"><br></p>
55 <p class="p4">For Arrays, the 'add' method may or may not return the same Array object. It will add the argument to the receiver if there is space, otherwise it returns a new Array object with the argument added. Thus the proper usage of 'add' with an Array is to always assign the result as follows:</p>
56 <p class="p2"><br></p>
57 <p class="p5"><span class="Apple-tab-span"> </span>z = z.add(obj);</p>
58 <p class="p2"><br></p>
59 <p class="p4">This allows an efficient use of resources, only growing the array when it needs to.<span class="Apple-converted-space">  </span>The <a href="List.html"><span class="s2">List</span></a><span class="s3"> </span>class manages the Array for you, and in many cases in more suitable.</p>
60 <p class="p2"><br></p>
61 <p class="p4">An array can be created with all slots filled with nils:</p>
62 <p class="p2"><br></p>
63 <p class="p5"><span class="Apple-tab-span"> </span>z = <span class="s2">Array</span>.newClear(size);</p>
64 <p class="p2"><br></p>
65 <p class="p4">Elements can be put into an existing slot:</p>
66 <p class="p2"><br></p>
67 <p class="p5"><span class="Apple-tab-span"> </span>a.put(2,obj);</p>
68 <p class="p2"><br></p>
69 <p class="p4">And accessed :</p>
70 <p class="p2"><br></p>
71 <p class="p6"><span class="s1"><span class="Apple-tab-span"> </span>a.at(2); </span>// these are equivalent</p>
72 <p class="p5"><span class="Apple-tab-span"> </span>a[2];</p>
73 <p class="p2"><br></p>
74 <p class="p4">See <a href="ArrayedCollection.html"><span class="s2">ArrayedCollection</span></a> for the principal methods:</p>
75 <p class="p4"><span class="Apple-tab-span"> </span>at</p>
76 <p class="p4"><span class="Apple-tab-span"> </span>put</p>
77 <p class="p4"><span class="Apple-tab-span"> </span>clipAt, wrapAt etc.</p>
78 <p class="p2"><br></p>
79 <p class="p4">Literal Arrays can be created at compile time, and are very efficient. See <a href="../Language/Literals.html"><span class="s2">Literals</span></a> for information.</p>
80 <p class="p2"><br></p>
81 <p class="p7"><b>Class Methods</b></p>
82 <p class="p2"><br></p>
83 <p class="p4"><b>*with(... args)</b></p>
84 <p class="p8">Create a new Array whose slots are filled with the given arguments.<span class="Apple-converted-space"> </span></p>
85 <p class="p8">This is the same as the method in <a href="ArrayedCollection.html"><span class="s2">ArrayedCollection</span></a>, but is reimplemented here to be more efficient.</p>
86 <p class="p9"><br></p>
87 <p class="p10"><span class="s2">Array</span>.with(7, <span class="s4">'eight'</span>,<span class="Apple-converted-space">  </span>9).postln;</p>
88 <p class="p11"><br></p>
89 <p class="p7"><b>Instance Methods</b></p>
90 <p class="p2"><br></p>
91 <p class="p4"><b>reverse</b></p>
92 <p class="p8">Returns a new Array whose elements are reversed. The receiver is unchanged.</p>
93 <p class="p9"><br></p>
94 <p class="p10">[1, 2, 3].reverse.postln;</p>
95 <p class="p11"><br></p>
96 <p class="p10">(</p>
97 <p class="p10">x = [1, 2, 3];</p>
98 <p class="p10">z = x.reverse;</p>
99 <p class="p10">x.postln;</p>
100 <p class="p10">z.postln;</p>
101 <p class="p10">)</p>
102 <p class="p9"><br></p>
103 <p class="p4"><b>scramble</b></p>
104 <p class="p8">Returns a new Array whose elements have been scrambled. The receiver is unchanged.</p>
105 <p class="p9"><br></p>
106 <p class="p10">[1, 2, 3, 4, 5, 6].scramble.postln;</p>
107 <p class="p11"><br></p>
108 <p class="p4"><b>mirror</b></p>
109 <p class="p8">Return a new Array which is the receiver made into a palindrome.<span class="Apple-converted-space"> </span></p>
110 <p class="p8">The receiver is unchanged.</p>
111 <p class="p9"><br></p>
112 <p class="p10">[1, 2, 3, 4].mirror.postln;</p>
113 <p class="p9"><br></p>
114 <p class="p4"><b>mirror1</b></p>
115 <p class="p8">Return a new Array which is the receiver made into a palindrome with the last element removed.<span class="Apple-converted-space"> </span></p>
116 <p class="p8">This is useful if the list will be repeated cyclically, the first element will not get played twice.</p>
117 <p class="p8">The receiver is unchanged.</p>
118 <p class="p9"><br></p>
119 <p class="p10">[1, 2, 3, 4].mirror1.postln;</p>
120 <p class="p9"><br></p>
121 <p class="p4"><b>mirror2</b></p>
122 <p class="p8">Return a new Array which is the receiver concatenated with a reversal of itself.<span class="Apple-converted-space"> </span></p>
123 <p class="p8">The center element is duplicated. The receiver is unchanged.</p>
124 <p class="p9"><br></p>
125 <p class="p10">[1, 2, 3, 4].mirror2.postln;</p>
126 <p class="p9"><br></p>
127 <p class="p4"><b>stutter(n)</b></p>
128 <p class="p8">Return a new Array whose elements are repeated <b>n</b> times. The receiver is unchanged.</p>
129 <p class="p9"><br></p>
130 <p class="p10">[1, 2, 3].stutter(2).postln;</p>
131 <p class="p9"><br></p>
132 <p class="p4"><b>rotate(n)</b></p>
133 <p class="p8">Return a new Array whose elements are in rotated order. Negative n values rotate left, postive n values</p>
134 <p class="p8">rotate right. The receiver is unchanged.</p>
135 <p class="p9"><br></p>
136 <p class="p10">[1, 2, 3, 4, 5].rotate(1).postln;</p>
137 <p class="p12"><br></p>
138 <p class="p10">[1, 2, 3, 4, 5].rotate(-1).postln;</p>
139 <p class="p12"><br></p>
140 <p class="p10">[1, 2, 3, 4, 5].rotate(3).postln;</p>
141 <p class="p9"><br></p>
142 <p class="p4"><b>pyramid</b></p>
143 <p class="p8">Return a new Array whose elements have been reordered via one of 10 "counting" algorithms.</p>
144 <p class="p8">The algorithms are numbered 1 through 10. Run the examples to see the algorithms.</p>
145 <p class="p9"><br></p>
146 <p class="p10">[1, 2, 3, 4].pyramid(1).postln;</p>
147 <p class="p11"><br></p>
148 <p class="p10">(</p>
149 <p class="p10">10.do({ <span class="s2">arg</span> i;</p>
150 <p class="p10"><span class="Apple-tab-span"> </span>[1, 2, 3, 4].pyramid(i + 1).postcs;</p>
151 <p class="p10">});</p>
152 <p class="p10">)</p>
153 <p class="p12"><br></p>
154 <p class="p4"><b>pyramidg</b></p>
155 <p class="p8">Like pyramid, but keep the resulting values grouped in subarrays.</p>
156 <p class="p9"><br></p>
157 <p class="p13">// compare:</p>
158 <p class="p10">[1, 2, 3, 4].pyramid(1).postln;</p>
159 <p class="p10">[1, 2, 3, 4].pyramidg(1).postln;</p>
160 <p class="p11"><br></p>
161 <p class="p10">(</p>
162 <p class="p10">10.do({ <span class="s2">arg</span> i;</p>
163 <p class="p10"><span class="Apple-tab-span"> </span>[1, 2, 3, 4].pyramid(i + 1).postcs;</p>
164 <p class="p10"><span class="Apple-tab-span"> </span>[1, 2, 3, 4].pyramidg(i + 1).postcs;</p>
165 <p class="p10">});</p>
166 <p class="p10">)</p>
167 <p class="p9"><br></p>
168 <p class="p4"><b>sputter(probability, maxlen)</b></p>
169 <p class="p8">Return a new Array of length <b>maxlen</b> with the items partly repeated (random choice of given <b>probability</b>).</p>
170 <p class="p9"><br></p>
171 <p class="p13">// compare:</p>
172 <p class="p10">[1, 2, 3, 4, 5, 6, 7, 8, 9, 10].sputter(0.5, 16).postln;</p>
173 <p class="p10">[1, 2, 3, 4, 5, 6, 7, 8, 9, 10].sputter(0.8, 8).postln;</p>
174 <p class="p9"><br></p>
175 <p class="p9"><br></p>
176 <p class="p4"><b>lace(length)</b></p>
177 <p class="p8">Returns a new Array whose elements are interlaced sequences of the elements of the receiver's subcollections, up to size <b>length</b>. The receiver is unchanged.</p>
178 <p class="p9"><br></p>
179 <p class="p10">(</p>
180 <p class="p10">x = [ [1, 2, 3], 6, <span class="s2">List</span>[<span class="s5">"foo"</span>, <span class="s4">'bar'</span>]];</p>
181 <p class="p10">y = x.lace(12);</p>
182 <p class="p10">x.postln;</p>
183 <p class="p10">y.postln;</p>
184 <p class="p10">)</p>
185 <p class="p9"><br></p>
186 <p class="p4"><b>permute(nthPermutation)</b></p>
187 <p class="p8">Returns a new Array whose elements are the <b>nthPermutation</b> of the elements of the receiver. The receiver is unchanged.</p>
188 <p class="p9"><br></p>
189 <p class="p10">(</p>
190 <p class="p10">x = [ 1, 2, 3];</p>
191 <p class="p10">6.do({|i| x.permute(i).postln;});</p>
192 <p class="p10">)</p>
193 <p class="p12"><br></p>
194 <p class="p4"><b>allTuples(maxTuples)</b></p>
195 <p class="p8">Returns a new Array whose elements contain all possible combinations of the receiver's subcollections.</p>
196 <p class="p12"><br></p>
197 <p class="p10">[[1, 2, 3, 4, 5], [10, 20, 30]].allTuples;</p>
198 <p class="p10">[[1, 2, 3, 4, 5], [10, 20, 30], [5, 6]].allTuples;</p>
199 <p class="p12"><br></p>
200 <p class="p9"><br></p>
201 <p class="p4"><b>wrapExtend(length)</b></p>
202 <p class="p8">Returns a new Array whose elements are repeated sequences of the receiver, up to size <b>length</b>. The receiver is unchanged.</p>
203 <p class="p9"><br></p>
204 <p class="p10">(</p>
205 <p class="p10">x = [ 1, 2, 3, <span class="s5">"foo"</span>, <span class="s4">'bar'</span> ];</p>
206 <p class="p10">y = x.wrapExtend(9);</p>
207 <p class="p10">x.postln;</p>
208 <p class="p10">y.postln;</p>
209 <p class="p10">)</p>
210 <p class="p9"><br></p>
211 <p class="p4"><b>foldExtend(length)</b></p>
212 <p class="p8">Same as <b>wrapExtend</b> but the sequences fold back on the list elements.</p>
213 <p class="p12"><br></p>
214 <p class="p10">(</p>
215 <p class="p10">x = [ 1, 2, <span class="s5">"foo"</span>];</p>
216 <p class="p10">y = x.foldExtend(9);</p>
217 <p class="p10">x.postln;</p>
218 <p class="p10">y.postln;</p>
219 <p class="p10">)</p>
220 <p class="p9"><br></p>
221 <p class="p4"><b>clipExtend(length)</b></p>
222 <p class="p8">Same as <b>wrapExtend</b> but the sequences "clip" (return their last element) rather than wrapping.</p>
223 <p class="p12"><br></p>
224 <p class="p10">(</p>
225 <p class="p10">x = [ 1, 2, <span class="s5">"foo"</span>];</p>
226 <p class="p10">y = x.clipExtend(9);</p>
227 <p class="p10">x.postln;</p>
228 <p class="p10">y.postln;</p>
229 <p class="p10">)</p>
230 <p class="p9"><br></p>
231 <p class="p4"><b>slide(windowLength, stepSize)</b></p>
232 <p class="p8">Return a new Array whose elements are repeated subsequences from the receiver.<span class="Apple-converted-space"> </span></p>
233 <p class="p8">Easier to demonstrate than explain.</p>
234 <p class="p9"><br></p>
235 <p class="p10">[1, 2, 3, 4, 5, 6].slide(3, 1).postcs;</p>
236 <p class="p10">[1, 2, 3, 4, 5, 6].slide(3, 2).postcs;</p>
237 <p class="p10">[1, 2, 3, 4, 5, 6].slide(4, 1).postcs;</p>
238 <p class="p9"><br></p>
239 <p class="p4"><b>shift(n)</b></p>
240 <p class="p8">Shift the values of the array <b>n</b> steps to the right (n positive) or to the left(n negative),<span class="Apple-converted-space"> </span></p>
241 <p class="p8">dropping the excess and filling empty space with zero.</p>
242 <p class="p9"><br></p>
243 <p class="p10">[1, 2, 3, 4, 5, 6].shift(3).postln;</p>
244 <p class="p10">[1, 2, 3, 4, 5, 6].shift(-3).postln;</p>
245 <p class="p9"><br></p>
246 <p class="p9"><br></p>
247 <p class="p4"><b>containsSeqColl</b></p>
248 <p class="p8">Returns true if the receiver Array contains any instance of <a href="SequenceableCollection.html"><span class="s2">SequenceableCollection</span></a></p>
249 <p class="p9"><br></p>
250 <p class="p10">[1, 2, 3, 4].containsSeqColl.postln</p>
251 <p class="p10">[1, 2, [3], 4].containsSeqColl.postln</p>
252 <p class="p12"><br></p>
253 <p class="p4"><b>powerset</b></p>
254 <p class="p8">Returns all possible combinations of the array's elements.</p>
255 <p class="p12"><br></p>
256 <p class="p10">[1, 2, 3].powerset.postln</p>
257 <p class="p10">[1, 2, 3].powerset.sort({ |a, b| a.size &gt; b.size }); // sort by size, big first</p>
258 <p class="p10">[1, 2, 3].powerset.sort({ |a, b| a.size &gt; b.size }).reverse; // by size, small first</p>
259 <p class="p12"><br></p>
260 <p class="p8">powerset is also supported in <a href="Collection.html"><span class="s2">Collection</span></a>:</p>
261 <p class="p9"><br></p>
262 <p class="p10">Set[1, 2, 3].powerset;</p>
263 <p class="p10">List[1, 2, 3].powerset</p>
264 <p class="p10">(a: 1, b: 2, c: 3).powerset;</p>
265 <p class="p12"><br></p>
266 <p class="p4"><b>envirPairs</b></p>
267 <p class="p8">Given an array of symbols, this returns an array of pairs of (symbol, value) from the current environment.</p>
268 <p class="p8">This can then be used as arguments for a <a href="../ServerArchitecture/Synth.html"><span class="s2">Synth</span></a>, or in an OSC message.</p>
269 <p class="p12"><br></p>
270 <p class="p10">(</p>
271 <p class="p10">e = (freq: 340, amp: 0.001, strangeness: 0.85);</p>
272 <p class="p10">e.use {</p>
273 <p class="p14"><span class="s1"><span class="Apple-tab-span"> </span>[</span>\amp<span class="s1">, </span>\taste<span class="s1">, </span>\strangeness<span class="s1">].envirPairs;</span></p>
274 <p class="p10">}</p>
275 <p class="p10">);</p>
276 <p class="p12"><br></p>
277 <p class="p4"><b>flop</b></p>
278 <p class="p8">Invert rows and colums in a two dimensional Array (turn inside out).</p>
279 <p class="p15"><span class="s1">See also: <a href="../Core/Kernel/Function.html"><span class="s6">Function</span></a>, <a href="SequenceableCollection.html"><span class="s6">SequenceableCollection</span></a>.</span></p>
280 <p class="p12"><br></p>
281 <p class="p10">[[1, 2, 3], [4, 5, 6]].flop;</p>
282 <p class="p10">[[1, 2, 3], [4, 5, 6], [7, 8]].flop; <span class="s3">// shorter array wraps</span></p>
283 <p class="p13"><span class="s1">[].flop; </span>// result is always 2-d.</p>
284 <p class="p9"><br></p>
285 <p class="p4"><b>multiChannelExpand</b></p>
286 <p class="p8">Used by UGens to perform multi channel expansion. Same as flop.</p>
287 <p class="p9"><br></p>
288 <p class="p4"><b>source</b></p>
289 <p class="p8">Some UGens return Arrays of <a href="../UGens/Multichannel/OutputProxy.html"><span class="s2">OutputProxy</span></a> when instantiated. This method allows you to</p>
290 <p class="p8">get at the source UGen.</p>
291 <p class="p9"><br></p>
292 <p class="p10">(</p>
293 <p class="p10">z = <span class="s2">Pan2</span>.ar;</p>
294 <p class="p10">z.postln;</p>
295 <p class="p10">z.source.postln;</p>
296 <p class="p10">)</p>
297 <p class="p9"><br></p>
298 <p class="p4"><b>fork(join, clock, quant, stackSize)</b></p>
299 <p class="p8">Used within <a href="../Core/Kernel/Routine.html"><span class="s2">Routine</span></a>s and assumes an array of functions, from which subroutines are created. The subroutines are played while the outer Routine carries on. The <b>join</b> parameter expresses after how many subroutines complete the outer Routine is allowed to go on. By default this happens after all subroutines have completed.</p>
300 <p class="p9"><br></p>
301 <p class="p16"><br></p>
302 <p class="p13">// an array of routine functions:</p>
303 <p class="p10">(</p>
304 <p class="p10">a = [</p>
305 <p class="p10"><span class="Apple-tab-span"> </span>{ 1.wait; <span class="s4">\done_one</span>.postln },</p>
306 <p class="p10"><span class="Apple-tab-span"> </span>{ 0.5.wait; <span class="s4">\done_two</span>.postln },</p>
307 <p class="p10"><span class="Apple-tab-span"> </span>{ 0.2.wait; <span class="s4">\done_three</span>.postln }</p>
308 <p class="p10">];</p>
309 <p class="p10">)</p>
310 <p class="p12"><br></p>
311 <p class="p13">// join after 0</p>
312 <p class="p10">(</p>
313 <p class="p17">Routine<span class="s1"> {<span class="Apple-converted-space"> </span></span></p>
314 <p class="p18"><span class="s1"><span class="Apple-tab-span"> </span></span>"join = 0."<span class="s1">.postcln;</span></p>
315 <p class="p10"><span class="Apple-tab-span"> </span>a.fork(0); <span class="s4">\doneAll</span>.postln;</p>
316 <p class="p10">}.play;</p>
317 <p class="p10">)</p>
318 <p class="p13">// join after 1</p>
319 <p class="p10">(</p>
320 <p class="p17">Routine<span class="s1"> {<span class="Apple-converted-space"> </span></span></p>
321 <p class="p18"><span class="s1"><span class="Apple-tab-span"> </span></span>"join = 1."<span class="s1">.postcln;</span></p>
322 <p class="p10"><span class="Apple-tab-span"> </span>a.fork(1); <span class="s4">\doneAll</span>.postln;</p>
323 <p class="p10">}.play;</p>
324 <p class="p10">)</p>
325 <p class="p13">// join after all</p>
326 <p class="p10">(</p>
327 <p class="p17">Routine<span class="s1"> {<span class="Apple-converted-space"> </span></span></p>
328 <p class="p18"><span class="s1"><span class="Apple-tab-span"> </span></span>"join = a.size (default)."<span class="s1">.postcln;</span></p>
329 <p class="p10"><span class="Apple-tab-span"> </span>a.fork; <span class="s4">\doneAll</span>.postln;</p>
330 <p class="p10">}.play;</p>
331 <p class="p10">)</p>
332 <p class="p9"><br></p>
333 <p class="p4"><b>poll(trig, label, trigid)</b></p>
334 <p class="p8">apply an array of <a href="../UGens/Triggers/Poll.html"><span class="s2">Poll</span></a> units to an array of <a href="../UGens/UGen.html"><span class="s2">UGen</span></a>s (see those helpfiles for more details).</p>
335 <p class="p9"><br></p>
336 <p class="p10">s.boot;</p>
337 <p class="p10">(</p>
338 <p class="p10">x = {</p>
339 <p class="p10"><span class="Apple-tab-span"> </span><span class="s2">SinOsc</span>.ar([0.1, 0.2], 0).poll * 0.1</p>
340 <p class="p10">}.play;</p>
341 <p class="p10">)</p>
342 <p class="p13"><span class="s1">x.trace; </span>// By tracing the Synth you can see the two Poll units we created</p>
343 <p class="p10">x.free</p>
344 <p class="p9"><br></p>
345 <p class="p4"><b>dpoll(trig, label, trigid)</b></p>
346 <p class="p8">apply an array of <a href="../UGens/Synth control/Demand Rate/Dpoll.html"><span class="s2">Dpoll</span></a> units to an array of <a href="../UGens/UGen.html"><span class="s2">UGen</span></a>s (see those helpfiles for more details).</p>
347 <p class="p9"><br></p>
348 <p class="p4"><b>atIdentityHash(argKey)</b></p>
349 <p class="p8">This method is used by IdentitySet to search for a key among its members.</p>
350 <p class="p9"><br></p>
351 <p class="p4"><b>atIdentityHashInPairs(argKey)</b></p>
352 <p class="p8">This method is used by IdentityDictionary to search for a key among its members.</p>
353 <p class="p9"><br></p>
354 <p class="p4"><b>asShortString</b></p>
355 <p class="p8">Returns a short string representing the Array that only shows how many elements it contains</p>
356 <p class="p9"><br></p>
357 <p class="p4"><b>asString</b></p>
358 <p class="p8">Returns a string representing the Array. May not be compileable due to ellision (...) of excessive arguments.<span class="Apple-converted-space"> </span></p>
359 <p class="p9"><br></p>
360 <p class="p4"><b>asCompileString</b></p>
361 <p class="p8">Returns a string that will compile to return an Array equal to the receiver.</p>
362 <p class="p9"><br></p>
363 <p class="p4"><b>isValidUGenInput</b></p>
364 <p class="p8">Returns true. Arrays are valid UGen inputs.</p>
365 <p class="p9"><br></p>
366 <p class="p9"><br></p>
367 <p class="p4"><b>asRawOSC</b></p>
368 <p class="p8">Returns the OSC measse as an Int8Array. Receiver must be a bundle.</p>
369 <p class="p9"><br></p>
370 <p class="p10">[0.1, [<span class="s4">\s_new</span>, <span class="s4">\default</span>, -1, 1, 1, <span class="s4">\freq</span>, 1961]].asRawOSC;</p>
371 <p class="p9"><br></p>
372 </body>
373 </html>