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 |
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.
| 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.
| PhaseEventKind pulp::signal::osc::PhaseEvent::kind = PhaseEventKind::wrap_forward |
| double pulp::signal::osc::PhaseEvent::phase_after = 0.0 |
| double pulp::signal::osc::PhaseEvent::phase_before = 0.0 |