phasor_pm_pr_b

Phasor with phase and phase reset inputs, bipolar, s-rate
Author: Are Leistad
License: BSD
Github: drj/osc/saw_sin_pr.axo

IO Variants: 4


Variant: 1

Inlets

bool32.rising phase reset input

frac32.bipolar Pitch input

frac32buffer.bipolar phase input

Outlets

frac32buffer.bipolar Phasor output

Parameters

frac32.s.map.pitch pitch

Declaration
uint32_t phase;
int32_t old_reset;
int32_t freq;
Init
phase = 0;

phase = 0;
old_reset = 0;
Control Rate
MTOFEXTENDED(param_pitch + inlet_pitch, freq);
Audio Rate
if (inlet_reset && !old_reset) {
  phase = 0;
} else {
  phase += freq;
}
old_reset = inlet_reset;

outlet_out = ((phase + (inlet_phase << 4)) >> 4) - (1 << 27);

Variant: 2

Inlets

frac32.bipolar Pitch input

frac32buffer.bipolar phase input

bool32.rising phase reset input

Outlets

frac32buffer.positive Phasor output

Parameters

frac32.s.map.pitch pitch

Declaration
uint32_t phase;
int32_t old_reset;
int32_t freq;
Init
phase = 0;

phase = 0;
old_reset = 0;
Control Rate
MTOFEXTENDED(param_pitch + inlet_pitch, freq);
Audio Rate
if (inlet_reset && !old_reset) {
  phase = 0;
} else {
  phase += freq;
}
old_reset = inlet_reset;

outlet_out = (phase + (inlet_phase << 4)) >> 5;

Variant: 3

Inlets

frac32.bipolar Pitch input

frac32buffer.bipolar phase input

bool32.rising phase reset input

Outlets

frac32buffer.bipolar Sine output

Parameters

frac32.s.map.pitch pitch

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

int32_t sine;
SINE2TINTERP(phase + (inlet_phase << 4), sine)
outlet_out = (sine >> 4);

Variant: 4

Inlets

bool32.rising phase reset input

frac32.bipolar Pitch input

frac32buffer.bipolar phase input

Outlets

frac32buffer.positive Sine output

Parameters

frac32.s.map.pitch pitch

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

int32_t sine;
SINE2TINTERP(phase + (inlet_phase << 4), sine)
outlet_out = (sine >> 5) + (1 << 26);

Privacy

© 2024 Zrna Research