rsc3/doc-schelp/Help-3.12.2/Classes/SendTrig.html

76 lines
No EOL
5.4 KiB
HTML

<html><head><title>SendTrig</title>
<link rel='stylesheet' href='./../scdoc.css' type='text/css' />
<link rel='stylesheet' href='./../frontend.css' type='text/css' />
<link rel='stylesheet' href='./../custom.css' type='text/css' />
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />
<script src='./../scdoc.js' type='text/javascript'></script>
<script src='./../docmap.js' type='text/javascript'></script>
<script src='./../prettify.js' type='text/javascript'></script>
<script src='./../lang-sc.js' type='text/javascript'></script>
<script type='text/javascript'>var helpRoot='./..';</script>
</head>
<ul id='menubar'></ul>
<body onload='fixTOC();prettyPrint()'>
<div class='contents'>
<div class='header'>
<div id='label'>SuperCollider CLASSES</div>
<div id='categories'><a href='./../Browse.html#UGens>Triggers'>UGens>Triggers</a></div>
<h1>SendTrig</h1>
<div id='summary'>Send a trigger message from the server back to the client.</div>
</div>
<div class='subheader'>
<div id='filename'>Source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/Trig.sc'>/Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/Trig.sc</a></div><div id='superclasses'>Inherits from: <a href="../Classes/UGen.html">UGen</a> : <a href="../Classes/AbstractFunction.html">AbstractFunction</a> : <a href="../Classes/Object.html">Object</a></div>
<div id='subclasses'>Subclasses: <a href="../Classes/SendReply.html">SendReply</a></div>
<div id='related'>See also: <a href="./../Classes/OSCFunc.html">OSCFunc</a>, <a href="./../Classes/SendReply.html">SendReply</a></div>
</div>
<div id='toc'>
<ul class='toc'><li class='toc1'><a href='#description'>Description</a></li>
<ul class='toc'></ul><li class='toc1'><a href='#classmethods'>Class methods</a></li>
<ul class='toc'><li class='toc3'><a href='#*ar'>ar</a> <a href='#*kr'>kr</a> </li>
<li class='toc2'><a href='#Inherited%20class%20methods'>Inherited class methods</a></li>
</ul><li class='toc1'><a href='#instancemethods'>Instance methods</a></li>
<ul class='toc'><li class='toc2'><a href='#Inherited%20instance%20methods'>Inherited instance methods</a></li>
<li class='toc2'><a href='#Undocumented%20instance%20methods'>Undocumented instance methods</a></li>
<ul class='toc'><li class='toc3'><a href='#-numOutputs'>numOutputs</a> </li>
<li class='toc3'><a href='#-writeOutputSpecs'>writeOutputSpecs</a> </li>
</ul></ul><li class='toc1'><a href='#examples'>Examples</a></li>
<ul class='toc'></ul></ul></div><h2><a class='anchor' name='description'>Description</a></h2>
<p>On receiving a trigger (a non-positive to positive transition), send a trigger message from the server back to the client.
<p>The trigger message sent back to the client is this:<table>
<tr><td>/tr<td>A trigger message.<tr><td>int:<td>Node ID.<tr><td>int:<td>Trigger ID.<tr><td>float:<td>Trigger value.</table>
<p>This command is the mechanism that synths can use to trigger events in clients. The node ID is the node that is sending the trigger. The trigger ID and value are determined by inputs to the SendTrig unit generator which is the originator of this message.<h2><a class='anchor' name='classmethods'>Class Methods</a></h2>
<h3 class='cmethodname'><span class='methprefix'>*</span><a name='*ar' href='./../Overviews/Methods.html#ar'>ar</a> (<span class='argstr'>in: 0</span>, <span class='argstr'>id: 0</span>, <span class='argstr'>value: 0</span>)</h3>
<h3 class='cmethodname'><span class='methprefix'>*</span><a name='*kr' href='./../Overviews/Methods.html#kr'>kr</a> (<span class='argstr'>in: 0</span>, <span class='argstr'>id: 0</span>, <span class='argstr'>value: 0</span>)</h3>
<div class='method'>
<p><h4>Arguments:</h4>
<table class='arguments'>
<tr><td class='argumentname'>in<td class='argumentdesc'>
<p>The trigger.<tr><td class='argumentname'>id<td class='argumentdesc'>
<p>An integer that will be passed with the trigger message. This is useful if you have more than one SendTrig in a SynthDef.<tr><td class='argumentname'>value<td class='argumentdesc'>
<p>A UGen or float that will be polled at the time of trigger, and its value passed with the trigger message.</table></div><h3><a class='anchor' name='Inherited%20class%20methods'>Inherited class methods</a></h3>
<div id='inheritedclassmets'></div><h2><a class='anchor' name='instancemethods'>Instance Methods</a></h2>
<h3><a class='anchor' name='Inherited%20instance%20methods'>Inherited instance methods</a></h3>
<div id='inheritedinstmets'></div><h3><a class='anchor' name='Undocumented%20instance%20methods'>Undocumented instance methods</a></h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-numOutputs' href='./../Overviews/Methods.html#numOutputs'>numOutputs</a> </h3>
<h3 class='imethodname'><span class='methprefix'>-</span><a name='-writeOutputSpecs' href='./../Overviews/Methods.html#writeOutputSpecs'>writeOutputSpecs</a> </h3>
<h2><a class='anchor' name='examples'>Examples</a></h2>
<pre class='code prettyprint lang-sc'>s.boot;
(
SynthDef("help-SendTrig",{
SendTrig.kr(Dust.kr(1.0),0,0.9);
}).add;
// register to receive this message
o = OSCFunc({ arg msg, time;
[time, msg].postln;
},'/tr', s.addr);
)
Synth("help-SendTrig");
o.free;</pre>
<p><div class='doclink'>helpfile source: <a href='file:///Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/SendTrig.schelp'>/Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/SendTrig.schelp</a><br>link::Classes/SendTrig::<br>sc version: 3.8.0</div></div></body></html>