bool32.rising uses a gate/trigger signal (eg for sequencers)
bool32 resets internal 1st/2nd trigger counter
int32 sets swing position (the higher the value, the later the 2nd trigger will be generated)
bool32.pulse trigOut
int32 swing
int32 repeat
int32 range
frac32.u.map in
int array1[64];
int16_t cnt;
int cot;
int cat;
int ttrig;
int dtrig;
int swingOn;
int gtrig;
int16_t swingsize;
cnt = 999;
int32_t repeat = param_repeat;
outlet_trigOut = 0;
cnt = __USAT(cnt - 1, 27);
if ((inlet_trigIn > 0) && (!(ttrig))) {
swingsize =
___SMMUL((inlet_swing >> 15) / repeat << 3, param_in << 2) + param_swing;
ttrig = 1;
cnt = cot * swingsize + 1;
cat += 1;
cat = cat - cat / param_range * param_range;
cot = cat - (cat / repeat) * repeat;
} else if (!(inlet_trigIn > 0)) {
ttrig = 0;
}
outlet_trigOut = cnt == 1;