frac32buffer delay time (fraction of total delayline size)
frac32 time
frac32 tailtime
frac32buffer wave
frac32.u.map time
frac32.u.map tailtime
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);
int32_t *array;
uint32_t writepos;
int32_t feed;
int32_t Time;
int32_t val1;
int32_t val2;
int32_t T1ime;
static int32_t _array[1 << attr_size] __attribute__((section(".sdram")));
array = &_array[0];
int i;
writepos = 0;
for (i = 0; i < LENGTH; i++)
array[i] = 0;
int32_t TMP = __USAT(inlet_time + param_time, 27);
Time = TMP >> 27 - LENGTHPOW;
int32_t tailtime = __USAT(param_tailtime + inlet_tailtime, 27) >> 5;
float32_t ratio = (float32_t)(Time << 2) / (float32_t)(tailtime * 7);
float32_t dB = (float32_t)(-10) * ratio;
dB = powf(2, dB) * 4;
uint32_t tmp_w1 = (TMP << (LENGTHPOW + 3)) & 0x3FFFFFFF;
uint32_t tmp_w2 = (1 << 30) - tmp_w1;
writepos = (writepos + 1) & LENGTHMASK;
uint32_t tmp_di1 = writepos - (Time)-1;
int32_t tmp_a1 = array[tmp_di1 & LENGTHMASK];
int32_t tmp_a2 = array[(tmp_di1 + 1) & LENGTHMASK];
int32_t tmp_r = ___SMMUL(tmp_a1, tmp_w1);
tmp_r = ___SMMLA(tmp_a2, tmp_w2, tmp_r);
int32_t lp = tmp_r * dB;
array[writepos] = -lp + inlet_in;
outlet_out = -lp + inlet_in;