Files: dtrig.h, dtrig.c

Delta trigger
This is able to create spaced out triggers. It is set off by a single trigger.


sp_dtrig_create(sp_dtrig **dtrig)
sp_dtrig_init(sp_data *sp, sp_dtrig *dtrig, sp_ftbl *ft)
sp_dtrig_compute(sp_data *sp, sp_dtrig *dtrig, SPFLOAT *trig, SPFLOAT *out)
sp_dtrig_destroy(sp_dtrig **dtrig)

Mandatory Parameters

ft: An ftable containing times in seconds.
(Recommended value: N/A)

Optional Parameters

loop: When set to 1, dtrig will wrap around and loop again.
(Default value: 0)
delay: This sets a delay (in seconds) on the triggered output when it is initially triggered. This is useful for rhythmic sequences with rests in the beginnings.
(Default value: 0)
scale: Scales the timing signal. A scale of 1 is normal, a scale of 2 will double the duration, and a scale of 0.5 will halve it.
(Default value: 0)


trig: trigger input.


out: These are the triggered outputs.