step toggle

toggles an element of a table : if the element at index == 0,the element is set to the dial 'value'. if the element > 0 ,the element is set to 0.
Author: Robert Schirmer
License: BSD
Github: rbrt/seq/step toggle.axo

Inlets

int32.positive offset in the table

int32.positive write index

bool32.rising toggle the table's content at 'index'

frac32.positive value if index is set to 'high'

Outlets

bool32 state of the step at index

Parameters

frac32.u.map value if index is set to 'high'

Attributes

objref table

Declaration
int ntrig;
bool op;
Control Rate
if ((inlet_toggle > 0) && !ntrig) {
  ntrig = 1;
  op = attr_table.array[(inlet_index + inlet_offset)];
  op = !op;
  attr_table.array[(inlet_index + inlet_offset)] =
      (op * (__SSAT(((param_value + inlet_value)), 28) >> attr_table.GAIN));
}
if (!(inlet_toggle > 0)) {
  ntrig = 0;
}

outlet_state = attr_table.array[(inlet_index + inlet_offset)];

Privacy

© 2024 Zrna Research