3AMShape

3x AM sine shaper
Author: Remco van der Most
License: BSD
Github: sss/osc/3AMShape.axo

Inlets

frac32buffer a

frac32 rate1

frac32 rate2

frac32 rate3

frac32 phase1

frac32 phase2

frac32 phase3

Outlets

frac32buffer.positive quant(a)

Audio Rate
int32_t sine;
int32_t window;

int32_t sina;
int32_t base = (inlet_phaseA + inlet_phase1) & ((1 << 27) - 1);
SINE2TINTERP(((base) >> 8) * (inlet_rate1 >> 8), sine)
HANNING2TINTERP((base) << 6, window)
sina = ___SMMUL(sine >> 3, window >> 2);

base = (inlet_phaseA + inlet_phase2) & ((1 << 27) - 1);
int32_t sinb;
SINE2TINTERP(((___SMMUL(base << 3, sina << 2)) >> 8) * (inlet_rate2 >> 8), sine)
HANNING2TINTERP((base) << 6, window)

sinb = ___SMMUL(sine >> 3, window >> 2);

base = (inlet_phaseA + inlet_phase3) & ((1 << 27) - 1);
int32_t sinc;
SINE2TINTERP(((___SMMUL(base << 3, sinb << 2)) >> 8) * (inlet_rate3 >> 8), sine)
HANNING2TINTERP((base) << 6, window)

sinc = ___SMMUL(sine >> 3, window >> 2);

int32_t sind;
SINE2TINTERP(___SMMUL(___SMMUL(sina << 4, sinb << 3) << 5, sinc << 5) << 5,
             sind);
outlet_out = sind >> 6;

Privacy

© 2024 Zrna Research