cmake build system: visiblity support for clang
[supercollider.git] / Help / UGens / Triggers / TChoose.html
blobca14f1b5a1c7b11303ae0ae6d6e8510f66819982
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: 12.0px Helvetica}
11 p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #0037ad; min-height: 12.0px}
12 p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px}
13 p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #000000}
14 p.p5 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #000000; min-height: 12.0px}
15 span.s1 {font: 18.0px Helvetica}
16 span.s2 {color: #0000ff}
17 span.s3 {color: #0000bf}
18 span.Apple-tab-span {white-space:pre}
19 </style>
20 </head>
21 <body>
22 <p class="p1"><span class="s1"><b>TChoose<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b></span><b>randomly select one of several inputs</b></p>
23 <p class="p2"><br></p>
24 <p class="p1">superclass: Object (TChoose returns a combination of <a href="../Multichannel/Select.html"><span class="s2">Select</span></a> and <a href="../Random/TIRand.html"><span class="s2">TIRand</span></a>)</p>
25 <p class="p3"><br></p>
26 <p class="p1">An output is selected randomly on recieving a trigger from an array of inputs.</p>
27 <p class="p3"><br></p>
28 <p class="p1">see also: <a href="TWChoose.html"><span class="s2">TWChoose</span></a></p>
29 <p class="p2"><br></p>
30 <p class="p2"><br></p>
31 <p class="p1"><b><span class="Apple-tab-span"> </span>*ar(trig,array)</b></p>
32 <p class="p1"><b><span class="Apple-tab-span"> </span>*kr(trig,array)</b></p>
33 <p class="p2"><br></p>
34 <p class="p2"><br></p>
35 <p class="p2"><br></p>
36 <p class="p4">(</p>
37 <p class="p4">{<span class="Apple-converted-space"> </span></p>
38 <p class="p4"><span class="Apple-tab-span"> </span><span class="s3">var</span> a;</p>
39 <p class="p4"><span class="Apple-tab-span"> </span>a = [</p>
40 <p class="p4"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s3">SinOsc</span>.ar,</p>
41 <p class="p4"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s3">Saw</span>.ar,</p>
42 <p class="p4"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s3">Pulse</span>.ar</p>
43 <p class="p4"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>];</p>
44 <p class="p4"><span class="Apple-tab-span"> </span><span class="s3">TChoose</span>.ar(<span class="s3">Dust</span>.ar(<span class="s3">MouseX</span>.kr(1, 1000, 1)), a) * 0.2</p>
45 <p class="p5"><span class="Apple-tab-span"> </span></p>
46 <p class="p4">}.play;</p>
47 <p class="p4">)</p>
48 <p class="p2"><span class="Apple-tab-span"> </span></p>
49 <p class="p1">Note: all the ugens are continously running. This may not be the most efficient way if each input is<span class="Apple-converted-space">  </span>cpu-expensive.</p>
50 </body>
51 </html>