rot

cos sin rotation
Author: Smashed Transistors
License: LGPL
Github: tiar/FDN/rot.axo

Inlets

frac32buffer r

frac32buffer i

Outlets

frac32buffer r

frac32buffer i

Parameters

frac32.u.map theta

Declaration
int32_t sin2t_q27(uint32_t p) {
  int32_t a = (p & ((1 << 20) - 1)) << 8; // q28
  uint32_t i = p >> 20;
  return ___SMMLA(a, sine2t[i + 1] - sine2t[i], sine2t[i] >> 4);
}
int32_t cos2t_q27(uint32_t p) { return sin2t_q27(p + (1UL << 30)); }
Control Rate
uint32_t a = (param_theta & 0x07FFFFFF) << 5;
int32_t c = cos2t_q27(a);
int32_t s = sin2t_q27(a);
Audio Rate
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