maygate

Files: maygate.h, maygate.c

A randomly open or closed "maybe gate"
It takes in a trigger, and then it will randomly decide to turn the gate on or not. One particular application for maygate is to arbitrarily turn on/off sends to effects. One specific example of this could be a randomized reverb throw on a snare.

Functions

sp_maygate_create(sp_maygate **maygate)
sp_maygate_init(sp_data *sp, sp_maygate *maygate)
sp_maygate_compute(sp_data *sp, sp_maygate *maygate, SPFLOAT *trig, SPFLOAT *out)
sp_maygate_destroy(sp_maygate **maygate)

Optional Parameters

prob: Probability of maygate. This is a value between 0-1. The closer to 1, the more likely the maygate will let a signal through.
(Default value: 0)
mode: If mode is nonzero, maygate will output one sample triggers instead of a gate signal.
(Default value: 0)

Inputs

trig: This expects a trigger signal.

Outputs

out: Signal out.