Sound Byte Libs 0.5.1-121-g3358a44
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
Loading...
Searching...
No Matches
sbl::dsp::pm::LoadJunction< Load > Class Template Reference

The scattering junction between a waveguide and a lumped load. More...

Detailed Description

template<typename Load>
class sbl::dsp::pm::LoadJunction< Load >

The scattering junction between a waveguide and a lumped load.

Template Parameters
Loadanything with admittance(), history() and commit(force): the velocity it produces for a force, split into an instantaneous part and a history part.
Note
All public methods are ISR-safe — bounded computation, no I/O.

Definition at line 57 of file load_junction.hpp.

#include <load_junction.hpp>

Inheritance diagram for sbl::dsp::pm::LoadJunction< Load >:
[legend]

Public Member Functions

 LoadJunction (Load &load)
 
void set_impedance (float z)
 
float impedance () const
 
float reflect (float incoming)
 Scatter one sample: the wave arriving at the bridge in, the reflection out.
 
float load_velocity () const
 The body's velocity at the junction this sample — what it radiates, to first order.
 
float force () const
 The force the string put into the body this sample.
 
Load & load ()
 
const Load & load () const
 
float energy () const
 The junction stores nothing itself; what is behind it does.
 
void reset ()
 
diagram::Ports describe (diagram::Graph &g, uint8_t parent) const
 The junction and its load, wired: force into the load, velocity back.
 

Constructor & Destructor Documentation

◆ LoadJunction()

template<typename Load >
sbl::dsp::pm::LoadJunction< Load >::LoadJunction ( Load &  load)
inlineexplicit

Definition at line 61 of file load_junction.hpp.

Member Function Documentation

◆ set_impedance()

template<typename Load >
void sbl::dsp::pm::LoadJunction< Load >::set_impedance ( float  z)
inline

The wave impedance of the guide this junction terminates: the load's g and h are physical, the waves are the guide's.

Definition at line 65 of file load_junction.hpp.

◆ impedance()

template<typename Load >
float sbl::dsp::pm::LoadJunction< Load >::impedance ( ) const
inline

Definition at line 66 of file load_junction.hpp.

◆ reflect()

template<typename Load >
float sbl::dsp::pm::LoadJunction< Load >::reflect ( float  incoming)
inline

Scatter one sample: the wave arriving at the bridge in, the reflection out.

The force found here is committed to the load, so load_velocity() and force() read this sample's values afterwards.

Definition at line 74 of file load_junction.hpp.

◆ load_velocity()

template<typename Load >
float sbl::dsp::pm::LoadJunction< Load >::load_velocity ( ) const
inline

The body's velocity at the junction this sample — what it radiates, to first order.

Definition at line 85 of file load_junction.hpp.

◆ force()

template<typename Load >
float sbl::dsp::pm::LoadJunction< Load >::force ( ) const
inline

The force the string put into the body this sample.

Definition at line 88 of file load_junction.hpp.

◆ load() [1/2]

template<typename Load >
Load & sbl::dsp::pm::LoadJunction< Load >::load ( )
inline

Definition at line 90 of file load_junction.hpp.

Referenced by sbl::dsp::pm::LoadJunction< Load >::describe().

◆ load() [2/2]

template<typename Load >
const Load & sbl::dsp::pm::LoadJunction< Load >::load ( ) const
inline

Definition at line 91 of file load_junction.hpp.

◆ energy()

template<typename Load >
float sbl::dsp::pm::LoadJunction< Load >::energy ( ) const
inline

The junction stores nothing itself; what is behind it does.

Definition at line 94 of file load_junction.hpp.

◆ reset()

template<typename Load >
void sbl::dsp::pm::LoadJunction< Load >::reset ( )
inline

Definition at line 96 of file load_junction.hpp.

◆ describe()

template<typename Load >
diagram::Ports sbl::dsp::pm::LoadJunction< Load >::describe ( diagram::Graph &  g,
uint8_t  parent 
) const
inline

The junction and its load, wired: force into the load, velocity back.

in/out are the junction (the guide side); the named port "load" is the load, for a tap on what it radiates. Never called from audio code (AP-037).

Definition at line 108 of file load_junction.hpp.

References sbl::dsp::diagram::Ports::add(), sbl::dsp::diagram::Graph::add_edge(), sbl::dsp::diagram::Graph::add_group(), sbl::dsp::diagram::Graph::add_node(), sbl::dsp::diagram::Force, sbl::dsp::diagram::Ports::group, sbl::dsp::diagram::Ports::in, sbl::dsp::diagram::Junction, sbl::dsp::pm::LoadJunction< Load >::load(), sbl::dsp::diagram::Ports::out, and sbl::dsp::diagram::Velocity.


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