![]() |
AAX SDK
2.4.1
Avid Audio Extensions Development Kit
|
#include <AAX_CRangeTaperDelegate.h>
A piecewise-linear taper conforming to AAX_ITaperDelegate.
This taper spaces a parameter's real values between its minimum and maximum using a series of linear regions to create the full mapping between the parameter's real and normalized values.
Here is an example of how this taper can be used:
To accomplish this behavior, the taper multiplies its unrounded parameter values by RealPrecision, rounds the result to the nearest valid value, then divides RealPrecision back out.
Rounding will be disabled if RealPrecision is set to a value less than 1
Public Member Functions | |
AAX_CRangeTaperDelegate (T *range, double *rangesSteps, long numRanges, bool useSmartRounding=true) | |
Constructs a Range Taper with specified minimum and maximum values. More... | |
AAX_CRangeTaperDelegate (const AAX_CRangeTaperDelegate &rhs) | |
AAX_CRangeTaperDelegate & | operator= (AAX_CRangeTaperDelegate &rhs) |
AAX_CRangeTaperDelegate< T, RealPrecision > * | Clone () const AAX_OVERRIDE |
Constructs and returns a copy of the taper delegate. More... | |
T | GetMinimumValue () const AAX_OVERRIDE |
Returns the taper's minimum real value. More... | |
T | GetMaximumValue () const AAX_OVERRIDE |
Returns the taper's maximum real value. More... | |
T | ConstrainRealValue (T value) const AAX_OVERRIDE |
Applies a contraint to the value and returns the constrained value. More... | |
T | NormalizedToReal (double normalizedValue) const AAX_OVERRIDE |
Converts a normalized value to a real value. More... | |
double | RealToNormalized (T realValue) const AAX_OVERRIDE |
Normalizes a real parameter value. More... | |
![]() | |
virtual | ~AAX_ITaperDelegateBase () |
Virtual destructor. More... | |
Protected Member Functions | |
T | Round (double iValue) const |
T | SmartRound (double value) const |
AAX_CRangeTaperDelegate< T, RealPrecision >::AAX_CRangeTaperDelegate | ( | T * | range, |
double * | rangesSteps, | ||
long | numRanges, | ||
bool | useSmartRounding = true |
||
) |
Constructs a Range Taper with specified minimum and maximum values.
[in] | range | An array of range endpoints along the taper's mapping range |
[in] | rangesSteps | Step values for each region in the taper's stepwise-linear map. No values in this array may be zero. |
[in] | numRanges | The total number of linear regions in the taper's map |
[in] | useSmartRounding |
AAX_CRangeTaperDelegate< T, RealPrecision >::AAX_CRangeTaperDelegate | ( | const AAX_CRangeTaperDelegate< T, RealPrecision > & | rhs | ) |
AAX_CRangeTaperDelegate< T, RealPrecision > & AAX_CRangeTaperDelegate< T, RealPrecision >::operator= | ( | AAX_CRangeTaperDelegate< T, RealPrecision > & | rhs | ) |
|
virtual |
Constructs and returns a copy of the taper delegate.
In general, this method's implementation can use a simple copy constructor:
Implements AAX_ITaperDelegate< T >.
|
inlinevirtual |
Returns the taper's minimum real value.
Implements AAX_ITaperDelegate< T >.
|
inlinevirtual |
Returns the taper's maximum real value.
Implements AAX_ITaperDelegate< T >.
|
virtual |
Applies a contraint to the value and returns the constrained value.
This method is useful if the taper requires a contraint beyond simple minimum and maximum real value limits.
[in] | value | The unconstrained value |
Implements AAX_ITaperDelegate< T >.
|
virtual |
Converts a normalized value to a real value.
This is where the actual taper algorithm is implemented.
This function should perform the exact inverse of RealToNormalized(), to within the roundoff precision of the individual taper implementation.
[in] | normalizedValue | The normalized value that will be converted |
Implements AAX_ITaperDelegate< T >.
|
virtual |
Normalizes a real parameter value.
This is where the actual taper algorithm is implemented.
This function should perform the exact inverse of NormalizedToReal(), to within the roundoff precision of the individual taper implementation.
[in] | realValue | The real parameter value that will be normalized |
Implements AAX_ITaperDelegate< T >.
|
protected |
|
protected |