ofxPDSP
pdsp::Parameter Class Reference
Inheritance diagram for pdsp::Parameter:
pdsp::Patchable

Public Member Functions

 Parameter (const Parameter &other)
 
Parameteroperator= (const Parameter &other)
 
ofParameter< float > & set (const char *name, float value, float min, float max)
 sets the and returns the internal ofParameter<float>, useful to set up an UI. This parameter is summed to another ofParameter<int>, that you access passing all ints as parameters More...
 
ofParameter< int > & set (const char *name, int value, int min, int max)
 sets the and returns the internal ofParameter<int>, useful to set up an UI. This parameter is summed to another ofParameter<float>, that you access passing all ints as parameters More...
 
ofParameter< float > & set (const char *name, float min, float max)
 sets the value min and max boundary when operated by the ofParameter<float> in the UI and returns the parameter ready to be added to the UI More...
 
ofParameter< int > & set (const char *name, int min, int max)
 sets the value min and max boundary when operated by the ofParameter<int> in the UI and returns the parameter ready to be added to the UI More...
 
ofParameter< float > & set (std::string name, float value, float min, float max)
 sets the and returns the internal ofParameter<float>, useful to set up an UI. This parameter is summed to another ofParameter<int>, that you access passing all ints as parameters More...
 
ofParameter< int > & set (std::string name, int value, int min, int max)
 sets the and returns the internal ofParameter<int>, useful to set up an UI. This parameter is summed to another ofParameter<float>, that you access passing all ints as parameters More...
 
ofParameter< float > & set (std::string name, float min, float max)
 sets the value min and max boundary when operated by the ofParameter<float> in the UI and returns the parameter ready to be added to the UI More...
 
ofParameter< int > & set (std::string name, int min, int max)
 sets the value min and max boundary when operated by the ofParameter<int> in the UI and returns the parameter ready to be added to the UI More...
 
ofParameter< bool > & set (std::string name, bool value, float min=0.0f, float max=1.0f)
 sets the and returns the internal ofParameter<bool>, useful to set up an UI. This parameter set the value to min when false and to max when true, 0.0f and 1.0f if not given. More...
 
ofParameter< bool > & set (const char *name, bool value, float min=0.0f, float max=1.0f)
 sets the and returns the internal ofParameter<bool>, useful to set up an UI. This parameter set the value to min when false and to max when true, 0.0f and 1.0f if not given. More...
 
ofParameter< float > & getOFParameterFloat ()
 returns the ofParameter ready to be added to the UI
 
ofParameter< int > & getOFParameterInt ()
 returns the ofParameter ready to be added to the UI
 
ofParameter< bool > & getOFParameterBool ()
 returns the ofParameter ready to be added to the UI
 
void enableSmoothing (float timeMs)
 enables the smoothing of the setted values More...
 
void disableSmoothing ()
 disable the smoothing of the setted values. smoothing is disabled by default
 
void set (float value)
 sets the value and updates the ofParameters, this is safe to call on the main oF thread but not from other threads. More...
 
float get () const
 gets the value
 
float meter_output () const
 returns the actual output value. Thread-safe.
 
ofParameter< float > & set (const char *name, double value, double min, double max)
 
ofParameter< float > & set (const char *name, double min, double max)
 
ofParameter< float > & set (std::string name, double value, double min, double max)
 
ofParameter< float > & set (std::string name, double min, double max)
 
void setv (float value)
 
- Public Member Functions inherited from pdsp::Patchable
void resetInputToDefault ()
 resets the selected input to the default.
 
void resetOutputToDefault ()
 resets the selected output to the default.
 
Patchablein (const char *tag)
 sets the selected input to the one tagged with "tag", if tag is a valid string, and returns this Patchable ready to be patched. More...
 
Patchableout (const char *tag)
 sets the selected output to the one tagged with "tag", if tag is a valid string, and returns this Patchable ready to be patched. More...
 
void disconnectIn ()
 disconnects all the outputs connected to the selected input, then resets the selected input to the default.
 
void disconnectOut ()
 disconnects all the inputs connected to the selected output, then resets the selected output to the default.
 
void disconnectAll ()
 disconnects all the inputs and outputs to their connected outputs and inputs. Also resets the selected input and output to the default.
 
InputNodegetSelectedInput ()
 returns the selected input, you can patch a Patchable or OutputNode to it with the >> operator.
 
OutputNodegetSelectedOutput ()
 returns the selected output, you can patch it to another Patchable or InputNode with the >> operator.
 
std::vector< std::string > getInputsList ()
 returns a vector of the valid input tags
 
std::vector< std::string > getOutputsList ()
 returns a vector of the valid input tags
 

Friends

class ParameterAmp
 
class ParameterGain
 

Additional Inherited Members

- Protected Member Functions inherited from pdsp::Patchable
void addOutput (const char *tag, OutputNode &output)
 method to add outputs when constructing a Unit More...
 
void addInput (const char *tag, InputNode &input)
 method to add inputs when constructing a Unit More...
 
void addModuleOutput (const char *tag, Patchable &unit)
 method to add outputs when constructing a module More...
 
void addModuleInput (const char *tag, Patchable &unit)
 method to add outputs when constructing a module More...
 

Member Function Documentation

◆ enableSmoothing()

void pdsp::Parameter::enableSmoothing ( float  timeMs)

enables the smoothing of the setted values

Parameters
[in]timeMshow many milliseconds will take to reach the setted value

◆ set() [1/11]

ofParameter< float > & pdsp::Parameter::set ( const char *  name,
float  value,
float  min,
float  max 
)

sets the and returns the internal ofParameter<float>, useful to set up an UI. This parameter is summed to another ofParameter<int>, that you access passing all ints as parameters

Parameters
[in]namethis will become the name of the ofParameter
[in]valuedefault value
[in]minminimum value
[in]maxmaximum value

◆ set() [2/11]

ofParameter< int > & pdsp::Parameter::set ( const char *  name,
int  value,
int  min,
int  max 
)

sets the and returns the internal ofParameter<int>, useful to set up an UI. This parameter is summed to another ofParameter<float>, that you access passing all ints as parameters

Parameters
[in]namethis will become the name of the ofParameter
[in]valuedefault value
[in]minminimum value
[in]maxmaximum value

◆ set() [3/11]

ofParameter< float > & pdsp::Parameter::set ( const char *  name,
float  min,
float  max 
)

sets the value min and max boundary when operated by the ofParameter<float> in the UI and returns the parameter ready to be added to the UI

Parameters
[in]namethis will become the name of the ofParameter
[in]minminimum value
[in]maxmaximum value

◆ set() [4/11]

ofParameter< int > & pdsp::Parameter::set ( const char *  name,
int  min,
int  max 
)

sets the value min and max boundary when operated by the ofParameter<int> in the UI and returns the parameter ready to be added to the UI

Parameters
[in]namethis will become the name of the ofParameter
[in]minminimum value
[in]maxmaximum value

◆ set() [5/11]

ofParameter< float > & pdsp::Parameter::set ( std::string  name,
float  value,
float  min,
float  max 
)

sets the and returns the internal ofParameter<float>, useful to set up an UI. This parameter is summed to another ofParameter<int>, that you access passing all ints as parameters

Parameters
[in]namethis will become the name of the ofParameter
[in]valuedefault value
[in]minminimum value
[in]maxmaximum value

◆ set() [6/11]

ofParameter< int > & pdsp::Parameter::set ( std::string  name,
int  value,
int  min,
int  max 
)

sets the and returns the internal ofParameter<int>, useful to set up an UI. This parameter is summed to another ofParameter<float>, that you access passing all ints as parameters

Parameters
[in]namethis will become the name of the ofParameter
[in]valuedefault value
[in]minminimum value
[in]maxmaximum value

◆ set() [7/11]

ofParameter< float > & pdsp::Parameter::set ( std::string  name,
float  min,
float  max 
)

sets the value min and max boundary when operated by the ofParameter<float> in the UI and returns the parameter ready to be added to the UI

Parameters
[in]namethis will become the name of the ofParameter
[in]minminimum value
[in]maxmaximum value

◆ set() [8/11]

ofParameter< int > & pdsp::Parameter::set ( std::string  name,
int  min,
int  max 
)

sets the value min and max boundary when operated by the ofParameter<int> in the UI and returns the parameter ready to be added to the UI

Parameters
[in]namethis will become the name of the ofParameter
[in]minminimum value
[in]maxmaximum value

◆ set() [9/11]

ofParameter< bool > & pdsp::Parameter::set ( std::string  name,
bool  value,
float  min = 0.0f,
float  max = 1.0f 
)

sets the and returns the internal ofParameter<bool>, useful to set up an UI. This parameter set the value to min when false and to max when true, 0.0f and 1.0f if not given.

Parameters
[in]namethis will become the name of the ofParameter
[in]valuedefault value
[in]minvalue when false, 0,0f if not given
[in]maxvalue when true, 1.0f if not given

◆ set() [10/11]

ofParameter< bool > & pdsp::Parameter::set ( const char *  name,
bool  value,
float  min = 0.0f,
float  max = 1.0f 
)

sets the and returns the internal ofParameter<bool>, useful to set up an UI. This parameter set the value to min when false and to max when true, 0.0f and 1.0f if not given.

Parameters
[in]namethis will become the name of the ofParameter
[in]valuedefault value
[in]minvalue when false, 0,0f if not given
[in]maxvalue when true, 1.0f if not given

◆ set() [11/11]

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

sets the value and updates the ofParameters, this is safe to call on the main oF thread but not from other threads.

Parameters
[in]valuenew value

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