frac32buffer input wave
frac32.positive amplitude
combo time
int32_t accu;
accu = 0;
int sabs = 0;
int i;
for (i = 0; i < BUFSIZE; i++) {
int32_t v = inlet_in[i];
sabs += v > 0 ? v : -v;
}
accu -= accu >> attr_time;
accu += sabs >> (attr_time + 4);
outlet_amp = accu;