frac32buffer delay time (fraction of total delayline size)
frac32buffer in2
frac32buffer in3
frac32buffer in4
frac32 pitch1
frac32 pitch2
frac32 cut
frac32buffer out
frac32.s.map.pitch pitch1
frac32.s.map.pitch pitch2
frac32.s.map.pitch cut
frac32.s.map feed1
frac32.s.map feed2
frac32.s.map res1
frac32.s.map res2
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 *array1;
int32_t *array2;
uint32_t writepos;
int32_t Time1;
int32_t prev1;
int32_t step1;
int32_t Time2;
int32_t prev2;
int32_t step2;
int32_t out1;
int32_t out2;
int32_t val;
int32_t res;
int32_t Res;
static int32_t _array1[attr_poly][1 << attr_size]
__attribute__((section(".sdram")));
static int32_t _array2[attr_poly][1 << attr_size]
__attribute__((section(".sdram")));
array1 = &_array1[parent->polyIndex][0];
array2 = &_array2[parent->polyIndex][0];
int i;
writepos = 0;
for (i = 0; i < LENGTH; i++) {
array1[i] = 0;
array2[i] = 0;
}
int32_t fraq1;
MTOF(-param_pitch1 - inlet_pitch1, fraq1);
int32_t fraq2;
MTOF(-param_pitch2 - inlet_pitch2, fraq2);
int32_t times1 = __USAT(fraq1 >> 4, 27);
step1 = (times1 - prev1) >> 4;
Time1 = prev1;
prev1 = times1;
int32_t times2 = __USAT(fraq2 >> 4, 27);
step2 = (times2 - prev2) >> 4;
Time2 = prev2;
prev2 = times2;
int32_t freq;
MTOF(param_cut + inlet_cut, freq)
Time1 += step1;
Time2 += step2;
writepos = (writepos + 1) & LENGTHMASK;
array1[writepos] =
__SSAT(inlet_in1 + inlet_in2 + ___SMMUL(out1 << 3, param_feed1 << 4), 30) +
Res;
array2[writepos] =
__SSAT(inlet_in3 + inlet_in4 + ___SMMUL(out2 << 3, param_feed2 << 4), 30) +
Res;
// array1[writepos] =
// __SSAT(inlet_in1+inlet_in2+___SMMUL(Res<<3,param_feed<<4),30);
// array2[writepos] =
// __SSAT(inlet_in3+inlet_in4+___SMMUL(Res<<3,param_feed<<4),30);
uint32_t tmp_d = Time1;
uint32_t tmp_di = writepos - (tmp_d >> (27 - LENGTHPOW));
uint32_t tmp_w1 = (tmp_d << (LENGTHPOW + 3)) & 0x3FFFFFFF;
uint32_t tmp_w2 = (1 << 30) - tmp_w1;
int32_t tmp_a1 = array1[tmp_di & LENGTHMASK];
int32_t tmp_a2 = array1[(tmp_di + 1) & LENGTHMASK];
int32_t tmp_r = ___SMMUL(tmp_a1, tmp_w1);
tmp_r = ___SMMLA(tmp_a2, tmp_w2, tmp_r);
out1 = tmp_r + inlet_in1 - inlet_in2 + ___SMMUL(Res << 3, param_res2);
tmp_d = Time2;
tmp_di = writepos - (tmp_d >> (27 - LENGTHPOW));
tmp_w1 = (tmp_d << (LENGTHPOW + 3)) & 0x3FFFFFFF;
tmp_w2 = (1 << 30) - tmp_w1;
tmp_a1 = array2[tmp_di & LENGTHMASK];
tmp_a2 = array2[(tmp_di + 1) & LENGTHMASK];
tmp_r = ___SMMUL(tmp_a1, tmp_w1);
tmp_r = ___SMMLA(tmp_a2, tmp_w2, tmp_r);
out2 = tmp_r + inlet_in3 - inlet_in4 - ___SMMUL(Res << 3, param_res2);
int32_t sum;
sum = out1 + out2;
val = ___SMMLA((sum - val) << 1, freq, val);
res = ___SMMLA((val - out2 - res) << 1, freq, res);
outlet_out = val - out2 >> 1;
Res = __SSAT(___SMMUL(val - out2 - res << 3, param_res1 << 2), 25) << 1;