Port of Supercollider's Trig ugen. This opcode is deprecated and renamed to trighold,
Syntax
aout=sc_trig(ain,kdur)kout=sc_trig(kin,kdur)
aoutsc_trigain,kdurkoutsc_trigkin,kdur
Initialization
initialvalue If given, sets the internal state. Default=0
Performance
ain -- Trigger. Trigger can be any signal. A trigger happens when the signal changes from non-positive to positive.
kdur -- Duration of the trigger in seconds.
When a nonpositive to positive transition occurs at the input, Trig outputs the level of the triggering input for the specified duration, otherwise it outputs zero.
Examples
Here is an example of the sctrig opcode. It uses the file sctrig.csd.