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: 12.0px Helvetica
}
11 p
.p2
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
; 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; min-height: 12.0px}
14 p
.p5
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
; color: #000000}
15 p
.p6
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
; color: #bf0000}
16 p
.p7
{margin: 0.0px 0.0px 0.0px 0.0px; font: 10.0px Monaco
; min-height: 14.0px}
17 span
.s1
{font: 18.0px Helvetica
}
18 span
.s2
{font: 9.0px Monaco
}
19 span
.s3
{color: #0000ff}
20 span
.s4
{color: #0000bf}
21 span
.s5
{color: #007300}
22 span
.Apple-tab-span
{white-space:pre
}
26 <p class=
"p1"><span class=
"s1"><b>SendTrig
<span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></b></span><b>send a value from the server to all notified clients
</b></p>
27 <p class=
"p2"><br></p>
28 <p class=
"p1">On receiving a trigger (a non-positive to positive transition), send a trigger message from the server back to the client.
</p>
29 <p class=
"p3"><br></p>
30 <p class=
"p1"><b><span class=
"Apple-tab-span"> </span>SendTrig.kr( input, id, value )
</b></p>
31 <p class=
"p1"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>input
</b> <span class=
"Apple-tab-span"> </span>the trigger
</p>
32 <p class=
"p1"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>id
</b> <span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>an integer that will be passed with the trigger message.
</p>
33 <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><span class=
"Apple-tab-span"> </span>this is useful if you have more than one SendTrig in a SynthDef
</p>
34 <p class=
"p1"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><b>value
</b> <span class=
"Apple-tab-span"> </span>a UGen or float that will be polled at the time of trigger,
</p>
35 <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><span class=
"Apple-tab-span"> </span>and its value passed with the trigger message
</p>
36 <p class=
"p3"><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 class=
"Apple-tab-span"> </span></p>
37 <p class=
"p1">The
<b>nodeID
</b> is the node that is sending the trigger. The
<b>triggerID
</b> and
<b>value
</b> are determined by inputs to the SendTrig unit generator which is the originator of this message.
</p>
38 <p class=
"p3"><br></p>
39 <p class=
"p1">The trigger message sent back to the client is this:
<span class=
"Apple-tab-span"> </span><span class=
"s2"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></span></p>
40 <p class=
"p1"><b>/tr
<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 class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span>a trigger message
</b></p>
41 <p class=
"p1"><span class=
"Apple-tab-span"> </span>int - node ID
</p>
42 <p class=
"p1"><span class=
"Apple-tab-span"> </span>int - trigger ID
</p>
43 <p class=
"p1"><span class=
"Apple-tab-span"> </span>float - trigger value
</p>
44 <p class=
"p3"><br></p>
45 <p class=
"p1">This command is the mechanism that synths can use to trigger events in clients. A message is sent to all notified clients. see
<a href=
"../../ServerArchitecture/Server.html"><span class=
"s3">Server
</span></a><span class=
"s3">.
</span> For sending an array of values, or an arbitrary reply command, see
<a href=
"SendReply.html"><span class=
"s3">SendReply
</span></a></p>
46 <p class=
"p3"><br></p>
47 <p class=
"p3"><br></p>
48 <p class=
"p2"><br></p>
49 <p class=
"p4"><br></p>
50 <p class=
"p4"><br></p>
51 <p class=
"p5">{
<span class=
"s4">SendTrig
</span>.kr(
<span class=
"s4">Dust
</span>.kr(
1.0),
0,
0.9) }.play;
</p>
52 <p class=
"p4"><br></p>
53 <p class=
"p6">// register to receive this message
</p>
55 <p class=
"p5"><span class=
"s4">OSCresponder
</span>(s.addr,
<span class=
"s5">'/tr'
</span>,{
<span class=
"s4">arg
</span> time,responder,msg;
</p>
56 <p class=
"p5"><span class=
"Apple-tab-span"> </span>[time,responder,msg].postln;
</p>
57 <p class=
"p5">}).add
</p>
59 <p class=
"p7"><br></p>