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
float toScaled(float value)
Transforms a value to the range 0 to 1.
float fromScaled(float scaledValue)
Transforms a value from the range 0 to 1.
virtual int getDisplayPrecision()
The number of total decimal places for generating the display value string.
virtual float getMaxValue()
Returns the maximum recommended value.
Definition Quantity.hpp:35
virtual float getDisplayValue()
Returns the value, transformed for displaying.
virtual float getMinValue()
Returns the minimum recommended value.
Definition Quantity.hpp:30
virtual ~Quantity()
Definition Quantity.hpp:15
bool isMin()
Checks whether the value is at the min value.
virtual float getDefaultValue()
Returns the default value, for resetting.
Definition Quantity.hpp:40
virtual void setDisplayValueString(std::string s)
Sets the value from a display string.
void setMin()
Sets the value to the min value.
void setMax()
Sets the value to the max value.
virtual std::string getDisplayValueString()
Returns a string representation of the display value.
float getRange()
The difference between the max and min values.
float getScaledValue()
Returns the value scaled to the range 0 to 1.
bool isMax()
Checks whether the value is at the max value.
virtual void setDisplayValue(float displayValue)
Inversely transforms the display value and sets the value.
virtual float getValue()
Returns the value.
Definition Quantity.hpp:25
bool isBounded()
Checks whether the bounds are finite.
virtual void randomize()
Sets the value to a uniform random value between the bounds.
virtual std::string getLabel()
The name of the quantity.
Definition Quantity.hpp:62
void moveScaledValue(float deltaScaledValue)
Adds an amount to the value scaled to the range 0 to 1.
virtual void reset()
Resets the value to the default value.
virtual std::string getUnit()
The unit abbreviation of the quantity.
Definition Quantity.hpp:69
void moveValue(float deltaValue)
Adds an amount to the value.
virtual void setValue(float value)
Sets the value directly.
Definition Quantity.hpp:20
virtual std::string getString()
Returns a string representation of the quantity.
void toggle()
Sets the value to max if the current value is min, otherwise sets the value to min.
void setScaledValue(float scaledValue)
Sets value from the range 0 to 1.