frac32 time
None
frac32.u.map time
frac32.s.map feed
frac32.u.map.gain wet
bool32.tgl bypass
bool32.tgl solo
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;
uint32_t writepos;
uint32_t v31 = (uint32_t)1 << 31;
uint32_t v30 = (uint32_t)1 << 30;
int32_t outL;
int32_t outR;
int32_t lp;
int32_t TM;
int32_t F1;
int32_t F2;
int32_t FD;
int32_t wet;
bool bypass, solo;
int32_t FX(int32_t inL, int32_t inR, int32_t CV1, int32_t CV2) {
int32_t IL = inL;
int32_t IR = inR;
lp += CV2 - lp >> 9;
CV2 = lp;
CV1 = CV1 > 0 ? CV1 : -CV1;
inL += F2 + ___SMMUL(F1 - F2 << 1, CV1 << 4);
inR += F1 + ___SMMUL(F2 - F1 << 1, CV1 << 4);
writepos = (writepos + 1) & LENGTHMASK;
array[writepos] = __SSAT(inL >> 14, 16);
array[writepos + LENGTH] = __SSAT(inR >> 14, 16);
outL = array[(writepos - TM - (___SMMUL(CV2, TM) << 2)) & LENGTHMASK] << 14;
outR =
array[((writepos - TM + (___SMMUL(CV2, TM) << 2)) & LENGTHMASK) + LENGTH]
<< 14;
outL = (IL + ___SMMUL(wet, outR << 1));
outR = (IR + ___SMMUL(wet, outL << 1));
F1 = -___SMMUL(FD, outL) << 1;
F2 = -___SMMUL(FD, outR) << 1;
if (bypass > 0) {
outL = IL;
outR = IR;
}
};
static int16_t _array[LENGTH * 2] __attribute__((section(".sdram")));
array = &_array[0];
int i;
writepos = 0;
for (i = 0; i < LENGTH * 2; i++)
array[i] = 0;
TM = __USAT(inlet_time + param_time, 27) >> 27 - LENGTHPOW;
FD = param_feed << 4;
wet = param_wet;
bypass = param_bypass;
solo = param_solo;