frac32.positive feedback amount
frac32buffer.positive index in fraction of table size
frac32buffer audio in
bool32.risingfalling overdub
bool32 recording state,post - fadeout
bool32.tgl if 'hard' is on,there will be NO fade-in
bool32.tgl disable fades
frac32.u.map feedback
frac32.s.map.kdecaytime.exp attack
frac32.s.map.kdecaytime.exp release
objref table
uint32_t csample;
uint32_t dub;
uint8_t shift;
int32_t env;
bool dubstate;
shift = 27 - attr_table.LENGTHPOW;
if (!param_nofade) {
if (inlet_overdub)
env = (param_hard)
? (1 << 27)
: (1 << 27) - (___SMMUL((1 << 27) - env, param_attack) << 1);
else
env = ___SMMUL(env, param_release) << 1;
dubstate = env;
} else {
dubstate = inlet_overdub;
env = inlet_overdub << 27;
}
outlet_fade = dubstate;
if (dubstate) {
csample = (__USAT(inlet_phase, 27) >> shift);
dub = (___SMMUL((attr_table.array[csample] << attr_table.GAIN),
(inlet_feedback + param_feedback))
<< 5);
attr_table.array[csample] =
(__SSAT((___SMMUL((inlet_wave), env) << 5) + dub, 28)) >> attr_table.GAIN;
}