|
DSPark 1.8.0
Header-only C++20 DSP for real-time and offline audio
|
N-port R-type adaptor for non-series/parallel interconnections. More...
#include <WDF.h>
Public Member Functions | |
| RType (const std::array< std::pair< int, int >, static_cast< size_t >(kNumPorts)> &portNodes, int numNodes, Children &... children) noexcept | |
| void | prepare (double sampleRate) noexcept |
| void | updatePorts () noexcept |
| void | reset () noexcept |
| double | portResistance () const noexcept |
| T | reflected () noexcept |
| void | incident (T aUp) noexcept |
Static Public Attributes | |
| static constexpr int | kNumPorts = static_cast<int>(sizeof...(Children)) + 1 |
| static constexpr int | kMaxNodes = 12 |
Friends | |
| template<FloatType > | |
| class | ToneStackFMV |
N-port R-type adaptor for non-series/parallel interconnections.
Port 0 faces up (toward the root) and is adapted: its resistance is set to the Thevenin resistance seen into the network, making S(0,0) = 0. Ports 1..N-1 connect the children, in declaration order. The topology is a list of (node+, node-) pairs over a small node graph (-1 = ground reference).
On every updatePorts() the scattering matrix is rebuilt from Modified Nodal Analysis with the children's current port resistances – O(nodes^3), a few microseconds for typical circuits, fine for pot automation.
| T | Sample type of the wave interface. |
| Children | Child node types, one per port 1..N-1. |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
staticconstexpr |
|
staticconstexpr |