verb1

Very simple stereo reverb. Got a metallic touch to it, but still pretty decent sound. 14%
Author: Jaffasplaffa (Original by Johannes Taelman)
License: BSD
Github: jaffa/rev/verb1.axo

Inlets

frac32buffer in

frac32buffer r

Outlets

frac32buffer out

frac32buffer r

Parameters

bool32.tgl on

frac32.u.map mix

frac32.u.map feed

Declaration
int32_t *d1;
int dpos1;

int32_t *d2;
int dpos2;

int32_t *d3;
int dpos3;

int32_t *d4;
int dpos4;

int32_t *d5;
int dpos5;

int32_t *d6;
int dpos6;

int32_t *d7;
int dpos7;

int32_t *d8;
int dpos8;

int32_t ATOB;
int32_t BTOC;
int32_t CTOD;
int32_t D;

int32_t ETOF;
int32_t FTOG;
int32_t GTOH;
int32_t H;

int32_t feedL;
int32_t feedR;

int32_t feedLOUT;
int32_t feedROUT;
Init
static int32_t _array[attr_poly][1035] __attribute__((section(".sdram")));
d1 = &_array[parent->polyIndex][0];
int i1;
for (i1 = 0; i1 < 1035; i1++)
  d1[i1] = 0;
dpos1 = 0;

static int32_t _array2[attr_poly][1679] __attribute__((section(".sdram")));
d2 = &_array2[parent->polyIndex][0];
int i2;
for (i2 = 0; i2 < 1679; i2++)
  d2[i2] = 0;
dpos2 = 0;

static int32_t _array3[attr_poly][1943] __attribute__((section(".sdram")));
d3 = &_array3[parent->polyIndex][0];
int i3;
for (i3 = 0; i3 < 1943; i3++)
  d3[i3] = 0;
dpos3 = 0;

static int32_t _array4[attr_poly][3136] __attribute__((section(".sdram")));
d4 = &_array4[parent->polyIndex][0];
int i4;
for (i4 = 0; i4 < 3136; i4++)
  d4[i4] = 0;
dpos4 = 0;

static int32_t _array5[attr_poly][1056] __attribute__((section(".sdram")));
d5 = &_array5[parent->polyIndex][0];
int i5;
for (i5 = 0; i5 < 1056; i5++)
  d5[i5] = 0;
dpos5 = 0;

static int32_t _array6[attr_poly][1687] __attribute__((section(".sdram")));
d6 = &_array6[parent->polyIndex][0];
int i6;
for (i6 = 0; i6 < 1687; i6++)
  d6[i6] = 0;
dpos6 = 0;

static int32_t _array7[attr_poly][1959] __attribute__((section(".sdram")));
d7 = &_array7[parent->polyIndex][0];
int i7;
for (i7 = 0; i7 < 1959; i7++)
  d7[i7] = 0;
dpos7 = 0;

static int32_t _array8[attr_poly][2933] __attribute__((section(".sdram")));
d8 = &_array8[parent->polyIndex][0];
int i8;
for (i8 = 0; i8 < 2933; i8++)
  d8[i8] = 0;
dpos8 = 0;
Control Rate
int32_t g21 = (1 + (39 << 21)) << 4;

int32_t g22 = (1 + (36 << 21)) << 4;

int32_t g23 = (1 + (60 << 21)) << 4;

int32_t g24 = (1 + (25 << 21)) << 4;

int32_t g25 = (1 + (39 << 21)) << 4;

int32_t g26 = (1 + (36 << 21)) << 4;

int32_t g27 = (1 + (60 << 21)) << 4;

int32_t g28 = (1 + (25 << 21)) << 4;

int32_t ccompl1 = ((128 << 20) - param_mix);

int32_t ccompl2 = ((128 << 20) - param_mix);
Audio Rate
// On/Off //
int32_t OOL = (param_on) ? inlet_l : 0;
int32_t OOR = (param_on) ? inlet_r : 0;

// Feedback //
feedL = ___SMMUL(-feedLOUT << 3, param_feed << 2);
feedR = ___SMMUL(-feedROUT << 3, param_feed << 2);

// Left 1-4 //
int32_t dout1 = d1[dpos1] << 16;
int32_t din1 = ___SMMLA(g21, dout1, OOL + feedL >> 1);
d1[dpos1++] = din1 >> 15;
ATOB = ___SMMLS(g21, din1 << 1, dout1 >> 1) << 1;
if (dpos1 == 1035)
  dpos1 = 0;

int32_t dout2 = d2[dpos2] << 16;
int32_t din2 = ___SMMLA(g22, dout2, ATOB >> 1);
d2[dpos2++] = din2 >> 15;
BTOC = ___SMMLS(g22, din2 << 1, dout2 >> 1) << 1;
if (dpos2 == 1679)
  dpos2 = 0;

int32_t dout3 = d3[dpos3] << 16;
int32_t din3 = ___SMMLA(g23, dout3, BTOC >> 1);
d3[dpos3++] = din3 >> 15;
CTOD = ___SMMLS(g23, din3 << 1, dout3 >> 1) << 1;
if (dpos3 == 1943)
  dpos3 = 0;

int32_t dout4 = d4[dpos4] << 16;
int32_t din4 = ___SMMLA(g24, dout4, CTOD >> 1);
d4[dpos4++] = din4 >> 15;
feedLOUT = ___SMMLS(g24, din4 << 1, dout4 >> 1) << 1;
if (dpos4 == 3136)
  dpos4 = 0;

// Right 5-8 //
int32_t dout5 = d5[dpos5] << 16;
int32_t din5 = ___SMMLA(g25, dout5, OOR + feedR >> 1);
d5[dpos5++] = din5 >> 15;
ETOF = ___SMMLS(g25, din5 << 1, dout5 >> 1) << 1;
if (dpos5 == 1056)
  dpos5 = 0;

int32_t dout6 = d6[dpos6] << 16;
int32_t din6 = ___SMMLA(g26, dout6, ETOF >> 1);
d6[dpos6++] = din6 >> 15;
FTOG = ___SMMLS(g26, din6 << 1, dout6 >> 1) << 1;
if (dpos6 == 1687)
  dpos6 = 0;

int32_t dout7 = d7[dpos7] << 16;
int32_t din7 = ___SMMLA(g27, dout7, FTOG >> 1);
d7[dpos7++] = din7 >> 15;
GTOH = ___SMMLS(g27, din7 << 1, dout7 >> 1) << 1;
if (dpos7 == 1959)
  dpos7 = 0;

int32_t dout8 = d8[dpos8] << 16;
int32_t din8 = ___SMMLA(g28, dout8, GTOH >> 1);
d8[dpos8++] = din8 >> 15;
feedROUT = ___SMMLS(g28, din8 << 1, dout8 >> 1) << 1;
if (dpos8 == 2933)
  dpos8 = 0;

{
  int64_t a1 = (int64_t)feedLOUT * param_mix;
  a1 += (int64_t)inlet_l * ccompl1;
  outlet_l = a1 >> 27;
}

{
  int64_t a2 = (int64_t)feedROUT * param_mix;
  a2 += (int64_t)inlet_r * ccompl2;
  outlet_r = a2 >> 27;
}

Privacy

© 2024 Zrna Research