ahd lin m

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

Inlets

bool32.risingfalling trigger

frac32.bipolar attack time

frac32.bipolar decay time

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;
  int32_t at = param_a + inlet_a;
  MTOF(-at, t);
  val += t >> 6;
} else {
  int32_t t;
  int32_t dt = param_d + inlet_d;
  MTOF(-dt, t);
  val -= t >> 6;
}
val = __USAT(val, 27);
outlet_env = val;

Privacy

© 2024 Zrna Research