| AAX SDK 2.6.1 Avid Audio Extensions Development Kit

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

- File List
- File Members

Loading...
Searching...
No Matches
AAX_SliderConversions.h
Go to the documentation of this file.
1/*================================================================================================*/
2/*
3 *
4 * Copyright 2013-2015, 2023 Avid Technology, Inc.
5 * All rights reserved.
6 *
7 * CONFIDENTIAL: this document contains confidential information of Avid. Do
8 * not disclose to any third party. Use of the information contained in this
9 * document is subject to an Avid SDK license.
10 *
11 */
12
28/*================================================================================================*/
29
30
31#pragma once
32
33#ifndef AAX_SLIDERCONVERSIONS_H
34#define AAX_SLIDERCONVERSIONS_H
35
36#include "AAX.h"
37#include <algorithm>
38#include <stdint.h>
39
40
41#define AAX_LIMIT(v1,firstVal,secondVal) ( (secondVal > firstVal) ? (std::max)((std::min)(v1,secondVal),firstVal) : (std::min)((std::max)(v1,secondVal),firstVal) )
42
43int32_t LongControlToNewRange (int32_t aValue, int32_t rangeMin, int32_t rangeMax);
44
48int32_t LongToLongControl (int32_t aValue, int32_t rangeMin, int32_t rangeMax);
49
53 double LongControlToDouble(int32_t aValue, double firstVal, double secondVal);
54
58int32_t DoubleToLongControl (double aValue, double firstVal, double secondVal);
59
60int32_t DoubleToLongControlNonlinear(double aValue, double* minVal, double* rangePercent, int32_t numRanges);
61 double LongControlToDoubleNonlinear(int32_t aValue, double* minVal, double* rangePercent, int32_t numRanges);
62
69 double LongControlToLogDouble(int32_t aValue, double minVal, double maxVal);
70
77int32_t LogDoubleToLongControl(double aValue, double minVal, double maxVal);
78
79#endif // AAX_SLIDERCONVERSIONS_H
80
AAX.h
Various utility definitions for AAX.
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 0x8000000...
LongControlToNewRange
int32_t LongControlToNewRange(int32_t aValue, int32_t rangeMin, int32_t rangeMax)
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)
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 seco...
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 rang...
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 0x8000000...
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...