Contents

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-4

The 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.0

The 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 = 16

Knot intervals per transition width inside the tabulated knee.

static constexpr std::size_t kKnotCount = 2 * static_cast<std::size_t>(kWindowTransitions) * kIntervalsPerTransition + 1

Knots in the knee table, one more than its intervals.

static constexpr double kPlateReach = 10.0

The 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 = 64

Knot intervals per tanh scale inside the plate table.

static constexpr std::size_t kPlateKnotCount = static_cast<std::size_t>(kPlateReach) * kIntervalsPerPlateScale + 1

Knots 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_ohms

Effective source resistance feeding the grid.

grid_leak_resistance_ohms

The grid-leak resistor to the cathode-bias voltage.

cathode_bias_volts

The grid's DC voltage against the cathode at rest.

gain

The inverting linear gain from grid to plate.

grid_conduction

The grid-current law's three constants.

plate_swing

The 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_volts

Vg - 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) const

Returns the stage input that puts the grid at the given excursion, g(u).

double antiderivative(double excursion) const

Returns the antiderivative of the plate output with respect to the input, G(u).

double transfer(double excursion) const

Returns the plate output at one excursion through the table the antiderivative uses, G'(u) / g'(u).