step write

if the value at an inlet changes,it's written to the table at inlet 'step'. if 'rec' is on,after the values changes for the first time,it will be written to the table at inlet 'step' ALL THE TIME (if it changes or not...) useful for live-recording of modulation data.
Author: robert schirmer
License: BSD
Github: rbrt/seq/step write.axo

Inlets

int32.positive offset

int32.positive step

frac32 v

bool32.risingfalling rec

Outlets

None

Parameters

int32 offset

Attributes

objref table

Declaration
uint32_t prev0;

int ntrig0;
Init
prev0 = 0;
Control Rate
if ((inlet_rec > 0) && (inlet_v != prev0))
  ntrig0 = 1;
if (!(inlet_rec > 0))
  ntrig0 = 0;

if ((inlet_v != prev0) || (ntrig0 > 0)) {
  attr_table.array[inlet_offset + 0 + inlet_step] =
      __SSAT(inlet_v, 28) >> attr_table.GAIN;
  prev0 = inlet_v;
}

Privacy

© 2024 Zrna Research