Expand description
Triggers
Triggers in Knyst are simply a sample with a value above 0. This module contains some tools to work with triggers.
Triggers are useful for determining when things happen in a precise way e.g. triggering an envelope to restart, starting a new grain in a granular synthesizer Gen or signalling that it is time for a new value.
Structs
- Send a trigger at a constant interval. inputs 0. “interval”: The interval at which the trigger is being sent in seconds. outputs 0. “trig”: A trigger sent at the interval.
- Handle to a IntervalTrig.
- Sends one trigger immediately and then frees itself. outputs 0. “trig”: The trigger
- Handle to a OnceTrig.
Functions
- Upload a IntervalTrig and return a handle to it.
- Returns true is
sample
is a trigger, otherwise false. - For each Sample in
inputs
, set the correspondingoutputs
to true if the Sample is a trigger, otherwise to false. - Upload a OnceTrig and return a handle to it.