class
SushiDSP::AntiderivativeAntialiaser
First-order antiderivative antialiasing of one grid-and-plate stage, evaluated in the grid's own coordinate u = Vg - Vk: y = (G(u1) - G(u0)) / (g(u1) - g(u0)), where g(u) is the input that puts the grid at u and G is the antiderivative of the plate output with respect to that input.
- Declared in
include/SushiDSP/circuits/stages/AntiderivativeAntialiaser.hpp
The tables are filled at construction and only read afterwards. Derived in docs/archive/superpowers/specs/2026-09-07-grid-knee-antialiasing-design.md section 15.
Static public attributes
static constexpr double kMinimumInputDifferenceVolts = 1.0e-4The input difference under which the divided difference gives way to the transfer at the midpoint; both branches agree to under 1e-7 V there.
static constexpr double kWindowTransitions = 24.0The half-width of the tabulated knee, in transition widths; the logistic is within 4e-11 of 0 or 1 outside it.
static constexpr std::size_t kIntervalsPerTransition = 16Knot intervals per transition width inside the tabulated knee.
static constexpr std::size_t kKnotCount = 2 * static_cast<std::size_t>(kWindowTransitions) * kIntervalsPerTransition + 1Knots in the knee table, one more than its intervals.
static constexpr double kPlateReach = 10.0The half-width of the tabulated plate antiderivative on each side, in units of that side's tanh scale H / gain; the solver's grid bounds sit at the same reach.
static constexpr std::size_t kIntervalsPerPlateScale = 64Knot intervals per tanh scale inside the plate table.
static constexpr std::size_t kPlateKnotCount = static_cast<std::size_t>(kPlateReach) * kIntervalsPerPlateScale + 1Knots on each side of the plate table, the rest knot included.
Public member functions
AntiderivativeAntialiaser(float source_resistance_ohms, float grid_leak_resistance_ohms, float cathode_bias_volts, float gain, const GridConductionLaw &grid_conduction, const PlateSwing &plate_swing)Builds the antialiaser for the stage the same six constants describe.
Parameters
source_resistance_ohmsEffective source resistance feeding the grid.
grid_leak_resistance_ohmsThe grid-leak resistor to the cathode-bias voltage.
cathode_bias_voltsThe grid's DC voltage against the cathode at rest.
gainThe inverting linear gain from grid to plate.
grid_conductionThe grid-current law's three constants.
plate_swingThe two headroom figures that bound the plate output.
Precondition
gain > 0, grid_conduction.transition_volts > 0, both headrooms > 0.
float process(float grid_excursion_volts)Returns the antialiased plate output for this sample's grid excursion.
Parameters
grid_excursion_voltsVg - Vk as the stage's solver returned it.
Returns
The plate output in volts, inside the plate swing. Always finite.
void reset()Drops the previous sample, so the next one is the plain transfer.
double input_for_excursion(double excursion) constReturns the stage input that puts the grid at the given excursion, g(u).
double antiderivative(double excursion) constReturns the antiderivative of the plate output with respect to the input, G(u).
double transfer(double excursion) constReturns the plate output at one excursion through the table the antiderivative uses, G'(u) / g'(u).

