All Classes Namespaces Functions Variables Enumerations Enumerator Modules Pages
Public Types | Public Member Functions | List of all members
HiSlider Class Reference
Inheritance diagram for HiSlider:
MacroControlledObject

Public Types

enum  Mode { , TempoSync }
 

Public Member Functions

 HiSlider (const String &name)
 
void setMode (Mode m, double min, double max, double mid=DBL_MAX, double stepSize=DBL_MAX)
 
void setDisplayValue (float newDisplayValue)
 
String getTextFromValue (double value) override
 
double getValueFromText (const String &text) override
 
- Public Member Functions inherited from MacroControlledObject
 MacroControlledObject ()
 
const String getName () const noexcept
 
void enableMacroControlledComponent (bool shouldBeEnabled) noexcept
 

Additional Inherited Members

- Protected Member Functions inherited from MacroControlledObject
bool checkLearnMode ()
 

Detailed Description

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.

Member Enumeration Documentation

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,.

See also
TempoSyncer
Linear 

Range min - max.

Discrete 

Range min - max, Stepsize integer.

Pan 

100L - 100R, Stepsize integer

NormalizedPercentage 

0.0 - 1.0, Displayed as percentage

Constructor & Destructor Documentation

HiSlider ( const String &  name)
inline

Creates a Slider. The name will be displayed.

The slider must be initialized using setup().

Member Function Documentation

String getTextFromValue ( double  value)
inlineoverride

Overrides the slider method to display the tempo names for the TempoSync mode.

double getValueFromText ( const String &  text)
inlineoverride

Overrides the slider method to set the value from the Tempo names

void setDisplayValue ( float  newDisplayValue)
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().

void setMode ( Mode  m,
double  min,
double  max,
double  mid = DBL_MAX,
double  stepSize = DBL_MAX 
)
inline

sets the mode.

©2017 HISE. This documentation is autogenerated from the HISE source code using Doxygen.