sel b 16 pulse

select one out of 16 booleans, chainable. Pulse output.
Author: Johannes Taelman
License: BSD
Github: sel/sel b 16 pulse.axo

Inlets

int32 in

bool32 default value

Outlets

int32 chain out (in-16)

bool32.pulse output

Parameters

bin16 b16

Declaration
int in_prev;
Init
in_prev = 0;
Control Rate
if ((inlet_in >= 0) && (inlet_in < 16))
  outlet_o = (in_prev != inlet_in) && (param_b16 & (1 << inlet_in));
else
  outlet_o = inlet_def;
outlet_chain = inlet_in - 16;
in_prev = inlet_in;

Privacy

© 2024 Zrna Research