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

◆ compute_delay_length()

void MayaFlux::Nodes::Network::WaveguideNetwork::compute_delay_length ( )
private

Definition at line 128 of file WaveguideNetwork.cpp.

129{
130 const double passes = (m_type == WaveguideType::TUBE) ? 4.0 : 1.0;
131 double total_delay = static_cast<double>(m_sample_rate) / (passes * m_fundamental);
132
133 total_delay -= 0.5;
134
135 m_delay_length_integer = static_cast<size_t>(total_delay);
136 m_delay_length_fraction = total_delay - static_cast<double>(m_delay_length_integer);
137
138 m_pickup_sample = static_cast<size_t>(m_pickup_position * static_cast<double>(m_delay_length_integer));
139}
@ TUBE
Cylindrical bore (future: clarinet, flute)

References m_delay_length_fraction, m_delay_length_integer, m_fundamental, m_pickup_position, m_pickup_sample, MayaFlux::Nodes::Network::NodeNetwork::m_sample_rate, m_type, and TUBE.

Referenced by initialize(), set_fundamental(), and WaveguideNetwork().

+ Here is the caller graph for this function: