supernova: fixes for boost-1.49 and gcc-4.7
[supercollider.git] / Help / UGens / InOut / SharedOut.html
blobce488fc8182b2051846dec9ec4cfdfc30dbe947a
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: 12.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: #001bb9}
13 p.p4 {margin: 0.0px 0.0px 0.0px 14.0px; text-indent: -14.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: #982316}
16 p.p7 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; min-height: 12.0px}
17 p.p8 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #606060}
18 p.p9 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #0025b2}
19 span.s1 {font: 18.0px Helvetica}
20 span.s2 {color: #000000}
21 span.s3 {color: #0000ff}
22 span.s4 {color: #0025b2}
23 span.s5 {color: #416d1f}
24 span.s6 {color: #606060}
25 span.Apple-tab-span {white-space:pre}
26 </style>
27 </head>
28 <body>
29 <p class="p1"><span class="s1"><b>SharedOut<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b></span><b>write to a shared control bus</b></p>
30 <p class="p2"><br></p>
31 <p class="p3"><span class="s2"><b>Inherits from: </b><a href="../../Core/Object.html"><b>Object</b></a></span><b> : </b><a href="../../Core/Kernel/AbstractFunction.html"><b>AbstractFunction</b></a><b> : </b><a href="../UGen.html"><b>UGen</b></a><b> : </b><a href="AbstractOut.html"><span class="s3"><b>AbstractOut</b></span></a></p>
32 <p class="p2"><br></p>
33 <p class="p1"><b>SharedOut.kr(bus, channelsArray)</b></p>
34 <p class="p2"><br></p>
35 <p class="p1">Reads from a control bus shared between the internal server and the SC client. Control rate only. Reading from a shared control bus on the client is synchronous. When not using the internal server use the get method of <b>Bus</b> (or /c_get in messaging style) or <b>SendTrig</b> with an <b>OSCresponder</b> or <b>OSCresponderNode</b>.</p>
36 <p class="p1"><b>bus</b> - the index of the shared control bus to read from</p>
37 <p class="p4"><b>channelsArray </b>- an Array of channels or single output to write out. You cannot change the size of this once a SynthDef has been built.</p>
38 <p class="p2"><br></p>
39 <p class="p5">(</p>
40 <p class="p6">// only works with the internal server</p>
41 <p class="p5">s = <span class="s4">Server</span>.internal;</p>
42 <p class="p5">s.boot;</p>
43 <p class="p5">)</p>
44 <p class="p7"><br></p>
45 <p class="p5">(</p>
46 <p class="p8"><span class="s4">SynthDef</span><span class="s2">(</span>"help-SharedOut"<span class="s2">, {</span></p>
47 <p class="p5"><span class="Apple-tab-span"> </span><span class="s4">SharedOut</span>.kr(0, <span class="s4">SinOsc</span>.kr(0.2));</p>
48 <p class="p5">}).send(s);</p>
49 <p class="p5">)</p>
50 <p class="p7"><br></p>
51 <p class="p5">(</p>
52 <p class="p5">s.sendMsg(<span class="s5">\s_new</span>, <span class="s6">"help-SharedOut"</span>, x = s.nextNodeID, 0, 1);</p>
53 <p class="p5">s.sendMsg(<span class="s5">\n_trace</span>, x);</p>
54 <p class="p7"><br></p>
55 <p class="p6">// poll the shared control bus</p>
56 <p class="p9">Routine<span class="s2">({</span></p>
57 <p class="p5"><span class="Apple-tab-span"> </span>30.do({</p>
58 <p class="p5"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>s.getSharedControl(0).postln;</p>
59 <p class="p5"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>0.2.wait;</p>
60 <p class="p5"><span class="Apple-tab-span"> </span>});</p>
61 <p class="p5">}).play;</p>
62 <p class="p5">)</p>
63 <p class="p7"><br></p>
64 <p class="p7"><br></p>
65 <p class="p5">s.quit;</p>
66 <p class="p2"><br></p>
67 </body>
68 </html>