frac32buffer in
frac32 pitch1
frac32 pitch2
frac32 time1
frac32 time2
frac32 time3
frac32 read1
frac32 read2
frac32 read3
frac32 readFeed
int32 overwrite
frac32buffer out
int32 pow
int32.hradio overwrite
frac32.u.map time1
frac32.u.map read1
frac32.u.map time2
frac32.u.map read2
frac32.u.map time3
frac32.u.map read3
frac32.u.map readFeed
frac32.s.map feed
frac32.s.map.pitch freq1
frac32.s.map.pitch freq2
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 out;
int32_t oit;
int32_t val1;
int32_t val2;
int32_t mix;
int32_t time1;
int32_t time2;
int32_t time3;
int32_t read1;
int32_t read2;
int32_t read3;
int32_t readFeed;
static int32_t _array[attr_poly][1 << attr_size]
__attribute__((section(".sdram")));
array = &_array[parent->polyIndex][0];
int i;
writepos = 0;
for (i = 0; i < LENGTH; i++)
array[i] = 0;
int32_t f1;
MTOF(param_freq1 + inlet_pitch1, f1);
int32_t f2;
MTOF(param_freq2 + inlet_pitch2, f2);
outlet_pow = attr_size;
time1 = param_time1 + inlet_time1;
time2 = param_time2 + inlet_time2;
time3 = param_time3 + inlet_time3;
read1 = param_read1 + inlet_read1;
read2 = param_read2 + inlet_read2;
read3 = param_read3 + inlet_read3;
readFeed = param_readFeed + inlet_readFeed;
int overwrite = param_overwrite + inlet_overwrite;
overwrite = overwrite - (overwrite / 3) * 3;
val1 = ___SMMLA((inlet_in + ___SMMUL(param_feed << 3, out << 2) - val1) << 1,
f1, val1);
mix = val1 - inlet_in - ___SMMUL(param_feed << 3, out << 2);
val2 = ___SMMLA((mix - val2) << 1, f2, val2);
mix = val2 - mix;
writepos = (writepos + 1) & LENGTHMASK;
if (overwrite == 0) {
array[(writepos - (time1 >> (27 - attr_size))) & LENGTHMASK] = val1;
} else {
array[(writepos - (time1 >> (27 - attr_size))) & LENGTHMASK] += val1 >> 1;
}
if (overwrite == 1) {
array[(writepos - (time2 >> (27 - attr_size))) & LENGTHMASK] = val2;
} else {
array[(writepos - (time2 >> (27 - attr_size))) & LENGTHMASK] += val2 >> 1;
}
if (overwrite == 2) {
array[(writepos - (time3 >> (27 - attr_size))) & LENGTHMASK] = mix;
} else {
array[(writepos - (time3 >> (27 - attr_size))) & LENGTHMASK] += mix >> 1;
}
int32_t oot =
(array[(writepos - (read1 >> (27 - attr_size))) & LENGTHMASK] >> 1);
oot += (array[(writepos - (read2 >> (27 - attr_size))) & LENGTHMASK] >> 1);
oot += (array[(writepos - (read3 >> (27 - attr_size))) & LENGTHMASK] >> 1);
oot += ((inlet_in) >> 1);
int32_t oat =
(array[(writepos - ((readFeed) >> (27 - attr_size))) & LENGTHMASK] >> 1);
out = out + ((oat - out) >> 1);
oit = oit + ((oot - oit) >> 1);
outlet_out = oit;