| AAX SDK 2.8.0 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-2024 Avid Technology, Inc.
5 * All rights reserved.
6 *
7 * This file is part of the Avid AAX SDK.
8 *
9 * The AAX SDK is subject to commercial or open-source licensing.
10 *
11 * By using the AAX SDK, you agree to the terms of both the Avid AAX SDK License
12 * Agreement and Avid Privacy Policy.
13 *
14 * AAX SDK License: https://developer.avid.com/aax
15 * Privacy Policy: https://www.avid.com/legal/privacy-policy-statement
16 *
17 * Or: You may also use this code under the terms of the GPL v3 (see
18 * www.gnu.org/licenses).
19 *
20 * THE AAX SDK IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
21 * EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
22 * DISCLAIMED.
23 *
24 */
25
41/*================================================================================================*/
42
43
44#pragma once
45
46#ifndef AAX_SLIDERCONVERSIONS_H
47#define AAX_SLIDERCONVERSIONS_H
48
49#include "AAX.h"
50#include <algorithm>
51#include <stdint.h>
52
53
54#define AAX_LIMIT(v1,firstVal,secondVal) ( (secondVal > firstVal) ? (std::max)((std::min)(v1,secondVal),firstVal) : (std::min)((std::max)(v1,secondVal),firstVal) )
55
56int32_t LongControlToNewRange (int32_t aValue, int32_t rangeMin, int32_t rangeMax);
57
61int32_t LongToLongControl (int32_t aValue, int32_t rangeMin, int32_t rangeMax);
62
66 double LongControlToDouble(int32_t aValue, double firstVal, double secondVal);
67
71int32_t DoubleToLongControl (double aValue, double firstVal, double secondVal);
72
73int32_t DoubleToLongControlNonlinear(double aValue, double* minVal, double* rangePercent, int32_t numRanges);
74 double LongControlToDoubleNonlinear(int32_t aValue, double* minVal, double* rangePercent, int32_t numRanges);
75
82 double LongControlToLogDouble(int32_t aValue, double minVal, double maxVal);
83
90int32_t LogDoubleToLongControl(double aValue, double minVal, double maxVal);
91
92#endif // AAX_SLIDERCONVERSIONS_H
93
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...