incr

Files: incr.h, incr.c

Trigger-based Incrementor When triggered, this module will increment and decrement a value bounded between a min and max. Initially, this was designed for the specific use case of interfacing with the griffin knob.

Functions

sp_incr_create(sp_incr **incr)
sp_incr_init(sp_data *sp, sp_incr *incr, SPFLOAT val)
sp_incr_compute(sp_data *sp, sp_incr *incr, SPFLOAT *trig, SPFLOAT *out)
sp_incr_destroy(sp_incr **incr)

Mandatory Parameters

val: Initial value
(Recommended value: 0.5)

Optional Parameters

step: Step value to increment by.
(Default value: 0.1)
min: Minimum value
(Default value: 0)
max: Maximum value
(Default value: 1)

Inputs

trig: Trigger signal. When positive, the value will increase. When negative, the value will decrease.

Outputs

out: incr output.