#define DEPRECATED
Attribute for deprecated functions and symbols.
Definition common.hpp:26
Root namespace for the Rack API.
Definition AudioDisplay.hpp:9
A controller for manipulating a float value (which subclasses must store somehow) with limits and lab...
Definition Quantity.hpp:14
DSP processor instance for your module.
Definition Module.hpp:29
A Quantity that wraps an engine::Param.
Definition ParamQuantity.hpp:21
float maxValue
The maximum allowed value.
Definition ParamQuantity.hpp:28
std::string name
The name of the parameter, using sentence capitalization.
Definition ParamQuantity.hpp:35
float displayMultiplier
Definition ParamQuantity.hpp:48
DEPRECATED float getSmoothValue()
Deprecated.
float getMaxValue() override
Returns the maximum recommended value.
bool snapEnabled
Rounds values to the nearest integer.
Definition ParamQuantity.hpp:67
float getImmediateValue()
Gets the Param's value post-smoothing.
std::string unit
The numerical unit of measurement appended to the value.
Definition ParamQuantity.hpp:40
float displayOffset
Definition ParamQuantity.hpp:49
std::string getLabel() override
The name of the quantity.
float getValue() override
Gets the Param's smoothing target value, or immediate value if smoothing is disabled.
std::string getUnit() override
The unit abbreviation of the quantity.
void setDisplayValue(float displayValue) override
Always sets immediate value.
DEPRECATED void setSmoothValue(float value)
Deprecated.
float minValue
The minimum allowed value.
Definition ParamQuantity.hpp:26
void setDisplayValueString(std::string s) override
Always sets immediate value.
float getDefaultValue() override
Returns the default value, for resetting.
void setValue(float value) override
Sets the target value of the Engine's smoothing algorithm, or immediate value if smoothing is disable...
void reset() override
Resets the value to the default value.
virtual std::string getDescription()
int displayPrecision
Number of digits of precision to display.
Definition ParamQuantity.hpp:53
std::string description
An optional one-sentence description of the parameter.
Definition ParamQuantity.hpp:55
bool randomizeEnabled
Enables parameter randomization when the module is randomized.
Definition ParamQuantity.hpp:63
virtual json_t * toJson()
int getDisplayPrecision() override
The number of total decimal places for generating the display value string.
bool smoothEnabled
Enables per-sample Engine parameter smoothing when setSmoothValue() is called.
Definition ParamQuantity.hpp:65
float defaultValue
The initial value.
Definition ParamQuantity.hpp:30
bool resetEnabled
Enables parameter resetting when the module or parameter itself is reset.
Definition ParamQuantity.hpp:59
float getMinValue() override
Returns the minimum recommended value.
void randomize() override
Sets the value to a uniform random value between the bounds.
int paramId
Definition ParamQuantity.hpp:23
float displayBase
Set to 0 for linear, positive for exponential, negative for logarithmic.
Definition ParamQuantity.hpp:47
std::string getDisplayValueString() override
Returns a string representation of the display value.
virtual void fromJson(json_t *rootJ)
void setImmediateValue(float value)
Sets the Param's value immediately without smoothing.
float getDisplayValue() override
Returns the value, transformed for displaying.
Definition ParamQuantity.hpp:121
std::vector< std::string > labels
Definition ParamQuantity.hpp:122
void setDisplayValueString(std::string s) override
Always sets immediate value.
std::string getDisplayValueString() override
Returns a string representation of the display value.