fractalVI

Fractal VI. 8x oversampling with triangular window decimation
Author: Smashed Transistors
License: LGPL
Github: tiar/dist/fractalVI.axo

Inlets

frac32buffer.bipolar in

Outlets

frac32buffer out

Declaration
int32_t na, x;
int32_t f(int32_t x) { return ((x << 1) & (x >> 1)) ^ x; }
Init
na = x = 0;
Audio Rate
// 8x oversampling with triangular window decimation
int32_t dx = (abs(inlet_in) - x) / 8;
int32_t a;
{
  int32_t y = f(x += dx);
  a = ___SMMLA((8 << 25), y, na);
  na = ___SMMUL((1 << 25), y);
}
{
  int32_t y = f(x += dx);
  a = ___SMMLA((7 << 25), y, a);
  na = ___SMMLA((2 << 25), y, na);
}
{
  int32_t y = f(x += dx);
  a = ___SMMLA((6 << 25), y, a);
  na = ___SMMLA((3 << 25), y, na);
}
{
  int32_t y = f(x += dx);
  a = ___SMMLA((5 << 25), y, a);
  na = ___SMMLA((4 << 25), y, na);
}
{
  int32_t y = f(x += dx);
  a = ___SMMLA((4 << 25), y, a);
  na = ___SMMLA((5 << 25), y, na);
}
{
  int32_t y = f(x += dx);
  a = ___SMMLA((3 << 25), y, a);
  na = ___SMMLA((6 << 25), y, na);
}
{
  int32_t y = f(x += dx);
  a = ___SMMLA((2 << 25), y, a);
  na = ___SMMLA((7 << 25), y, na);
}
{
  int32_t y = f(x += dx);
  a = ___SMMLA((1 << 25), y, a);
  na = ___SMMLA((8 << 25), y, na);
}
outlet_out = inlet_in > 0 ? a : -a;

Privacy

© 2024 Zrna Research