fraXOR

fraXOR. 4 inputs XOR distortion 8x oversampling with triangular window decimation.
Author: Smashed Transistors
License: LGPL
Github: tiar/dist/fraXOR.axo

Inlets

frac32buffer.bipolar w

frac32buffer.bipolar x

frac32buffer.bipolar y

frac32buffer.bipolar z

Outlets

frac32buffer out

Declaration
int32_t na, w, x, y, z;
Init
na = w = x = y = z = 0;
Audio Rate
// 8x oversampling with triangular window decimation

int32_t dw = ((inlet_w)-w) / 8;
int32_t dx = ((inlet_x)-x) / 8;
int32_t dy = ((inlet_y)-y) / 8;
int32_t dz = ((inlet_z)-z) / 8;
int32_t a;
{
  w += dw;
  x += dx;
  y += dy;
  z += dz;
  int32_t v = w ^ x ^ y ^ z;
  a = ___SMMLA((8 << 25), v, na);
  na = ___SMMUL((1 << 25), v);
}
{
  w += dw;
  x += dx;
  y += dy;
  z += dz;
  int32_t v = w ^ x ^ y ^ z;
  a = ___SMMLA((7 << 25), v, a);
  na = ___SMMLA((2 << 25), v, na);
}
{
  w += dw;
  x += dx;
  y += dy;
  z += dz;
  int32_t v = w ^ x ^ y ^ z;
  a = ___SMMLA((6 << 25), v, a);
  na = ___SMMLA((3 << 25), v, na);
}
{
  w += dw;
  x += dx;
  y += dy;
  z += dz;
  int32_t v = w ^ x ^ y ^ z;
  a = ___SMMLA((5 << 25), v, a);
  na = ___SMMLA((4 << 25), v, na);
}
{
  w += dw;
  x += dx;
  y += dy;
  z += dz;
  int32_t v = w ^ x ^ y ^ z;
  a = ___SMMLA((4 << 25), v, a);
  na = ___SMMLA((5 << 25), v, na);
}
{
  w += dw;
  x += dx;
  y += dy;
  z += dz;
  int32_t v = w ^ x ^ y ^ z;
  a = ___SMMLA((3 << 25), v, a);
  na = ___SMMLA((6 << 25), v, na);
}
{
  w += dw;
  x += dx;
  y += dy;
  z += dz;
  int32_t v = w ^ x ^ y ^ z;
  a = ___SMMLA((2 << 25), v, a);
  na = ___SMMLA((7 << 25), v, na);
}
{
  w += dw;
  x += dx;
  y += dy;
  z += dz;
  int32_t v = w ^ x ^ y ^ z;
  a = ___SMMLA((1 << 25), v, a);
  na = ___SMMLA((8 << 25), v, na);
}

outlet_out = a;

Privacy

© 2024 Zrna Research