Vital
Loading...
Searching...
No Matches
vital::StatusOutput Class Reference

A helper class to track the "status" of a particular Output as a poly_float value. More...

#include <synth_module.h>

Public Member Functions

 StatusOutput (Output *source)
 Constructor.
 
force_inline poly_float value () const
 Returns the current status value.
 
force_inline void update (poly_mask voice_mask)
 Updates the status value using the provided mask.
 
force_inline void update ()
 Updates the status value without masking.
 
force_inline void clear ()
 Clears the stored status value.
 
force_inline bool isClearValue (poly_float value) const
 Checks if a given poly_float is the special "clear" value.
 
force_inline bool isClearValue (float value) const
 Checks if a given float is the special "clear" value.
 

Static Public Attributes

static constexpr float kClearValue = INT_MIN
 Special "clear" value indicating no status.
 

Detailed Description

A helper class to track the "status" of a particular Output as a poly_float value.

The StatusOutput class allows reading and clearing of a status value from a given Output. It can accumulate values for different voices (via update calls), and also recognizes a special "clear" value.

Constructor & Destructor Documentation

◆ StatusOutput()

vital::StatusOutput::StatusOutput ( Output * source)
inline

Constructor.

Parameters
sourceThe Output from which status values are read.

Member Function Documentation

◆ clear()

force_inline void vital::StatusOutput::clear ( )
inline

Clears the stored status value.

◆ isClearValue() [1/2]

force_inline bool vital::StatusOutput::isClearValue ( float value) const
inline

Checks if a given float is the special "clear" value.

Parameters
valueThe value to check.
Returns
True if the value matches the clear value.

◆ isClearValue() [2/2]

force_inline bool vital::StatusOutput::isClearValue ( poly_float value) const
inline

Checks if a given poly_float is the special "clear" value.

Parameters
valueThe value to check.
Returns
True if the value matches the clear value.

◆ update() [1/2]

force_inline void vital::StatusOutput::update ( )
inline

Updates the status value without masking.

Copies the value from the source Output directly.

◆ update() [2/2]

force_inline void vital::StatusOutput::update ( poly_mask voice_mask)
inline

Updates the status value using the provided mask.

Copies masked values from the source Output into the internal value.

Parameters
voice_maskA mask indicating which voices are active.

◆ value()

force_inline poly_float vital::StatusOutput::value ( ) const
inline

Returns the current status value.

Returns
A poly_float containing the current status.

Member Data Documentation

◆ kClearValue

float vital::StatusOutput::kClearValue = INT_MIN
staticconstexpr

Special "clear" value indicating no status.


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