ofxPDSP
pdsp::ValueNode Class Reference

An OutputNode that is always set at control rate with a set value. Setting or patching float to this class is thread-safe. More...

#include <BasicNodes.h>

Inheritance diagram for pdsp::ValueNode:
pdsp::OutputNode pdsp::Preparable

Public Member Functions

 ValueNode (const ValueNode &other)
 
ValueNodeoperator= (const ValueNode &other)
 
float getCRValue () const override
 returns the ValueNode value
 
void set (float value)
 set the value More...
 
float value ()
 returns the ValueNode value
 
OutputNodesetAndGetNode (float value)
 set the value and return self as OutputNode More...
 
- Public Member Functions inherited from pdsp::OutputNode
 OutputNode (int oversample)
 
 OutputNode (const OutputNode &other)
 
OutputNodeoperator= (const OutputNode &other)
 
void connect (InputNode &inputNode)
 patch this OutputNode to an InputNode More...
 
void disconnect (InputNode &inputNode)
 disconnect this OutputNode from an InputNode More...
 
void disconnectAll ()
 disconnect this OutputNode from all the inputs to witch it is connected
 
const float * getBuffer () const
 get the OutputNode buffer
 
const int getState () const
 get the OutputNode state
 
const std::vector< InputNode * > & getOutputs () const
 get the outputs vector
 
bool isConnected ()
 returns true if this OutputNode is connected to at least an InputNode
 
bool notConnected ()
 returns true if this OutputNode is not connected to any InputNode
 
const int getOversampleLevel () const
 returns the oversample level of this OutputNode
 
OutputNodesetMultiplyOnConnection (float multiplier)
 this is basically what the * operator does when used with a Patchable or OutputNode
 

Additional Inherited Members

- Static Public Member Functions inherited from pdsp::Preparable
static double getGlobalSampleRate ()
 
- Protected Attributes inherited from pdsp::OutputNode
float * buffer
 
int state
 
Unitparent
 
int oversampleLevel
 

Detailed Description

An OutputNode that is always set at control rate with a set value. Setting or patching float to this class is thread-safe.

ValueNode can be use as OutputNode but it holds a single scalar value that is thread-safe to set even when the processing is running.

Member Function Documentation

◆ set()

void pdsp::ValueNode::set ( float  value)

set the value

Parameters
[in]valuevalue to set

◆ setAndGetNode()

pdsp::OutputNode & pdsp::ValueNode::setAndGetNode ( float  value)

set the value and return self as OutputNode

Parameters
[in]valuevalue to set

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