bool32.rising trigger
int32 count
int32 length
int32 maxi
int32 cha
int32.bipolar off
int32.positive v
bool32.pulse rnd
int32 max
int32 offset
int32 chance
frac32.u.map length
bool32.mom rnd
static const uint32_t LENGTH = 64;
uint8_t *get;
int32_t *val;
int ntrig;
int count;
int32_t length;
int i;
int on;
static uint8_t _get[LENGTH] __attribute__((section(".sdram")));
get = &_get[0];
static int32_t _val[LENGTH] __attribute__((section(".sdram")));
val = &_val[0];
on = 1;
ntrig = 0;
int trig = inlet_rnd + param_rnd;
if (inlet_length > 0) {
length = ___SMMUL(param_length << 3, inlet_length << 2);
} else
length = param_length >> 21;
int TRIG = 0;
if ((trig > 0) && !ntrig) {
TRIG = 1;
for (i = 0; i < 64; i++) {
get[i] = (int32_t)(GenerateRandomNumber() % (100));
if (get[i] <= param_chance + inlet_cha) {
val[i] = (int32_t)(GenerateRandomNumber() % (param_max + inlet_maxi));
}
}
ntrig = 1;
} else if (!(trig > 0))
ntrig = 0;
count = inlet_count - (inlet_count / length) * length;
outlet_v = param_offset + inlet_off + val[count];
if (on > 0) {
for (i = 0; i < 64; i++) {
val[i] = (int32_t)(GenerateRandomNumber() % (param_max + inlet_maxi));
}
}
on = 0;
outlet_rnd = TRIG;