frac32buffer input wave
frac32.positive amplitude
int32 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 >> param_time;
accu += sabs >> (param_time + 4);
outlet_amp = accu;