MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ process()

void MayaFlux::Nodes::Network::DeriveOperator::process ( float  dt)
overridevirtual

Process for one batch cycle.

Parameters
dtTime delta or sample count (operator-specific)

Implements MayaFlux::Nodes::Network::NetworkOperator.

Definition at line 130 of file RelationOperators.cpp.

131{
132 if (!m_kernel) {
133 return;
134 }
135
136 const auto num_frames = static_cast<uint32_t>(frames);
137 auto all = slots();
138 auto& target = all[m_target];
139 auto out = target.prepare_block(num_frames);
140
141 for (uint32_t frame = 0; frame < num_frames; ++frame) {
142 for (size_t i = 0; i < m_inputs.size(); ++i) {
143 const size_t input_index = m_inputs[i];
144 if (input_index == m_target) {
145 m_values[i] = frame == 0 ? target.level : out[frame - 1];
146 } else {
147 m_values[i] = all[input_index].block.size() > frame
148 ? all[input_index].block[frame]
149 : all[input_index].level;
150 }
151 }
153 if (m_gate) {
154 target.set_active(out[frame] > 0.5);
155 }
156 }
157
158 if (num_frames > 0) {
159 target.level = out[num_frames - 1];
160 }
161}
std::vector< float > * out
std::span< RelationSlot > slots() const noexcept

References m_coefficients, m_gate, m_inputs, m_kernel, m_target, m_values, out, and MayaFlux::Nodes::Network::RelationOperator::slots().

+ Here is the call graph for this function: