ahd lin

attack/hold/decay envelope, linear ramps
Author: Johannes Taelman
License: BSD
Github: env/ahd lin.axo

Inlets

bool32.risingfalling trigger

Outlets

frac32.positive envelope output

Parameters

frac32.s.map.klineartime.exp a

frac32.s.map.klineartime.exp d

Declaration
int32_t val;
Init
val = 0;
Control Rate
if (inlet_trig > 0) {
  int32_t t;
  MTOF(-param_a, t);
  val += t >> 6;
} else {
  int32_t t;
  MTOF(-param_d, t);
  val -= t >> 6;
}
val = __USAT(val, 27);
outlet_env = val;

Privacy

© 2024 Zrna Research