step read

read from table. 'value' = value at index. 'trig' = puts out a pulse if 'value' > 0. 'vhold' = the current value,held until next 'trig'.
Author: Robert Schirmer
License: BSD
Github: rbrt/seq/step read.axo

Inlets

int32.positive offset

int32.positive index

Outlets

bool32.pulse trigger if value > 0

frac32 value at index

frac32 hold current value until next trigger

Parameters

int32 offset

Attributes

objref table

Declaration
int prev;
int hold;
Control Rate
outlet_value =
    attr_table.array[__USAT((inlet_step + inlet_offset + param_offset),
                            attr_table.LENGTHPOW)]
    << attr_table.GAIN;

if ((inlet_step != prev) && (outlet_value > 0)) {
  outlet_trig = 1;
  hold = outlet_value;
  outlet_vhold = hold;
} else {
  outlet_trig = 0;
  outlet_vhold = hold;
}
prev = inlet_step;

Privacy

© 2024 Zrna Research