bool32 gate
bool32 rec
bool32 delete
bool32 deleteSEQ
bool32 clear
int32 position
int32 length
frac32 CV
bool32 gate
frac32 CV
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;
int16_t *array;
int ctrig;
int i;
int dtrig;
int32_t CV;
int get;
int32_t temp;
static int16_t _array[LENGTH] __attribute__((section(".sdram")));
array = &_array[0];
int32_t position;
position = inlet_position;
position = position - (position / inlet_length) * inlet_length;
int rec = inlet_gate && inlet_rec;
if (((inlet_deleteSEQ > 0) && (inlet_gate > 0)) && !dtrig) {
dtrig = 1;
for (i = 0; i < LENGTH; i++) {
array[i] = 0;
}
} else if (!(inlet_gate && inlet_deleteSEQ)) {
dtrig;
}
if ((inlet_delete > 0) && (inlet_gate > 0)) {
array[position] = 0;
}
int Delete = inlet_delete + inlet_deleteSEQ;
if ((inlet_clear > 0) && !ctrig) {
ctrig = 1;
for (i = 0; i < LENGTH; i++) {
array[i] = 0;
}
} else if (inlet_clear == 0) {
ctrig = 0;
}
if ((rec > 0) && !(Delete)) {
array[position & LENGTHMASK] = inlet_CV >> 12;
}
if (rec == 0) {
outlet_gate = array[position & LENGTHMASK] > 0 ? 1 : 0;
if (outlet_gate > 0) {
outlet_CV = array[(position)&LENGTHMASK] << 12;
CV = array[(position - 5) & LENGTHMASK] << 12;
} else {
outlet_CV = CV;
}
}
if ((inlet_gate > 0) && !(Delete)) {
outlet_CV = inlet_CV;
CV = inlet_CV;
outlet_gate = 1;
}