Follow2

envelope follower, linear output 2= 1,3 ms 3= 2,7 ms 4= 5,3 ms 5= 10,6 ms 6= 21,2 ms 7= 42,6 ms 8= 85,3 ms 9= 170,6 ms
Author: Jaffasplaffa (original by Johannes)
License: BSD
Github: jaffa/env/Follow2.axo

Inlets

frac32buffer input wave

Outlets

frac32.positive amplitude

Parameters

int32 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 >> param_time;
accu += sabs >> (param_time + 4);
outlet_amp = accu;

Privacy

© 2024 Zrna Research