tablestore accum

writes and outputs 4 values to a table.
Author: robert schirmer
License: who cares
Github: rbrt/data/tablestore accum.axo

Inlets

int32 sets an offset for writing to the table

bool32.rising inc

bool32.rising dec

Outlets

frac32 v0

Attributes

objref table

combo increment

combo mode

Declaration
bool trig;
int add;
Control Rate
int v = attr_table.array[__USAT((inlet_offset + 0), attr_table.LENGTHPOW)]
        << attr_table.GAIN;
outlet_v0 = v;

if ((inlet_inc || inlet_dec) && !trig) {
  trig = 1;
  attr_table.array[inlet_offset] =
      __SSAT(v + ((inlet_inc) ? attr_increment << 19
                              : (attr_increment << 19) * -1),
             28) >>
      attr_table.GAIN;
  if (attr_mode && (attr_table.array[inlet_offset] < 0))
    attr_table.array[inlet_offset] = 0;
}

if (!inlet_inc && !inlet_dec)
  trig = 0;

Privacy

© 2024 Zrna Research