fractalI

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

Inlets

frac32buffer.bipolar in

Outlets

frac32buffer out

Parameters

frac32.s.map offset

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

Privacy

© 2024 Zrna Research