IO Variants: 2
Variant: 1
frac32buffer audio input
frac32buffer triggered on rising above 0
frac32buffer oldest sample output
objref table
uint32_t pos;
int32_t last_input;
int32_t val_out;
int32_t val_target;
int32_t accu;
int32_t sampleno;
last_input = 0;
pos = 0;
val_out = 0;
val_target = 0;
accu = 0;
sampleno = 0;
if (inlet_trigger > 0 && last_input <= 0) {
pos = (pos + 1) & attr_table.LENGTHMASK;
val_target = attr_table.array[(pos + 1) & attr_table.LENGTHMASK];
attr_table.array[pos] = __SSAT(accu / sampleno, 28);
accu = 0;
sampleno = 0;
}
last_input = inlet_trigger;
accu += inlet_in;
sampleno++;
val_out = (val_out + val_out + val_out + val_target) >> 2;
outlet_out = val_out;
Variant: 2
frac32.positive feedback mod
frac32buffer audio input
frac32buffer triggered on rising above 0
frac32buffer oldest sample output
frac32.u.map feedback
objref table
uint32_t pos;
int32_t last_input;
int32_t val_out;
int32_t val_target;
int32_t accu;
int32_t sampleno;
int32_t fdb_level;
last_input = 0;
pos = 0;
val_out = 0;
val_target = 0;
accu = 0;
sampleno = 0;
fdb_level = 0;
fdb_level = __SSAT((param_feedback + inlet_feedback), 28);
if (inlet_trigger > 0 && last_input <= 0) {
pos = (pos + 1) & attr_table.LENGTHMASK;
val_target = attr_table.array[(pos + 1) & attr_table.LENGTHMASK];
int32_t val = attr_table.array[pos];
attr_table.array[pos] =
__SSAT(accu / sampleno + (___SMMUL(fdb_level, val) << 5), 28);
accu = 0;
sampleno = 0;
}
last_input = inlet_trigger;
accu += inlet_in;
sampleno++;
val_out = (val_out + val_out + val_out + val_target) >> 2;
outlet_out = val_out;