6 #ifndef OFXPDSP_PDSPPARAMETER_H_INCLUDED 7 #define OFXPDSP_PDSPPARAMETER_H_INCLUDED 9 #include "../DSP/pdspCore.h" 10 #include "../DSP/helpers/UsesSlew.h" 11 #include "../DSP/control/ValueControl.h" 44 ofParameter<float>&
set(
const char * name,
float value,
float min,
float max);
53 ofParameter<int>&
set(
const char * name,
int value,
int min,
int max);
62 ofParameter<float>&
set(
const char * name,
float min,
float max);
70 ofParameter<int>&
set(
const char * name,
int min,
int max);
79 ofParameter<float>&
set( std::string name,
float value,
float min,
float max);
88 ofParameter<int>&
set( std::string name,
int value,
int min,
int max);
97 ofParameter<float>&
set( std::string name,
float min,
float max);
105 ofParameter<int>&
set( std::string name,
int min,
int max);
114 ofParameter<bool>&
set( std::string name,
bool value,
float min=0.0f,
float max=1.0f );
123 ofParameter<bool>&
set(
const char * name,
bool value,
float min=0.0f,
float max=1.0f );
156 void set(
float value );
161 float get()
const {
return valueControl.
get(); }
169 ofParameter<float>&
set(
const char * name,
double value,
double min,
double max);
170 ofParameter<float>&
set(
const char * name,
double min,
double max);
171 ofParameter<float>&
set( std::string name,
double value,
double min,
double max);
172 ofParameter<float>&
set( std::string name,
double min,
double max);
175 [[deprecated(
"setv(float value) method deprecated, use the set(float value) method that also updates the ofParameters or use the pdsp::ValueControl class with its set() method if you don't need ofParameters")]]
176 void setv(
float value){ valueControl.
set(value); }
181 ofParameter<float> parameter;
182 ofParameter<int> parameter_i;
183 ofParameter<bool> parameter_b;
185 void onSet(
float &newValue);
186 void onSetI(
int &newValue);
187 void onSetB(
bool &newValue);
195 std::atomic<bool> bCanUpdate;
197 static const int modeUnsetted = 0;
198 static const int modeFloat = 1;
199 static const int modeInt = 2;
200 static const int modeCombined = 3;
201 static const int modeBool = 4;
206 #endif //OFXPDSP_PDSPPARAMETER_H_INCLUDED float meter_output() const
returns the actual output value. Thread-safe.
Definition: ValueControl.h:59
ofParameter< float > & getOFParameterFloat()
returns the ofParameter ready to be added to the UI
Definition: Parameter.cpp:93
Definition: ValueControl.h:25
void enableSmoothing(float timeMs)
enables the smoothing of the setted values
Definition: Parameter.cpp:105
float get() const
gets the value
Definition: ValueControl.h:43
Definition: Parameter.h:26
void set(float value)
sets the value, thread safe.
Definition: ValueControl.h:38
void disableSmoothing()
disable the smoothing of the setted values. smoothing is disabled by default
Definition: Parameter.cpp:110
Abstract class for implementing Units and Modules.
Definition: BasicNodes.h:82
Definition: ParameterAmp.h:24
Thread-safe value control with smoothing.
Definition: SequencerBridge.h:11
float meter_output() const
returns the actual output value. Thread-safe.
Definition: Parameter.h:166
Definition: ParameterGain.h:25
ofParameter< bool > & getOFParameterBool()
returns the ofParameter ready to be added to the UI
Definition: Parameter.cpp:101
ofParameter< int > & getOFParameterInt()
returns the ofParameter ready to be added to the UI
Definition: Parameter.cpp:97