OSC-WT (lo-fi tier): a dedicated variable-clock zero-order-hold wavetable oscillator. More...
#include <pulp/signal/windowed_sinc_design.hpp>#include <algorithm>#include <cmath>#include <cstddef>#include <span>#include <utility>#include <vector>Go to the source code of this file.
Classes | |
| class | pulp::signal::osc::LofiWtOscillator |
| Dedicated variable-clock ZOH wavetable oscillator (the lo-fi tier). More... | |
Namespaces | |
| namespace | pulp |
| namespace | pulp::signal |
| namespace | pulp::signal::osc |
OSC-WT (lo-fi tier): a dedicated variable-clock zero-order-hold wavetable oscillator.
It plays a raw short single-cycle table with NEAREST/ZOH lookup at a playback clock that tracks pitch (fs_play = f0 · L), so its spectral-image ladder rides at n · L · f0 and moves with the note. That pitch-tracking image ladder IS the lo-fi sound — and it is exactly what a fixed-rate, band-limited, linearly-interpolated wavetable engine cannot produce — which is why this is a separate engine, not a mode of WtOscillator / WavetableT.
── Why a dedicated engine, decided by measurement ────────────────────────
The wavetable-architecture question was settled by rendering both candidates and comparing each spectrum to the analytic variable-clock-ZOH image ladder:
So the modern tier extends WavetableT (wt.hpp) and the lo-fi tier is this separate class. The two tiers deliberately diverge on every axis the modern tier cleans up: ZOH vs interpolation, raw table vs band-limited, and a HARD (stepped) scan vs the modern tier's slewed, zipper-free scan.
── The five lo-fi mechanisms, each a measurable property ─────────────────
── No factory content ────────────────────────────────────────────────────
This engine ships NO wavetable data. The caller supplies the raw table(s); the model reproduces the playback engine's character, never its wave content.
── RT contract ────────────────────────────────────────────────────────────
set_tables, set_oversample_factor, set_reconstruction, and prepare allocate / rebuild the reconstruction filter and run off the audio thread. set_scan, reset, and next allocate nothing, lock nothing, and perform no I/O. double throughout the reader; the table can be lower precision but is stored as double after quantization.