wobbox

Author: Smashed Transistors
License: LGPL
Github: tiar/noise/wobbox.axo

Inlets

frac32.bipolar density

Outlets

frac32buffer.bipolar out

Parameters

frac32.u.map density

Declaration
float c = 64.0f;
float maxC = 0.0f;
int32_t acc, r1, r2, rm;
Init
rm = GenerateRandomNumber();
Control Rate
int32_t jitter = (1 << 27) - __USAT(param_density + inlet_density, 27);
jitter = (___SMMUL(jitter, jitter) << 7);
Audio Rate
if (c >= maxC) {
  c = 0.0f;
  maxC = arm::q_to_float(___SMMUL(jitter, GenerateRandomNumber()), 20) + 1.0f;
  rm = -1511872763 * (rm - 1);
  r1 = r2 = rm;
  acc = 0;
}

c += 1.0f;
float _c = 1 / c;

// box add and substract
r1 = r1 * 69069 + 1;
acc -= r1 >> 16;
r2 = r2 * 69069 + 1;
acc += r2 >> 16;

// addition to the box
r2 = r2 * 69069 + 1;
acc += r2 >> 16;

outlet_out = arm::float_to_q(acc * _c, 27 - 15);

Privacy

© 2024 Zrna Research