SuperCollider CLASSES
UGens>Triggers

# SendTrig

Send a trigger message from the server back to the client.
Source: /Applications/SuperCollider.app/Contents/Resources/SCClassLibrary/Common/Audio/Trig.sc
Inherits from: UGen : AbstractFunction : Object
Subclasses: SendReply
See also: OSCFunc, SendReply

## Description

On receiving a trigger (a non-positive to positive transition), send a trigger message from the server back to the client.

The trigger message sent back to the client is this:

/tr | A trigger message.
int: | Node ID.
int: | Trigger ID.
float: | Trigger value.

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.

## Class Methods

### *ar (in: 0, id: 0, value: 0)

### *kr (in: 0, id: 0, value: 0)

#### Arguments:

in | The trigger.
id | An integer that will be passed with the trigger message. This is useful if you have more than one SendTrig in a SynthDef.
value | A UGen or float that will be polled at the time of trigger, and its value passed with the trigger message.

### Inherited class methods

## Instance Methods

### Inherited instance methods

### Undocumented instance methods

### -numOutputs

### -writeOutputSpecs

## Examples

    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;

helpfile source: /Applications/SuperCollider.app/Contents/Resources/HelpSource/Classes/SendTrig.schelp
link::Classes/SendTrig::
sc version: 3.8.0