supernova: fixes for boost-1.49 and gcc-4.7
[supercollider.git] / Help / UGens / InOut / XOut.html
blob93f76852e21708977cfd3ded9f467bd360af6db4
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.11">
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: #0000ee}
13 p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; min-height: 12.0px}
14 p.p5 {margin: 0.0px 0.0px 0.0px 14.0px; text-indent: -14.0px; font: 12.0px Helvetica}
15 p.p6 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco}
16 p.p7 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #982316}
17 span.s1 {font: 18.0px Helvetica}
18 span.s2 {font: 14.0px Helvetica}
19 span.s3 {color: #000000}
20 span.s4 {color: #001bb9}
21 span.s5 {color: #0000ee}
22 span.s6 {color: #0000ff}
23 span.s7 {color: #0024f8}
24 span.s8 {color: #0025b2}
25 span.s9 {color: #606060}
26 span.s10 {color: #416d1f}
27 span.Apple-tab-span {white-space:pre}
28 </style>
29 </head>
30 <body>
31 <p class="p1"><span class="s1"><b>XOut</b></span><span class="s2"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b></span><b>send signal to a bus, crossfading with previous contents</b></p>
32 <p class="p2"><br></p>
33 <p class="p3"><span class="s3"><b>Inherits from: </b><a href="../../Core/Object.html"><b>Object</b></a></span><span class="s4"><b> : </b><a href="../../Core/Kernel/AbstractFunction.html"><span class="s5"><b>AbstractFunction</b></span></a><b> : </b><a href="../UGen.html"><span class="s5"><b>UGen</b></span></a><b> : </b><a href="AbstractOut.html"><span class="s6"><b>AbstractOut</b></span></a></span></p>
34 <p class="p4"><br></p>
35 <p class="p1"><b>*ar(bus, xfade, channelsArray) </b>- crossfade an audio bus.</p>
36 <p class="p1"><b>*kr(bus, xfade, channelsArray) </b>- crossfade an control bus.</p>
37 <p class="p2"><span class="Apple-tab-span"> </span></p>
38 <p class="p1"><b>bus </b>- the index, or array of indexes, of busses to write to. The lowest index numbers are written to the audio hardware.</p>
39 <p class="p1"><b>xfade </b>- crossfade level.</p>
40 <p class="p5"><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>
41 <p class="p2"><br></p>
42 <p class="p1">xfade is a level for the crossfade between what is on the bus and what you are sending.</p>
43 <p class="p1">The algorithm is equivalent to this:</p>
44 <p class="p2"><br></p>
45 <p class="p1">bus_signal = (input_signal * xfade) + (bus_signal * (1 - xfade));</p>
46 <p class="p2"><br></p>
47 <p class="p1">See the <a href="../../ServerArchitecture/Server-Architecture.html"><span class="s7">Server-Architecture</span></a> and <a href="../../ServerArchitecture/Bus.html"><span class="s7">Bus</span></a> helpfiles for more information on buses and how they are used.<b><span class="Apple-tab-span"> </span></b></p>
48 <p class="p4"><span class="Apple-tab-span"> </span></p>
49 <p class="p6"><span class="Apple-tab-span"> </span>(</p>
50 <p class="p6"><span class="Apple-tab-span"> </span><span class="s8">SynthDef</span>(<span class="s9">"help-SinOsc"</span>, { <span class="s8">arg</span> freq=440, out;<span class="Apple-converted-space"> </span></p>
51 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s8">Out</span>.ar(out, <span class="s8">SinOsc</span>.ar(freq, 0, 0.1))<span class="Apple-converted-space"> </span></p>
52 <p class="p6"><span class="Apple-tab-span"> </span>}).send(s);</p>
53 <p class="p4"><span class="Apple-tab-span"> </span></p>
54 <p class="p6"><span class="Apple-tab-span"> </span><span class="s8">SynthDef</span>(<span class="s9">"help-XOut"</span>, { <span class="s8">arg</span> out=0, xFade=1;</p>
55 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s8">var</span> source;</p>
56 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>source = <span class="s8">PinkNoise</span>.ar(0.05);</p>
57 <p class="p4"><br></p>
58 <p class="p7"><span class="s3"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span>// write to the bus, crossfading with previous contents</p>
59 <p class="p6"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="s8">XOut</span>.ar(out, xFade, source);</p>
60 <p class="p4"><br></p>
61 <p class="p6"><span class="Apple-tab-span"> </span>}).send(s);</p>
62 <p class="p6"><span class="Apple-tab-span"> </span>)</p>
63 <p class="p4"><span class="Apple-tab-span"> </span></p>
64 <p class="p6"><span class="Apple-tab-span"> </span><span class="s8">Synth</span>(<span class="s9">"help-SinOsc"</span>, [<span class="s10">\freq</span>, 500]);</p>
65 <p class="p6"><span class="Apple-tab-span"> </span>a = <span class="s8">Synth.tail</span>(s, <span class="s9">"help-XOut"</span>);</p>
66 <p class="p4"><span class="Apple-tab-span"> </span></p>
67 <p class="p4"><span class="Apple-tab-span"> </span></p>
68 <p class="p6"><span class="Apple-tab-span"> </span>a.set(<span class="s10">\xFade</span>, 0.7);</p>
69 <p class="p6"><span class="Apple-tab-span"> </span>a.set(<span class="s10">\xFade</span>, 0.4);</p>
70 <p class="p6"><span class="Apple-tab-span"> </span>a.set(<span class="s10">\xFade</span>, 0.0);</p>
71 <p class="p4"><span class="Apple-tab-span"> </span></p>
72 <p class="p4"><span class="Apple-tab-span"> </span></p>
73 </body>
74 </html>