step read M 8

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

Inlets

int32.positive offset

int32.positive index

Outlets

frac32 m0

frac32 m1

frac32 m2

frac32 m3

frac32 m4

frac32 m5

frac32 m6

frac32 m7

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;

outlet_m4 =
    attr_table.array[__USAT((inlet_step + offset + 4), attr_table.LENGTHPOW)]
    << attr_table.GAIN;
outlet_m5 =
    attr_table.array[__USAT((inlet_step + offset + 5), attr_table.LENGTHPOW)]
    << attr_table.GAIN;
outlet_m6 =
    attr_table.array[__USAT((inlet_step + offset + 6), attr_table.LENGTHPOW)]
    << attr_table.GAIN;
outlet_m7 =
    attr_table.array[__USAT((inlet_step + offset + 7), attr_table.LENGTHPOW)]
    << attr_table.GAIN;

prev = inlet_step;

Privacy

© 2024 Zrna Research