saw_dn_p

Saw wave LFO, falling, unipolar, pitch input, phase reset
Author: Are Leistad
License: BSD
Github: drj/lfo/saw.axo

IO Variants: 4


Variant: 1

Inlets

bool32.rising Reset phase

frac32.bipolar Pitch input

Outlets

frac32.positive Saw wave

Parameters

frac32.s.map.lfopitch pitch

Declaration
uint32_t phase;
uint32_t old_reset;
Init
phase = 0;
old_reset = 0;
Control Rate
if (inlet_reset && !old_reset) {
  phase = 0;
} else {
  int32_t freq;
  MTOFEXTENDED(param_pitch + inlet_pitch, freq);
  phase += freq >> 2;
}
old_reset = inlet_reset;

outlet_saw = (1 << 27) - (phase >> 5);

Variant: 2

Inlets

frac32.bipolar Pitch input

bool32.rising Reset phase

Outlets

frac32.bipolar Saw wave

Parameters

frac32.s.map.lfopitch pitch

Declaration
uint32_t phase;
uint32_t old_reset;
Init
phase = 0;
old_reset = 0;
Control Rate
if (inlet_reset && !old_reset) {
  phase = 0;
} else {
  int32_t freq;
  MTOFEXTENDED(param_pitch + inlet_pitch, freq);
  phase += freq >> 2;
}
old_reset = inlet_reset;

outlet_saw = (1 << 27) - (phase >> 4);

Variant: 3

Inlets

frac32.bipolar Pitch input

bool32.rising Reset phase

Outlets

frac32.positive Saw wave

Parameters

frac32.s.map.lfopitch pitch

Declaration
uint32_t phase;
uint32_t old_reset;
Init
phase = 0;
old_reset = 0;
Control Rate
if (inlet_reset && !old_reset) {
  phase = 0;
} else {
  int32_t freq;
  MTOFEXTENDED(param_pitch + inlet_pitch, freq);
  phase += freq >> 2;
}
old_reset = inlet_reset;

outlet_saw = (phase >> 5);

Variant: 4

Inlets

frac32.bipolar Pitch input

bool32.rising Reset phase

Outlets

frac32.bipolar Saw wave

Parameters

frac32.s.map.lfopitch pitch

Declaration
uint32_t phase;
uint32_t old_reset;
Init
phase = 0;
old_reset = 0;
Control Rate
if (inlet_reset && !old_reset) {
  phase = 0;
} else {
  int32_t freq;
  MTOFEXTENDED(param_pitch + inlet_pitch, freq);
  phase += freq >> 2;
}
old_reset = inlet_reset;

outlet_saw = (phase >> 4) - (1 << 27);

Privacy

© 2024 Zrna Research