Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::signal::WaveguideJunctionT< SampleType, MaxPorts > Class Template Reference

A bounded N-port pressure-wave scattering junction. More...

#include <waveguide_junction.hpp>

Public Member Functions

 WaveguideJunctionT ()
void set_port_count (std::size_t count) noexcept
std::size_t port_count () const noexcept
void set_impedance (std::size_t port_index, SampleType impedance) noexcept
SampleType impedance (std::size_t port_index) const noexcept
bool scatter (const SampleType *incoming, SampleType *outgoing, std::size_t count) noexcept
 Scatters one incoming pressure wave per active port.
void reset () noexcept

Static Public Attributes

static constexpr double minimum_impedance = 1.0e-6

Detailed Description

template<typename SampleType = float, std::size_t MaxPorts = 4>
class pulp::signal::WaveguideJunctionT< SampleType, MaxPorts >

A bounded N-port pressure-wave scattering junction.

The characteristic impedances are positive dimensionless ratios. scatter permits exact input/output aliasing and uses double/long-double arithmetic internally. Every operation is bounded, lock-free, and allocation-free.

Constructor & Destructor Documentation

◆ WaveguideJunctionT()

template<typename SampleType = float, std::size_t MaxPorts = 4>
pulp::signal::WaveguideJunctionT< SampleType, MaxPorts >::WaveguideJunctionT ( )
inline

Member Function Documentation

◆ impedance()

template<typename SampleType = float, std::size_t MaxPorts = 4>
SampleType pulp::signal::WaveguideJunctionT< SampleType, MaxPorts >::impedance ( std::size_t port_index) const
inlinenodiscardnoexcept

◆ port_count()

template<typename SampleType = float, std::size_t MaxPorts = 4>
std::size_t pulp::signal::WaveguideJunctionT< SampleType, MaxPorts >::port_count ( ) const
inlinenodiscardnoexcept

◆ reset()

template<typename SampleType = float, std::size_t MaxPorts = 4>
void pulp::signal::WaveguideJunctionT< SampleType, MaxPorts >::reset ( )
inlinenoexcept

◆ scatter()

template<typename SampleType = float, std::size_t MaxPorts = 4>
bool pulp::signal::WaveguideJunctionT< SampleType, MaxPorts >::scatter ( const SampleType * incoming,
SampleType * outgoing,
std::size_t count )
inlinenodiscardnoexcept

Scatters one incoming pressure wave per active port.

count must equal the configured port count. Invalid arguments return false without writing through unknown pointers. A non-finite incoming sample returns the previous finite output vector and does not update it.

◆ set_impedance()

template<typename SampleType = float, std::size_t MaxPorts = 4>
void pulp::signal::WaveguideJunctionT< SampleType, MaxPorts >::set_impedance ( std::size_t port_index,
SampleType impedance )
inlinenoexcept

◆ set_port_count()

template<typename SampleType = float, std::size_t MaxPorts = 4>
void pulp::signal::WaveguideJunctionT< SampleType, MaxPorts >::set_port_count ( std::size_t count)
inlinenoexcept

Member Data Documentation

◆ minimum_impedance

template<typename SampleType = float, std::size_t MaxPorts = 4>
double pulp::signal::WaveguideJunctionT< SampleType, MaxPorts >::minimum_impedance = 1.0e-6
staticconstexpr

The documentation for this class was generated from the following file: