stereowrite

stereo delayline definition, read it with "delay/stereoread" objects referencing the instance name of this object
Author: Remco van der Most
License: BSD
Github: sss/delay/stereowrite.axo

Inlets

frac32buffer wave input

frac32buffer in2

Outlets

None

Attributes

combo size

Declaration
static const uint32_t LENGTHPOW = (attr_size);
static const uint32_t LENGTH = (1 << attr_size);
static const uint32_t LENGTHMASK = ((1 << attr_size) - 1);
uint32_t *array;
uint32_t writepos;
uint16_t v15 = 1 << 15;
Init
static uint32_t _array[1 << attr_size] __attribute__((section(".sdram")));
array = &_array[0];
int i;
writepos = 0;
for (i = 0; i < LENGTH; i++)
  array[i] = (1 << 15) + (1 << 31);
Audio Rate
writepos = (writepos + 1) & LENGTHMASK;
array[writepos] = (uint32_t)__SSAT(inlet_in1 >> 14, 16) + (v15);
array[writepos] += (uint32_t)(__SSAT(inlet_in2 >> 14, 16) + (v15)) << 16;

Privacy

© 2024 Zrna Research