step read H 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. 'h0' - 'h7' = the 8 values at index 'step' + index of the output, IF 'trig' is 'true'.
Author: Robert Schirmer
License: BSD
Github: rbrt/seq/step read H 8.axo

Inlets

int32.positive offset

int32.positive index

Outlets

frac32 h0

frac32 h1

frac32 h2

frac32 h3

frac32 h4

frac32 h5

frac32 h6

frac32 h7

bool32.pulse trigger if value > 0

Parameters

int32 offset

Attributes

objref table

Declaration
int prev;
int offset;
int h0;
int h1;
int h2;
int h3;
int h4;
int h5;
int h6;
int h7;
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;
  h0 = attr_table.array[__USAT((inlet_step + offset), attr_table.LENGTHPOW)]
       << attr_table.GAIN;
  outlet_h0 = h0;
  h1 = attr_table.array[__USAT((inlet_step + offset + 1), attr_table.LENGTHPOW)]
       << attr_table.GAIN;
  outlet_h1 = h1;
  h2 = attr_table.array[__USAT((inlet_step + offset + 2), attr_table.LENGTHPOW)]
       << attr_table.GAIN;
  outlet_h2 = h2;
  h3 = attr_table.array[__USAT((inlet_step + offset + 3), attr_table.LENGTHPOW)]
       << attr_table.GAIN;
  outlet_h3 = h3;
  h4 = attr_table.array[__USAT((inlet_step + offset + 4), attr_table.LENGTHPOW)]
       << attr_table.GAIN;
  outlet_h4 = h4;
  h5 = attr_table.array[__USAT((inlet_step + offset + 5), attr_table.LENGTHPOW)]
       << attr_table.GAIN;
  outlet_h5 = h5;
  h6 = attr_table.array[__USAT((inlet_step + offset + 6), attr_table.LENGTHPOW)]
       << attr_table.GAIN;
  outlet_h6 = h6;
  h7 = attr_table.array[__USAT((inlet_step + offset + 7), attr_table.LENGTHPOW)]
       << attr_table.GAIN;
  outlet_h7 = h7;
} else {
  outlet_trig = 0;
  outlet_h0 = h0;
  outlet_h1 = h1;
  outlet_h2 = h2;
  outlet_h3 = h3;
  outlet_h4 = h4;
  outlet_h5 = h5;
  outlet_h6 = h6;
  outlet_h7 = h7;
}
prev = inlet_step;

Privacy

© 2024 Zrna Research