| AAX SDK 2.8.0 Avid Audio Extensions Development Kit

- Welcome
- Manual
- Classes
- Files
- Lists
- Support

- File List
- File Members

Loading...
Searching...
No Matches
Macros | Functions
AAX_SliderConversions.h File Reference
`#include "AAX.h"`
`#include <algorithm>`
`#include <stdint.h>`

Go to the source code of this file.

## Description

Legacy utilities for converting parameter values to and from the normalized full-scale 32-bit fixed domain that was used for RTAS/TDM plug-ins.

Legacy Porting Notes:
  These utilities may be required in order to maintain settings chunk compatibility with plug-ins that were ported from the legacy RTAS/TDM format.

Note
  AAX does not provide facilities for converting to and from extended80 data types. If you use these types in your plug-in settings then you must provide your own chunk data parsing routines.

## Macros
#define | AAX_SLIDERCONVERSIONS_H
#define | AAX_LIMIT(v1, firstVal, secondVal) ( (secondVal > firstVal) ? (std::max)((std::min)(v1,secondVal),firstVal) : (std::min)((std::max)(v1,secondVal),firstVal) )

## Functions
int32_t | LongControlToNewRange (int32_t aValue, int32_t rangeMin, int32_t rangeMax)
int32_t | LongToLongControl (int32_t aValue, int32_t rangeMin, int32_t rangeMax)
| Convert from int32_t control value 0x80000000...0x7FFFFFFF to a int32_t ranging from rangeMin to rangeMax (linear)
double | LongControlToDouble (int32_t aValue, double firstVal, double secondVal)
| Convert from int32_t control value 0x80000000...0x7FFFFFFF to an double ranging from firstVal to secondVal (linear)
int32_t | DoubleToLongControl (double aValue, double firstVal, double secondVal)
| Convert from an double ranging from firstVal to secondVal (linear) to int32_t control value 0x80000000...0x7FFFFFFF.
int32_t | DoubleToLongControlNonlinear (double aValue, double *minVal, double *rangePercent, int32_t numRanges)
double | LongControlToDoubleNonlinear (int32_t aValue, double *minVal, double *rangePercent, int32_t numRanges)
double | LongControlToLogDouble (int32_t aValue, double minVal, double maxVal)
| Convert from int32_t control value 0x80000000...0x7FFFFFFF to an double ranging from minVal to maxVal (logarithmic)
int32_t | LogDoubleToLongControl (double aValue, double minVal, double maxVal)
| Convert from an double ranging from minVal to maxVal (logarithmic) to int32_t control value 0x80000000...0x7FFFFFFF.

## Macro Definition Documentation

## ◆ AAX_SLIDERCONVERSIONS_H

#define AAX_SLIDERCONVERSIONS_H

## ◆ AAX_LIMIT

#define AAX_LIMIT | ( |  | v1,
|  |  | firstVal,
|  |  | secondVal
| ) |  | ( (secondVal > firstVal) ? (std::max)((std::min)(v1,secondVal),firstVal) : (std::min)((std::max)(v1,secondVal),firstVal) )

## Function Documentation

## ◆ LongControlToNewRange()

int32_t LongControlToNewRange | ( | int32_t | aValue,
|  | int32_t | rangeMin,
|  | int32_t | rangeMax
| ) |  |

## ◆ LongToLongControl()

int32_t LongToLongControl | ( | int32_t | aValue,
|  | int32_t | rangeMin,
|  | int32_t | rangeMax
| ) |  |

Convert from int32_t control value 0x80000000...0x7FFFFFFF to a int32_t ranging from rangeMin to rangeMax (linear)

## ◆ LongControlToDouble()

double LongControlToDouble | ( | int32_t | aValue,
|  | double | firstVal,
|  | double | secondVal
| ) |  |

Convert from int32_t control value 0x80000000...0x7FFFFFFF to an double ranging from firstVal to secondVal (linear)

## ◆ DoubleToLongControl()

int32_t DoubleToLongControl | ( | double | aValue,
|  | double | firstVal,
|  | double | secondVal
| ) |  |

Convert from an double ranging from firstVal to secondVal (linear) to int32_t control value 0x80000000...0x7FFFFFFF.

## ◆ DoubleToLongControlNonlinear()

int32_t DoubleToLongControlNonlinear | ( | double | aValue,
|  | double * | minVal,
|  | double * | rangePercent,
|  | int32_t | numRanges
| ) |  |

## ◆ LongControlToDoubleNonlinear()

double LongControlToDoubleNonlinear | ( | int32_t | aValue,
|  | double * | minVal,
|  | double * | rangePercent,
|  | int32_t | numRanges
| ) |  |

## ◆ LongControlToLogDouble()

double LongControlToLogDouble | ( | int32_t | aValue,
|  | double | minVal,
|  | double | maxVal
| ) |  |

Convert from int32_t control value 0x80000000...0x7FFFFFFF to an double ranging from minVal to maxVal (logarithmic)

Note
  This is LOGARITHMIC, so minVal & maxVal have to be > zero!

## ◆ LogDoubleToLongControl()

int32_t LogDoubleToLongControl | ( | double | aValue,
|  | double | minVal,
|  | double | maxVal
| ) |  |

Convert from an double ranging from minVal to maxVal (logarithmic) to int32_t control value 0x80000000...0x7FFFFFFF.

Note
  This is LOGARITHMIC, so minVal & maxVal have to be > zero!