encode i 4

trigger an index according to a connected boolean source, index can be momentary or latching
Author: Simon Iten
License: BSD
Github: rbrt/control/encode i 4.axo

Inlets

bool32 b1

bool32 b2

bool32 b3

bool32 b4

Outlets

int32.positive output

bool32 active

Declaration
int index;
Init
index = 0;
Control Rate
if (inlet_b1)
  index = 0;
else if (inlet_b2)
  index = 1;
else if (inlet_b3)
  index = 2;
else if (inlet_b4)
  index = 3;
outlet_out = index;

outlet_active = (inlet_b1) || (inlet_b2) || (inlet_b3) || (inlet_b4);

Privacy

© 2024 Zrna Research