nativeSine

sine wave oscillator with "active" control
Author: Johannes Taelman (editted by Remco van der Most)
License: BSD
Github: sss/osc/nativeSine.axo

Inlets

bool32 active

frac32.bipolar pitch

frac32buffer frequency

frac32buffer phase

Outlets

frac32buffer.bipolar sine wave

Parameters

frac32.s.map.pitch pitch

Declaration
uint32_t Phase;
Init
Phase = 0;
Control Rate
int32_t freq;
MTOFEXTENDED(param_pitch + inlet_pitch, freq);
Audio Rate
if (inlet_active > 0) {
  Phase += freq + inlet_freq;
  int32_t r;
  int32_t p2 = Phase + (inlet_phase << 4);
  SINE2TINTERP(p2, r)
  outlet_wave = (r >> 4);
} else
  outlet_wave = 0;

Privacy

© 2024 Zrna Research