fractalRing

FractalI. 8x oversampling with triangular window decimation.
Author: Smashed Transistors
License: LGPL
Github: tiar/osc/fractalRing.axo

Inlets

frac32buffer.bipolar in

Outlets

frac32buffer out

Declaration
int32_t na, x;
int32_t f(int32_t x) {
  return x ^ 0x02AAAAAA; // one in two bit inversion
}
Init
na = 0;
x = 0;
Audio Rate
// 8x oversampling with triangular window decimation
int32_t dx = (inlet_in + 0x02AAAAAA - 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 = a;

Privacy

© 2024 Zrna Research