glob

cos sin rotation
Author: Smashed Transistors
License: LGPL
Github: tiar/pata/glob kr.axo

Inlets

frac32buffer r

frac32buffer i

frac32 theta

Outlets

frac32buffer r

frac32buffer i

Parameters

frac32.u.map theta

Declaration
int32_t c;
int32_t s;
Init
c = 0x7FFFFFFF;
s = 0;
Control Rate
int32_t ds, dc;
{
  uint32_t t = ((param_theta + inlet_theta) & 0x07FFFFFF) << 5;
  int32_t a = (t & ((1 << 20) - 1)) << 8; // q28
  uint32_t i = t >> 20;
  //     q27    q28    q31                            q27    q27   16steps
  ds = (___SMMLA(a, sine2t[i + 1] - sine2t[i], sine2t[i] >> 4) - s) >> 4;
  i = (i + 1024) & 4095;
  dc = (___SMMLA(a, sine2t[i + 1] - sine2t[i], sine2t[i] >> 4) - c) >> 4;
}
Audio Rate
c += dc;
s += ds;
outlet_r = ___SMMLS(inlet_i, s, ___SMMUL(inlet_r, c)) << 5;
outlet_i = ___SMMLA(inlet_i, c, ___SMMUL(inlet_r, s)) << 5;

Privacy

© 2024 Zrna Research