Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::signal::osc::PhaseEvent Struct Reference

A single phase discontinuity within one sample period. More...

#include <phase.hpp>

Public Attributes

double frac = 0.0
 Sub-sample position of the discontinuity, relative to the start of the sample being advanced.
double phase_before = 0.0
double phase_after = 0.0
PhaseEventKind kind = PhaseEventKind::wrap_forward

Detailed Description

A single phase discontinuity within one sample period.

frac locates the discontinuity in sub-sample time; phase_before and phase_after give the jump. A discontinuity-correction stage needs all three: the waveform step it must cancel is shape(phase_after) - shape(phase_before), applied at frac.

For a wrap the endpoints are exact by construction (the crossing is the domain boundary), so they carry no information the kind does not. They are still populated so that a corrector can treat wraps and syncs — whose jump is arbitrary — with one code path.

Member Data Documentation

◆ frac

double pulp::signal::osc::PhaseEvent::frac = 0.0

Sub-sample position of the discontinuity, relative to the start of the sample being advanced.

See PhaseAccumulator for the exact range.

◆ kind

PhaseEventKind pulp::signal::osc::PhaseEvent::kind = PhaseEventKind::wrap_forward

◆ phase_after

double pulp::signal::osc::PhaseEvent::phase_after = 0.0

◆ phase_before

double pulp::signal::osc::PhaseEvent::phase_before = 0.0

The documentation for this struct was generated from the following file:
  • /home/runner/work/pulp/pulp/core/signal/include/pulp/signal/osc/phase.hpp