SK35

Author: Smashed Transistors
License: LGPL
Github: tiar/filter/SK35.axo

Inlets

frac32buffer filter input

frac32 pitch

frac32 filter resonance

Outlets

frac32buffer filter output

Parameters

frac32.u.map Q

frac32.s.map.pitch pitch

Declaration
float a, k, u, y;
Init
u = y = 0;
Control Rate
k = __USAT(param_Q + inlet_reso, 27) * (15.0f / (1 << 27));
k = 2.0f - 1.0f / (0.1f * k * k + 0.5f) + 0.00003f * k * k * k;

uint32_t alpha;
MTOFEXTENDED(param_pitch + inlet_pitch - (530 << 14), alpha);
a = arm::q_to_float(alpha, 32);
Audio Rate
float x = arm::q_to_float(inlet_x, 27);
// _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
if (y > 2)
  y = 2;
else if (y < -1.5)
  y = -1.5;
if (u > 3)
  u = 3;
else if (u < -8)
  u = -8;
for (int i = 0; i < 8; i++) {
  u += a * (x - u - k * y);
  y += a * (u + (k - 1) * y);
}
outlet_lp12 = arm::float_to_q(y, 27);

Privacy

© 2024 Zrna Research