A custom Slider class that automatically sets up its properties according to the specified mode. More...
Public Types | |
enum | Mode { Frequency = 0, Decibel, Time, TempoSync, Linear, Discrete, Pan, NormalizedPercentage } |
The HiSlider can be configured using one of these modes. More... | |
Public Member Functions | |
String | getTextFromValue (double value) override |
Overrides the slider method to display the tempo names for the TempoSync mode. More... | |
double | getValueFromText (const String &text) override |
Overrides the slider method to set the value from the Tempo names. | |
HiSlider (const String &name) | |
Creates a Slider. More... | |
void | setDisplayValue (float newDisplayValue) |
If the slider represents a modulated attribute (eg. More... | |
void | setMode (Mode m, double min, double max, double mid=DBL_MAX, double stepSize=DBL_MAX) |
sets the mode. More... | |
Public Member Functions inherited from MacroControlledObject | |
void | enableMacroControlledComponent (bool shouldBeEnabled) noexcept |
Since the original setEnabled() is overwritten in the updateValue, use this method instead to enable / disable MacroControlledComponents. More... | |
const String | getName () const noexcept |
returns the name. More... | |
MacroControlledObject () | |
Creates a new MacroControlledObject. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from MacroControlledObject | |
bool | checkLearnMode () |
checks if the macro learn mode is active. More... | |
A custom Slider class that automatically sets up its properties according to the specified mode.
You can call setup() after you created the Slider and it will be skinned using the global HiLookAndFeel and its range, skew factor and suffix are specified.
enum Mode |
The HiSlider can be configured using one of these modes.
Enumerator | |
---|---|
Frequency |
Range 20 - 20 000, Suffix "Hz", Midpoint: 1.5kHz. |
Decibel |
Range -100 - 0, Suffix "dB", Midpoint -18dB. |
Time |
Range 0 - 20 000, Suffix "ms", Midpoint 1000ms. |
TempoSync |
Range 0 - numTempos,.
|
Linear |
Range min - max. |
Discrete |
Range min - max, Stepsize integer. |
Pan |
100L - 100R, Stepsize integer |
NormalizedPercentage |
0.0 - 1.0, Displayed as percentage |
HiSlider | ( | const String & | name | ) |
Creates a Slider.
The name will be displayed.
The slider must be initialized using setup().
|
inlineoverride |
Overrides the slider method to display the tempo names for the TempoSync mode.
|
inline |
If the slider represents a modulated attribute (eg.
LFO Frequency), this can be used to set the displayed value.
In order to use this functionality, add a timer callback to your editor and update the value using the ModulatorChain's getOutputValue().
|
inline |
sets the mode.