hsc3-0.1: Help/UGen/Trigger/sendTrig.lhs
sendTrig in id value
On receiving a trigger (0 to non-zero transition), send a trigger
message from the server back to all registered clients. Clients
register by sending a /notify message to the server.
input - 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
> withSC3 (\fd -> do send fd (notify True)
> wait fd "/done")
> s <- lfNoise0 KR 10
> audition (MRG [sendTrig s 0 s, out 0 (sinOsc AR (s * 200 + 500) 0 * 0.1)])
> withSC3 (\fd -> do tr <- wait fd "/tr"
> putStrLn (show tr))
> withSC3 (\fd -> do send fd (notify False)
> wait fd "/done")