class
SushiDSP::ParameterTable
template <typename Node, std::size_t kCount>A node's whole parameter surface, in index order.
- Declared in
include/SushiDSP/core/ParameterTable.hpp
The order is a contract: a host addresses parameters by index and a saved preset reads them back by index, so rows are appended, never reordered or removed. Holding the descriptor and the two accessors in one row is what stops the three from drifting apart.
Public member functions
explicit ParameterTable(const std::array< ParameterBinding< Node >, kCount > &rows)Parameters
rowsThe node's parameters, in the order a host addresses them.
void write(Node &node, const char *id, float value) constWrites a parameter found by its id.
Control thread only: the lookup compares strings.
Parameters
nodeThe node to write to.
idThe parameter's id; an unrecognised id is a no-op.
valueThe value to write.
void write(Node &node, std::uint16_t index, float value) constWrites a parameter by index.
Audio-thread safe: an index is a subscript.
Parameters
nodeThe node to write to.
indexIndex into the table; out of range is a no-op.
valueThe value to write.
float read(const Node &node, const char *id) constReads a parameter found by its id.
Control thread only.
Parameters
nodeThe node to read from.
idThe parameter's id.
Returns
What the node holds, or 0 for an unrecognised id.
const ParameterDescriptor * descriptors() const noexceptThe descriptor rows, contiguous, for a NodeDescriptor to point at.
Returns
The first of count() descriptors.
std::uint16_t count() const noexceptHow many parameters the table holds.
Returns
The row count, which is also the count a NodeDescriptor declares.

