stereoread

stereo delay read, non-interpolated. Use with "stereowrite" module and reference to the name of that instance.
Author: Remco van der Most
License: BSD
Github: sss/delay/stereoread.axo

Inlets

frac32 delay time (fraction of total delayline size)

frac32 diff

Outlets

frac32buffer wave

frac32buffer out2

Parameters

frac32.u.map time

frac32.s.map diff

Attributes

objref delayname

Declaration
int32_t vi16 = (1 << 16) - 1;
uint16_t v15 = 1 << 15;
Control Rate
int32_t t1 = __USAT(param_time + inlet_time, 27);
int32_t t2 = __SSAT(param_diff + inlet_diff, 28) << 3;
int32_t t3 = __USAT(t1 - ___SMMUL(t1 << 2, t2), 27);
int32_t t4 = __USAT(t1 + ___SMMUL(t1 << 2, t2), 27);
uint32_t delay1 =
    attr_delayname.writepos - (t3 >> (27 - attr_delayname.LENGTHPOW)) - BUFSIZE;
uint32_t delay2 =
    attr_delayname.writepos - (t4 >> (27 - attr_delayname.LENGTHPOW)) - BUFSIZE;
Audio Rate
outlet_out1 =
    ((attr_delayname.array[(delay1++) & attr_delayname.LENGTHMASK] & vi16) -
     v15)
    << 14;
outlet_out2 =
    (((attr_delayname.array[(delay2++) & attr_delayname.LENGTHMASK] >> 16) &
      vi16) -
     v15)
    << 14;

Privacy

© 2024 Zrna Research