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

◆ process_unidirectional()

void MayaFlux::Nodes::Network::WaveguideNetwork::process_unidirectional ( WaveguideSegment &  seg,
unsigned int  num_samples,
std::vector< double > &  out 
)
private

Definition at line 229 of file WaveguideNetwork.cpp.

231{
232 const bool continuous = m_exciter_active
234 const double continuous_gain = continuous
235 ? 1.0 / seg.loss_factor
236 : 1.0;
237 DriveLimiter limiter(m_delay_length_integer);
238
239 for (unsigned int i = 0; i < num_samples; ++i) {
240 const double exciter = generate_exciter_sample();
241
242 const double delayed = read_with_interpolation(
244
245 const double filtered = (!continuous && seg.loop_filter)
246 ? seg.loop_filter->process_sample(delayed)
247 : delayed;
248
249 const double returning = filtered * seg.loss_factor * seg.reflection_closed * continuous_gain;
250 const double drive = continuous ? exciter * limiter.gain(seg) : exciter;
251
252 seg.p_plus.push(drive + returning);
253
254 out[i] = observe_sample(seg);
255 }
256}
std::vector< float > * out
double observe_sample(const WaveguideSegment &seg) const
double read_with_interpolation(const Memory::HistoryBuffer< double > &delay, size_t integer_part, double fraction) const
Read from delay line with linear fractional interpolation.
@ CONTINUOUS
External node as continuous exciter (bowing)

References CONTINUOUS, generate_exciter_sample(), MayaFlux::Nodes::Network::WaveguideNetwork::WaveguideSegment::loop_filter, MayaFlux::Nodes::Network::WaveguideNetwork::WaveguideSegment::loss_factor, m_delay_length_fraction, m_delay_length_integer, m_exciter_active, m_exciter_node, m_exciter_type, observe_sample(), out, MayaFlux::Nodes::Network::WaveguideNetwork::WaveguideSegment::p_plus, MayaFlux::Memory::HistoryBuffer< T >::push(), read_with_interpolation(), and MayaFlux::Nodes::Network::WaveguideNetwork::WaveguideSegment::reflection_closed.

Referenced by process_batch().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: