1 <!DOCTYPE html PUBLIC
"-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
4 <meta http-equiv=
"Content-Type" content=
"text/html; charset=UTF-8">
5 <meta http-equiv=
"Content-Style-Type" content=
"text/css">
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: 16.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 0.0px; font: 12.0px Helvetica
}
14 p
.p5
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
; color: #0025b2; min-height: 12.0px}
15 p
.p6
{margin: 0.0px 0.0px 0.0px 14.0px; text-indent: -14.0px; font: 12.0px Helvetica
}
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
}
18 p
.p9
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
; color: #982316}
19 span
.s1
{font: 18.0px Helvetica
}
20 span
.s2
{font: 14.0px Helvetica
}
21 span
.s3
{color: #000000}
22 span
.s4
{color: #0000ff}
23 span
.s5
{color: #0025b2}
24 span
.s6
{color: #606060}
25 span
.s7
{color: #416d1f}
26 span
.Apple-tab-span
{white-space:pre
}
30 <p class=
"p1"><span class=
"s1"><b>ReplaceOut
</b></span><span class=
"s2"><b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></b></span><b>send signal to a bus, overwriting previous contents
</b></p>
31 <p class=
"p2"><br></p>
32 <p class=
"p3"><span class=
"s3"><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=
"s4"><b>AbstractOut
</b></span></a><span class=
"s4"><b> :
</b><a href=
"Out.html"><b>Out
</b></a></span></p>
33 <p class=
"p2"><br></p>
34 <p class=
"p4"><b>*ar(bus, channelsArray)
<span class=
"Apple-converted-space"> </span></b>- write a signal to an audio bus.
</p>
35 <p class=
"p4"><b>*kr(bus, channelsArray)
<span class=
"Apple-converted-space"> </span></b>-
<b> </b>write a signal to a control bus.
</p>
36 <p class=
"p5"><span class=
"Apple-tab-span"> </span></p>
37 <p class=
"p4"><b>bus
</b>- the index of the bus to write out to. The lowest numbers are written to the audio hardware.
</p>
38 <p class=
"p6"><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>
39 <p class=
"p2"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></p>
40 <p class=
"p4"><b>Out
</b>adds its output to a given bus, making it available to all nodes later in the node tree. (See
<b>Synth
</b>and
<b>Order-of-execution
</b> for more information.) ReplaceOut overwrites those contents. This can make it useful for processing.
</p>
41 <p class=
"p7"><br></p>
42 <p class=
"p4">See the
<b>Server-Architecture
</b> and
<b>Bus
</b> helpfiles for more information on buses and how they are used.
</p>
43 <p class=
"p7"><span class=
"Apple-tab-span"> </span></p>
44 <p class=
"p8"><span class=
"Apple-tab-span"> </span>(
</p>
45 <p class=
"p8"><span class=
"Apple-tab-span"> </span><span class=
"s5">SynthDef
</span>(
<span class=
"s6">"ReplaceOutHelp"</span>, {
<span class=
"s5">arg
</span> out=
0, freq=
440;
</p>
46 <p class=
"p8"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"s5">var
</span> source;
</p>
47 <p class=
"p8"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>source =
<span class=
"s5">SinOsc
</span>.ar(freq,
0,
0.1);
</p>
48 <p class=
"p7"><br></p>
49 <p class=
"p9"><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, replacing previous contents
</p>
50 <p class=
"p8"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"s5">ReplaceOut
</span>.ar(out, source);
</p>
51 <p class=
"p7"><br></p>
52 <p class=
"p8"><span class=
"Apple-tab-span"> </span>}).send(s);
</p>
53 <p class=
"p8"><span class=
"Apple-tab-span"> </span>)
</p>
54 <p class=
"p7"><span class=
"Apple-tab-span"> </span></p>
55 <p class=
"p9"><span class=
"s3"><span class=
"Apple-tab-span"> </span></span>// each Synth replaces the output of the previous one
</p>
56 <p class=
"p8"><span class=
"Apple-tab-span"> </span>x =
<span class=
"s5">Synth
</span>.tail(s,
<span class=
"s6">"ReplaceOutHelp"</span>, [
<span class=
"s7">\freq
</span>,
500]);
</p>
57 <p class=
"p8"><span class=
"Apple-tab-span"> </span>y =
<span class=
"s5">Synth
</span>.tail(s,
<span class=
"s6">"ReplaceOutHelp"</span>, [
<span class=
"s7">\freq
</span>,
600]);
</p>
58 <p class=
"p8"><span class=
"Apple-tab-span"> </span>z =
<span class=
"s5">Synth
</span>.tail(s,
<span class=
"s6">"ReplaceOutHelp"</span>, [
<span class=
"s7">\freq
</span>,
700]);
</p>
59 <p class=
"p7"><span class=
"Apple-tab-span"> </span></p>
60 <p class=
"p9"><span class=
"s3"><span class=
"Apple-tab-span"> </span></span>// release them in reverse order; the older Synths are still there.
</p>
61 <p class=
"p8"><span class=
"Apple-tab-span"> </span>z.free;
</p>
62 <p class=
"p8"><span class=
"Apple-tab-span"> </span>y.free;
</p>
63 <p class=
"p8"><span class=
"Apple-tab-span"> </span>x.free;
</p>