int32 count
int32 pattern
bool32.rising RndAll
bool32.rising RndPt
frac32.positive output
bool32.mom RndPt
bool32.mom RndAll
int32 max
int32 min
frac32.u.map value
spinner size
spinner patt
static const int32_t LENGTH = (attr_size * attr_patt);
int32_t LENGTHMASK = attr_size;
int32_t *array;
int32_t prev;
int32_t prav;
int atrig;
int rtrig;
int i;
int32_t out;
static int32_t _array[LENGTH] __attribute__((section(".sdram")));
array = &_array[0];
int32_t pattern =
(inlet_pattern - (inlet_pattern / attr_patt) * attr_patt) * attr_size;
int32_t count =
(inlet_count - (inlet_count / LENGTHMASK) * LENGTHMASK) + pattern;
if (!(count == prav)) {
if (!(param_value == array[prav])) {
array[count] = __USAT(param_value, 27);
} else {
PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_value],
array[count], 0xFFFD);
}
out = array[count];
}
prav = count;
if (!(param_value == array[prav])) {
array[count] = __USAT(param_value, 27);
}
outlet_out = out;
if ((param_RndAll || inlet_RndAll) && !atrig) {
atrig = 1;
int32_t diff = (param_max - param_min) << 21;
for (i = 0; i < LENGTH; i++)
array[i] = ___SMMUL(((uint32_t)(GenerateRandomNumber() >> 1)), diff << 1) +
(param_min << 21);
} else if ((param_RndAll || inlet_RndAll) == 0) {
atrig = 0;
}
if ((param_RndPt || inlet_RndPt) && !rtrig) {
rtrig = 1;
int32_t diff = (param_max - param_min) << 21;
for (i = 0; i < LENGTHMASK; i++)
array[i + pattern] =
___SMMUL(((uint32_t)(GenerateRandomNumber() >> 1)), diff << 1) +
(param_min << 21);
} else if ((param_RndPt || inlet_RndPt) == 0) {
rtrig = 0;
}