Public Member Functions | List of all members
Ramper Class Reference

A Ramper applies linear ramping to a value. More...

Public Member Functions

bool ramp (float &valueToChange)
 ramps the supplied value and returns true if the targetValue is reached. More...
 
void setStepAmount (int newStepAmount)
 Sets the step amount that the ramper will use. More...
 
void setTarget (float currentValue, float newTarget, int numberOfSteps=-1)
 sets the new target and recalculates the step size using either the supplied step number or the step amount previously set by setStepAmount(). More...
 
void setValue (float newValue)
 Sets the ramper value and the target to the new value and stops ramping. More...
 

Detailed Description

A Ramper applies linear ramping to a value.

Member Function Documentation

bool ramp ( float &  valueToChange)
inline

ramps the supplied value and returns true if the targetValue is reached.

void setStepAmount ( int  newStepAmount)
inline

Sets the step amount that the ramper will use.

You can overwrite this value by supplying a step number in setTarget.

void setTarget ( float  currentValue,
float  newTarget,
int  numberOfSteps = -1 
)
inline

sets the new target and recalculates the step size using either the supplied step number or the step amount previously set by setStepAmount().

void setValue ( float  newValue)
inline

Sets the ramper value and the target to the new value and stops ramping.

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