fractalIII

Fractal III. Bit pairs inversion 8x oversampling with triangular window decimation
Author: Smashed Transistors
License: LGPL
Github: tiar/dist/fractalIII.axo

Inlets

frac32buffer.bipolar in

Outlets

frac32buffer out

Declaration
int32_t na, x;
int32_t f(int32_t x) {
  return (0x55555555 & (x >> 1)) | (0xAAAAAAAA & (x << 1)); // bit swap by pairs
}
Init
na = x = 0;
Audio Rate
// 8x oversampling with triangular window decimation
int32_t dx = (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 = a;

Privacy

© 2024 Zrna Research