fnd4Mod

Feedback delay network with 4 delay lines. High quality 32bit.
Author: Johannes Taelman
License: BSD
Github: sss/reverb/fnd4Mod.axo

Inlets

frac32buffer in1

frac32buffer in2

frac32buffer in3

frac32buffer in4

Outlets

frac32buffer out1

frac32buffer out2

frac32buffer out3

frac32buffer out4

Parameters

frac32.u.map size

frac32.u.map decay

frac32.u.map s1

frac32.u.map s2

frac32.u.map s3

frac32.u.map s4

Attributes

spinner d1

Declaration
int32_t d1d[attr_d1];
int32_t d2d[attr_d1 >> 1];
int32_t d3d[attr_d1 >> 2];
int32_t d4d[attr_d1 >> 3];
int32_t D[4];

uint32_t d1p;
uint32_t d2p;
uint32_t d3p;
uint32_t d4p;
Init
int i;
for (i = 0; i < attr_d1; i++)
  d1d[i] = 0;
for (i = 0; i < (attr_d1 >> 1); i++)
  d2d[i] = 0;
for (i = 0; i < (attr_d1 >> 2); i++)
  d3d[i] = 0;
for (i = 0; i < (attr_d1 >> 3); i++)
  d4d[i] = 0;
d1p = 0;
d2p = 0;
d3p = 0;
d4p = 0;
Control Rate
int32_t g2 = 755299123 + param_decay;
uint32_t size = ___SMMUL(attr_d1 - 1 << 3, param_size << 2) + 1;
D[0] = ___SMMUL(size - 1 << 3, param_s1 << 2) + 1;
D[1] = ___SMMUL(size - 1 << 2, param_s2 << 2) + 1;
D[2] = ___SMMUL(size - 1 << 1, param_s3 << 2) + 1;
D[3] = ___SMMUL(size - 1, param_s4 << 2) + 1;
Audio Rate
int32_t i1 = inlet_in1 + d1d[d1p];
int32_t i2 = inlet_in2 + d2d[d2p];
int32_t i3 = inlet_in3 + d3d[d3p];
int32_t i4 = inlet_in4 + d4d[d4p];
int32_t t1 = i2 + i3;
int32_t t2 = -i1 - i4;
int32_t t3 = i1 - i4;
int32_t t4 = i2 - i3;
int32_t o1 = ___SMMLA(t1, g2, t1 >> 1);
int32_t o2 = ___SMMLA(t2, g2, t2 >> 1);
int32_t o3 = ___SMMLA(t3, g2, t3 >> 1);
int32_t o4 = ___SMMLA(t4, g2, t4 >> 1);
d1d[d1p] = o1;
d2d[d2p] = o2;
d3d[d3p] = o3;
d4d[d4p] = o4;
d1p++;
d2p++;
d3p++;
d4p++;
if (d1p >= D[0])
  d1p = 0;
if (d2p >= D[1])
  d2p = 0;
if (d3p >= D[2])
  d3p = 0;
if (d4p >= D[3])
  d4p = 0;
outlet_out1 = o1;
outlet_out2 = o2;
outlet_out3 = o3;
outlet_out4 = o4;

Privacy

© 2024 Zrna Research