phasor

saw wave signal-rate LFO, rising slope, frequency input.lets call it 'phasor'.copy-pasted from 'lfo/saw lin' by Johannes.
Author: robert schirmer
License: who cares
Github: rbrt/osc/phasor.axo

Inlets

frac32 frequency

bool32.rising reset phase

Outlets

frac32buffer wave

Declaration
uint32_t Phase;
uint32_t r;
Init
Phase = 0;
r = 1;
Audio Rate
{
  if (inlet_reset && r) {
    Phase = 0;
    r = 0;
  } else {
    if (!inlet_reset)
      r = 1;
    Phase += inlet_freq >> 6;
  }
  outlet_wave = (Phase >> 5);
}

Privacy

© 2024 Zrna Research