tclear

re-set the elements of a table starting at 'offset'. the length of the area to re-set is defined by 'range'. brutally working at audio-rate.
Author: Robert Schirmer
License: BSD
Github: rbrt/old/tclear.axo

Inlets

bool32.rising trigger

int32 offset inside the table

int32 length of the area inside the table to re-set

Outlets

bool32.pulse operation done.

Parameters

int32 offset inside the table

int32 length of the area inside the table to re-set

frac32.s.map value to re-set to

Attributes

objref table

Declaration
int i;
int ntrig;
Audio Rate
if ((inlet_trig > 0) && (!ntrig)) {
  ntrig = 1;
  i = 0;
}

if (ntrig && (i < (param_range + inlet_range))) {
  attr_table.array[(i + inlet_offset + param_offset)] =
      (__SSAT(param_value, 28) >> attr_table.GAIN);
  i += 1;
} else if (!inlet_trig)
  ntrig = 0;

if ((i == (param_range + inlet_range)) && ntrig)
  outlet_done = 1;
else
  outlet_done = 0;

Privacy

© 2024 Zrna Research