env follow

envelope follower, linear output
Author: Johannes Taelman
License: BSD
Github: rbrt/control/env follow.axo

Inlets

frac32buffer input wave

Outlets

frac32.positive amplitude

Attributes

combo time

Declaration
int32_t accu;
Init
accu = 0;
Control Rate
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;

Privacy

© 2024 Zrna Research