MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
MayaFlux::Nodes::Network::TerminationOperator Class Referenceabstract

What closes one end of a DuctNetwork: a wall, a reed, a radiating opening, or any pressure dependent flow. More...

#include <TerminationOperators.hpp>

Inheritance diagram for MayaFlux::Nodes::Network::TerminationOperator:
Collaboration diagram for MayaFlux::Nodes::Network::TerminationOperator:

Public Member Functions

virtual bool accepts (const Kinesis::Acoustics::DuctGrid &grid, const Kinesis::Acoustics::DuctSpec &spec, DuctEnd end) const =0
 Whether prepare would succeed for this grid and end.
virtual std::pair< double, double > couple (double end_pressure, double interior_flow)=0
 Advance the end cell and its coupling by one sample.
virtual void prepare (const Kinesis::Acoustics::DuctGrid &grid, const Kinesis::Acoustics::DuctSpec &spec, DuctEnd end)=0
 Bind to a grid and end, and reset the state.
void process (float) override
 Process for one batch cycle.
std::optional< double > query_state (std::string_view) const override
 Query operator internal state.
virtual void reset ()
 Clear the state, keeping the parameters.
virtual void retarget (const Kinesis::Acoustics::DuctGrid &grid, const Kinesis::Acoustics::DuctSpec &spec, DuctEnd end)
 Bind to a new grid of the same duct while it keeps sounding.
void set_parameter (std::string_view, double) override
 Set operator parameter.
Public Member Functions inherited from MayaFlux::Nodes::Network::NetworkOperator
virtual void apply_mapped_one_to_one (ParameterKey key, const std::shared_ptr< NodeNetwork > &source)
 Apply a cached per-element key, delegating to apply_one_to_one by default.
virtual void apply_one_to_one (std::string_view param, const std::shared_ptr< NodeNetwork > &source)
 Apply ONE_TO_ONE parameter mapping (per-point control).
virtual bool demands_full_vertex_restore () const
 Whether a downstream compute pass writes the network's vertex buffer in place each cycle, so the geometry producer must keep restoring the CPU-authoritative vertex data every frame.
template<typename Self>
Self::Controls get (this const Self &self)
 The controls with the values the operator holds now.
virtual std::string_view get_type_name () const =0
 Type name for introspection.
template<typename Self>
void set (this Self &self, const typename Self::Controls &incoming)
 Apply the members of this operator's Controls struct that hold a value.
virtual void set_mapped_parameter (ParameterKey key, double value)
 Apply a cached mapping key, delegating to set_parameter by default.
virtual ~NetworkOperator ()=default

Additional Inherited Members

Protected Member Functions inherited from MayaFlux::Nodes::Network::NetworkOperator
template<typename C>
C & declare_controls ()
 Create the operator's controls struct and keep it alive.
template<typename C>
void merge_controls (const C &incoming)
 Apply the members of incoming that hold a value, for an operator whose controls type is not fixed.
void refresh_controls ()
 Read node sources into their controls.
bool set_named_control (std::string_view name, double value)
 Sets the control called name, the way set() would.
bool settle_named_control (std::string_view name)
 Drops the pending typed value of the control called name.
template<typename C>
C snapshot_controls () const
 A copy of the declared struct, for an operator whose controls type is not fixed.

Detailed Description

What closes one end of a DuctNetwork: a wall, a reed, a radiating opening, or any pressure dependent flow.

A termination couples the end cell to a flow within the same sample, which a per-block process() cannot do, so it has a per-sample couple() that the network calls directly. process() is left for block housekeeping.

Both ends are described in their own inward frame: interior_flow is the volume velocity leaving the end cell into the duct, and the returned flow is the volume velocity entering the duct through the end face. One operator therefore serves either end, and a bell that radiates reports a negative inflow while sound leaves.

Parameters are atomics or set between blocks. couple() runs on the audio thread, and so does any callable an operator holds. Replacing an operator on a network happens outside process_batch(), through the network.

Definition at line 41 of file TerminationOperators.hpp.


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