tcopy

copy the elements of a table from table 'src' to table 'dst' the length of the area to copy is defined by 'range', the read offset is defined by inlet'src' and the write offset by 'dst' brutally working at audio-rate. if 'splat' is enabled,tcopy will prevserve the original contents of the destination table
Author: Robert Schirmer
License: BSD
Github: rbrt/old/tcopy.axo

Inlets

int32 source start

int32 destination start

int32 length of the area to copy

bool32.rising start copying

Outlets

bool32.pulse operation done.

Parameters

int32 length of the area to copy

bool32.tgl splat

Attributes

objref name of the source -table

objref name of the destination - table

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

if (ntrig && (i < (param_range + inlet_range))) {
  attr_dst.array[(i + inlet_dst)] =
      (attr_src.array[(i + inlet_src)] +
       (attr_dst.array[(i + inlet_dst)] * param_splat));
  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