Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::inspect::StateInspector Class Reference

Monitors StateStore parameters for the inspector. More...

#include <state_inspector.hpp>

Classes

struct  ParamSnapshot
 Parameter snapshot for display. More...
struct  ParamChange
 Recent change entry. More...

Public Member Functions

 StateInspector (StateStore &store)
StateStore & store () const noexcept
 The store this inspector observes.
void set_value_channels (view::ValueChannelSet *channels)
 Snapshot the hosting processor's declared value-channel metadata.
void set_value_channels (std::span< const view::ValueChannelInfo > channels)
std::span< const view::ValueChannelInfo > value_channels () const noexcept
 ~StateInspector ()
 StateInspector (const StateInspector &)=delete
StateInspector & operator= (const StateInspector &)=delete
std::vector< ParamSnapshot > all_params () const
 Get snapshots of all parameters.
std::vector< ParamChange > recent_changes () const
 Get recent parameter changes (ring buffer, last 100).
bool set_param (ParamID id, float value, bool normalized=false)
 Set a parameter value (for live editing from inspector / agents).

Detailed Description

Monitors StateStore parameters for the inspector.

Subscribes via the ListenerToken API: the inspector owns the token, and the listener is removed automatically when the inspector is destroyed. No shared_ptr alive-guard required.

Constructor & Destructor Documentation

◆ StateInspector() [1/2]

pulp::inspect::StateInspector::StateInspector ( StateStore & store)
explicit

◆ ~StateInspector()

pulp::inspect::StateInspector::~StateInspector ( )

◆ StateInspector() [2/2]

pulp::inspect::StateInspector::StateInspector ( const StateInspector & )
delete

Member Function Documentation

◆ all_params()

std::vector< ParamSnapshot > pulp::inspect::StateInspector::all_params ( ) const

Get snapshots of all parameters.

◆ operator=()

StateInspector & pulp::inspect::StateInspector::operator= ( const StateInspector & )
delete

◆ recent_changes()

std::vector< ParamChange > pulp::inspect::StateInspector::recent_changes ( ) const

Get recent parameter changes (ring buffer, last 100).

◆ set_param()

bool pulp::inspect::StateInspector::set_param ( ParamID id,
float value,
bool normalized = false )

Set a parameter value (for live editing from inspector / agents).

Validates that id refers to a registered parameter, wraps the write in a host gesture (begin/end) so DAW undo grouping and automation recording behave as if a user moved the control, and supports either a raw value or a 0..1 normalized value.

Parameters
normalizedwhen true, value is treated as a normalized 0..1 position; otherwise it is a raw parameter value.
Returns
false if id is not a registered parameter (no write performed).

◆ set_value_channels() [1/2]

void pulp::inspect::StateInspector::set_value_channels ( std::span< const view::ValueChannelInfo > channels)
inline

◆ set_value_channels() [2/2]

void pulp::inspect::StateInspector::set_value_channels ( view::ValueChannelSet * channels)

Snapshot the hosting processor's declared value-channel metadata.

The inspector owns its copy so a reloadable processor can retire the source set immediately after this call without leaving a dangling catalog.

◆ store()

StateStore & pulp::inspect::StateInspector::store ( ) const
inlinenoexcept

The store this inspector observes.

Exposed so protocol serialization can go through pulp::state::param_json rather than hand-rolling a second parameter payload that would drift from the bridge's.

◆ value_channels()

std::span< const view::ValueChannelInfo > pulp::inspect::StateInspector::value_channels ( ) const
inlinenoexcept

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