Accumulates causal minBLEP corrections for discontinuities found between adjacent output samples.
More...
template<std::size_t MaximumEvents = 8>
class pulp::signal::osc::MinBlepAccumulator< MaximumEvents >
Accumulates causal minBLEP corrections for discontinuities found between adjacent output samples.
insert(position, height) receives a position in [0, 1], measured after the sample most recently returned by next(), and a step height measured as after minus before. The correction is added to the already-stepped trivial waveform beginning with subsequent next() calls. Position 0 means the event occurred immediately after the previous output sample; position 1 means the next output sample lands exactly on the event.
The table follows Brandt's minimum-phase construction: a Blackman-windowed sinc is transformed through its real cepstrum, integrated, normalized, and stored as the residual from an already-applied unit step. The reproducible generator is tools/scripts/generate_minblep_table.py; the primary method reference is https://www.cs.cmu.edu/~eli/papers/icmc01-hardsync.pdf.
Each insertion occupies one of MaximumEvents slots for at most 32 samples. Slots are chosen and summed in ascending index order. If every slot is live, the new event is dropped with capacity_exceeded; existing corrections are unchanged. Per-sample work is therefore fixed at MaximumEvents, with no allocation, locks, I/O, or table initialization on the audio thread.