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=
"1038.29">
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: 9.0px Monaco
; min-height: 12.0px}
13 p
.p4
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
; color: #88281d}
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: #88281c}
16 p
.p7
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
; color: #88281c; min-height: 12.0px}
17 p
.p8
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
; color: #cd0b0b}
18 span
.s1
{font: 18.0px Helvetica
}
19 span
.s2
{color: #002df4}
20 span
.s3
{font: 9.0px Monaco
}
21 span
.s4
{color: #000000}
22 span
.s5
{color: #072aaf}
23 span
.s6
{color: #88281d}
24 span
.s7
{color: #88281c}
25 span
.Apple-tab-span
{white-space:pre
}
29 <p class=
"p1"><span class=
"s1"><b>Monitor
</b></span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>link between busses
</b></p>
30 <p class=
"p2"><br></p>
31 <p class=
"p1">superclass: Object
</p>
32 <p class=
"p2"><br></p>
33 <p class=
"p1">For playing contiguous channels to other contiguous busses, one uses
<b>play
</b>;
</p>
34 <p class=
"p1"><span class=
"Apple-converted-space"> </span>for more complex routings, such as splitting, spreading etc to multiple channels,
<b>playN.
</b></p>
35 <p class=
"p2"><span class=
"Apple-tab-span"> </span></p>
36 <p class=
"p1"><span class=
"Apple-tab-span"> </span><b>play(fromIndex, fromNumChannels, toIndex, toNumChannels, target, multi, volume, fadeTime)
</b></p>
37 <p class=
"p1"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>plays from a bus index with a number of channels to another index with a number
</p>
38 <p class=
"p1"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>of channels, within a target group, or a server.
</p>
39 <p class=
"p1"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>multi
</b>: keep old links and add new one
</p>
40 <p class=
"p1"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>volume
</b>: volume at which to monitor
</p>
41 <p class=
"p1"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>fadeTime
</b>: fade in fade out time
</p>
42 <p class=
"p2"><span class=
"Apple-tab-span"> </span></p>
43 <p class=
"p1"><b><span class=
"Apple-tab-span"> </span>playN(outs, amps, ins, vol, fadeTime, target, addAction)
</b></p>
44 <p class=
"p1"><b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>outs
<span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></b>array of destination channels
</p>
45 <p class=
"p1"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>amps
<span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></b>array of
<span class=
"Apple-converted-space"> </span>amplitudes for each channel
</p>
46 <p class=
"p1"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>ins
<span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></b>array of source channels
</p>
47 <p class=
"p2"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></p>
48 <p class=
"p1"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>outs
</b>,
<b>amps
</b> and
<b>ins
</b> can be nested arrays.
</p>
49 <p class=
"p2"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></p>
50 <p class=
"p1"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>vol
</b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>global scaling for amplitudes
</p>
51 <p class=
"p1"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>fadeTime
</b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>fade in and out
</p>
52 <p class=
"p1"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>target, addAction
</b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>where to play (default: server default group)
</p>
53 <p class=
"p2"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></p>
54 <p class=
"p1"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>see also
<a href=
"playN.html"><span class=
"s2">playN
</span></a><b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></b></p>
55 <p class=
"p3"><span class=
"Apple-tab-span"> </span></p>
56 <p class=
"p2"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></p>
57 <p class=
"p1"><span class=
"Apple-tab-span"> </span><b>isPlaying
</b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>returns true if the group is still playing
</p>
58 <p class=
"p2"><span class=
"Apple-tab-span"> </span></p>
59 <p class=
"p2"><span class=
"Apple-tab-span"> </span></p>
60 <p class=
"p1"><span class=
"Apple-tab-span"> </span><b>stop(fadeTime)
</b></p>
61 <p class=
"p1"><b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>stops within the fadeTime
</b></p>
62 <p class=
"p2"><span class=
"Apple-tab-span"> </span></p>
63 <p class=
"p1"><span class=
"Apple-tab-span"> </span><b>vol_
</b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>set the volume
</p>
64 <p class=
"p1"><span class=
"Apple-tab-span"> </span><b>out_
</b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>set the output index. doesn't work right now.
</p>
65 <p class=
"p3"><span class=
"Apple-tab-span"> </span></p>
66 <p class=
"p1"><span class=
"s3"><span class=
"Apple-tab-span"> </span></span><b>playToBundle(bundle, ... (same as .play))
</b></p>
67 <p class=
"p1"><span class=
"s3"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></span>adds all playing osc messages to the bundle. the bundle should support the message
<b> .add
</b></p>
68 <p class=
"p3"><span class=
"Apple-tab-span"> </span></p>
69 <p class=
"p3"><span class=
"Apple-tab-span"> </span></p>
70 <p class=
"p3"><span class=
"Apple-tab-span"> </span></p>
71 <p class=
"p4"><span class=
"s4"><span class=
"Apple-tab-span"> </span></span>//example
</p>
72 <p class=
"p3"><span class=
"Apple-tab-span"> </span></p>
73 <p class=
"p5"><span class=
"Apple-tab-span"> </span>Server.default = s = Server.internal;
</p>
74 <p class=
"p5"><span class=
"Apple-tab-span"> </span>s.boot;
</p>
75 <p class=
"p5"><span class=
"Apple-tab-span"> </span>s.scope(
16);
</p>
76 <p class=
"p3"><br></p>
77 <p class=
"p5"><span class=
"Apple-tab-span"> </span>{
<span class=
"s5">Out
</span>.ar(
87,
<span class=
"s5">SinOsc
</span>.ar(
<span class=
"s5">MouseX
</span>.kr(
40,
10000,
1) * [
1,
2,
3],
0,
0.2)) }.play;
</p>
78 <p class=
"p5"><span class=
"Apple-tab-span"> </span>x =
<span class=
"s5">Monitor
</span>.new;
</p>
79 <p class=
"p5"><span class=
"Apple-tab-span"> </span>x.play(
87,
3,
1,
2);
</p>
80 <p class=
"p5"><span class=
"Apple-tab-span"> </span>x.out =
0;
</p>
81 <p class=
"p5"><span class=
"Apple-tab-span"> </span>x.stop(
3.0);
</p>
82 <p class=
"p4"><span class=
"s4"><span class=
"Apple-tab-span"> </span>x.play(
87,
1,
0,
1);
</span>// in
> out : now mixes down (wrapping)
</p>
83 <p class=
"p4"><span class=
"s4"><span class=
"Apple-tab-span"> </span>x.play(
89,
1,
0,
2);
</span>// in
< out : now distributes to
2 channels
</p>
84 <p class=
"p5"><span class=
"s6"><span class=
"Apple-tab-span"> </span></span>x.stop;
</p>
85 <p class=
"p3"><span class=
"Apple-tab-span"> </span></p>
86 <p class=
"p4"><span class=
"s4"><span class=
"Apple-tab-span"> </span></span>// multiple play
</p>
87 <p class=
"p5"><span class=
"Apple-tab-span"> </span>x.play(
87,
1,
0,
2, multi:
<span class=
"s5">true
</span>);
<span class=
"Apple-tab-span"> </span></p>
88 <p class=
"p5"><span class=
"Apple-tab-span"> </span>x.play(
88,
1,
0,
2, multi:
<span class=
"s5">true
</span>);
<span class=
"Apple-tab-span"> </span></p>
89 <p class=
"p5"><span class=
"Apple-tab-span"> </span>x.play(
89,
1,
0,
2, multi:
<span class=
"s5">true
</span>);
<span class=
"Apple-tab-span"> </span></p>
90 <p class=
"p5"><span class=
"Apple-tab-span"> </span>x.stop;
</p>
91 <p class=
"p3"><br></p>
92 <p class=
"p3"><br></p>
93 <p class=
"p3"><br></p>
94 <p class=
"p1"><b><i>multichannel playing
</i></b></p>
95 <p class=
"p3"><br></p>
96 <p class=
"p3"><br></p>
97 <p class=
"p3"><br></p>
98 <p class=
"p6">// examples: args are // outs, amps, ins, vol, fadeTime
</p>
99 <p class=
"p7"><br></p>
100 <p class=
"p7"><br></p>
101 <p class=
"p5">(
<span class=
"Apple-tab-span"> </span>x.playN(
</p>
102 <p class=
"p8"><span class=
"s4"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>[
0,
1,
4],
<span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></span>// to these outs
</p>
103 <p class=
"p8"><span class=
"s4"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>[
0.1,
0.4,
0.3],
<span class=
"Apple-tab-span"> </span></span>// with these volumes
</p>
104 <p class=
"p8"><span class=
"s4"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>[
87,
88,
89]
<span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></span>// from these ins
</p>
105 <p class=
"p5"><span class=
"Apple-tab-span"> </span>);
<span class=
"Apple-converted-space"> </span></p>
108 <p class=
"p5"><span class=
"Apple-tab-span"> </span>x.playN(
</p>
109 <p class=
"p5"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>[
0, [
1,
3,
2],
4],
<span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>// outs can be nested:
<span class=
"s7">87 -
> 0,
<span class=
"Apple-converted-space"> </span>88 -
> [
1,
3,
2],
<span class=
"Apple-converted-space"> </span>89 -
> 4</span></p>
110 <p class=
"p5"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>[
0.1, [
0.4,
0.2,
0.1],
0.3], // with nested
<span class=
"s7">volumes
0.1, [
0.4,
0.2,
0.1], and
0.3</span></p>
111 <p class=
"p5"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>[
87,
88,
89]);
<span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>// reading from these ins
</p>
112 <p class=
"p5">)
<span class=
"Apple-tab-span"> </span></p>
113 <p class=
"p5"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>// can also set global volume and fadetime
</p>
114 <p class=
"p5"><span class=
"Apple-tab-span"> </span>x.playN(vol:
0.0, fadeTime:
4);
<span class=
"Apple-tab-span"> </span></p>
115 <p class=
"p3"><span class=
"Apple-tab-span"> </span></p>
116 <p class=
"p3"><span class=
"Apple-tab-span"> </span></p>