int32 size
bool32 rec
bool32 delete
bool32 delALL
bool32 reset
frac32 val
frac32 mix
frac32 out
bool32 gate
combo size
static const uint32_t LENGTHPOW = (attr_size);
static const uint32_t LENGTH = (1 << attr_size);
static const uint32_t LENGTHMASK = ((1 << attr_size) - 1);
static const uint32_t BITS = 8;
static const uint32_t GAIN = 20;
uint8_t *array;
int32_t position;
int32_t val;
int32_t mix;
int reset;
int i;
int trig;
static uint8_t _array[attr_poly][LENGTH] __attribute__((section(".sdram")));
array = &_array[parent->polyIndex][0];
if ((inlet_reset > 0) && !trig) {
trig = 1;
position = 0;
} else if (!(inlet_reset > 0)) {
trig = 0;
}
if ((inlet_delALL > 0) && (!reset) && inlet_rec) {
reset = 1;
for (i = 0; i < LENGTH; i++) {
array[i] = 0;
}
} else if (!(inlet_delALL)) {
reset = 0;
}
int32_t in = inlet_delete > 0 ? 0 : inlet_val;
position = (position + 1) & LENGTHMASK;
position = position > inlet_size ? 0 : position;
if (!(inlet_rec > 0)) {
val = val + (((array[position] << 19) - val) >> 7);
}
if (inlet_rec > 0) {
val = val + ((in - val) >> 7);
array[position] = val >> 19;
}
outlet_out = val;
outlet_gate = array[position] > 0 ? 1 : 0;
mix = mix + (((outlet_gate << 27) - mix) >> 7);
outlet_mix = mix;