step read M4

reads a block of 4 elements from a table ,starting at 'step'. 'trig' = puts out a pulse if the first element of the block is greater than 0. 'm0' - 'm3' = the 4 values at index 'step' + index of the output.
Author: Robert Schirmer
License: BSD
Github: rbrt/seq/step read M4.axo

Inlets

int32.positive offset

int32.positive index

Outlets

frac32 m0

frac32 m1

frac32 m2

frac32 m3

bool32.pulse trigger if value > 0

Parameters

int32 offset

Attributes

objref table

Declaration
int prev;
int offset;
Control Rate
offset = (inlet_offset + param_offset);

if ((inlet_step != prev) &&
    ((attr_table.array[__USAT((inlet_step + offset), attr_table.LENGTHPOW)]
      << attr_table.GAIN) > 0))
  outlet_trig = 1;
else
  outlet_trig = 0;

outlet_m0 =
    attr_table.array[__USAT((inlet_step + offset), attr_table.LENGTHPOW)]
    << attr_table.GAIN;
outlet_m1 =
    attr_table.array[__USAT((inlet_step + offset + 1), attr_table.LENGTHPOW)]
    << attr_table.GAIN;
outlet_m2 =
    attr_table.array[__USAT((inlet_step + offset + 2), attr_table.LENGTHPOW)]
    << attr_table.GAIN;
outlet_m3 =
    attr_table.array[__USAT((inlet_step + offset + 3), attr_table.LENGTHPOW)]
    << attr_table.GAIN;

prev = inlet_step;

Privacy

© 2024 Zrna Research