template<int MaxSlots = 32, typename SampleType = float>
struct pulp::signal::ModMatrixT< MaxSlots, SampleType >
- Template Parameters
-
| MaxSlots | routing capacity. Fixed so the matrix stays POD. |
template<int MaxSlots = 32, typename SampleType = float>
| void pulp::signal::ModMatrixT< MaxSlots, SampleType >::evaluate |
( |
std::span< const SampleType > | sources, |
|
|
std::span< SampleType > | dests ) const |
|
inline |
Accumulate every active routing into dests.
dests[d] += sources[s] * depth * (via < 0 ? 1 : sources[via]).
The caller owns dests: zero it (or seed it with the unmodulated base values) before calling, and clamp it in destination units afterwards.
A stale routing left over from a larger source or destination list can never read out of bounds, but the two cases differ deliberately. An out-of-range source or dest skips the slot — the routing has nowhere to come from or go to. An out-of-range via instead leaves the depth unmodulated, because via scales a routing rather than defining it, and silently dropping the whole routing is the worse failure of the two.