\hypertarget{a00758}{}\doxysection{AAX\+\_\+\+Slider\+Conversions.\+h File Reference}
\label{a00758}\index{AAX\_SliderConversions.h@{AAX\_SliderConversions.h}}
{\ttfamily \#include \char`\"{}AAX.\+h\char`\"{}}\newline
{\ttfamily \#include $<$algorithm$>$}\newline
{\ttfamily \#include $<$stdint.\+h$>$}\newline


\doxysubsection{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. 

\begin{DoxyRefDesc}{Legacy Porting Notes}
\item[\mbox{\hyperlink{a00868__porting_notes000059}{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.\end{DoxyRefDesc}


\begin{DoxyNote}{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. 
\end{DoxyNote}
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \mbox{\hyperlink{a00758_a8676d067980b7fb9a1f53cfa5dbc048a}{AAX\+\_\+\+SLIDERCONVERSIONS\+\_\+H}}
\item 
\#define \mbox{\hyperlink{a00758_af5bd671969b131ba73e1651befa4f51f}{AAX\+\_\+\+LIMIT}}(v1,  first\+Val,  second\+Val)~( (second\+Val $>$ first\+Val) ? (std\+::max)((std\+::min)(v1,second\+Val),first\+Val) \+:  (std\+::min)((std\+::max)(v1,second\+Val),first\+Val) )
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
int32\+\_\+t \mbox{\hyperlink{a00758_a5125f531cd70d1d4049c99335989a0ee}{Long\+Control\+To\+New\+Range}} (int32\+\_\+t a\+Value, int32\+\_\+t range\+Min, int32\+\_\+t range\+Max)
\item 
int32\+\_\+t \mbox{\hyperlink{a00758_abb594c44cd5d4dee1ec236f7c69adacb}{Long\+To\+Long\+Control}} (int32\+\_\+t a\+Value, int32\+\_\+t range\+Min, int32\+\_\+t range\+Max)
\begin{DoxyCompactList}\small\item\em Convert from int32\+\_\+t control value 0x80000000...0x7\+FFFFFFF to a int32\+\_\+t ranging from range\+Min to range\+Max (linear) \end{DoxyCompactList}\item 
double \mbox{\hyperlink{a00758_a8c8994b0486ed20075fd7808dc0bc01e}{Long\+Control\+To\+Double}} (int32\+\_\+t a\+Value, double first\+Val, double second\+Val)
\begin{DoxyCompactList}\small\item\em Convert from int32\+\_\+t control value 0x80000000...0x7\+FFFFFFF to an double ranging from first\+Val to second\+Val (linear) \end{DoxyCompactList}\item 
int32\+\_\+t \mbox{\hyperlink{a00758_a285ce2bf578a7ceb8c12eabbd5e5ad37}{Double\+To\+Long\+Control}} (double a\+Value, double first\+Val, double second\+Val)
\begin{DoxyCompactList}\small\item\em Convert from an double ranging from first\+Val to second\+Val (linear) to int32\+\_\+t control value 0x80000000...0x7\+FFFFFFF. \end{DoxyCompactList}\item 
int32\+\_\+t \mbox{\hyperlink{a00758_a76082aa640489b279cd7683c12fcbd33}{Double\+To\+Long\+Control\+Nonlinear}} (double a\+Value, double $\ast$min\+Val, double $\ast$range\+Percent, int32\+\_\+t num\+Ranges)
\item 
double \mbox{\hyperlink{a00758_a81279cd99c7d7193e4f79d5c74dccf54}{Long\+Control\+To\+Double\+Nonlinear}} (int32\+\_\+t a\+Value, double $\ast$min\+Val, double $\ast$range\+Percent, int32\+\_\+t num\+Ranges)
\item 
double \mbox{\hyperlink{a00758_ae8dc426096379e56390b687762c79665}{Long\+Control\+To\+Log\+Double}} (int32\+\_\+t a\+Value, double min\+Val, double max\+Val)
\begin{DoxyCompactList}\small\item\em Convert from int32\+\_\+t control value 0x80000000...0x7\+FFFFFFF to an double ranging from min\+Val to max\+Val (logarithmic) \end{DoxyCompactList}\item 
int32\+\_\+t \mbox{\hyperlink{a00758_ad5428b221d38f3503f1c168b6873d2c2}{Log\+Double\+To\+Long\+Control}} (double a\+Value, double min\+Val, double max\+Val)
\begin{DoxyCompactList}\small\item\em Convert from an double ranging from min\+Val to max\+Val (logarithmic) to int32\+\_\+t control value 0x80000000...0x7\+FFFFFFF. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Macro Definition Documentation}
\mbox{\Hypertarget{a00758_a8676d067980b7fb9a1f53cfa5dbc048a}\label{a00758_a8676d067980b7fb9a1f53cfa5dbc048a}} 
\index{AAX\_SliderConversions.h@{AAX\_SliderConversions.h}!AAX\_SLIDERCONVERSIONS\_H@{AAX\_SLIDERCONVERSIONS\_H}}
\index{AAX\_SLIDERCONVERSIONS\_H@{AAX\_SLIDERCONVERSIONS\_H}!AAX\_SliderConversions.h@{AAX\_SliderConversions.h}}
\doxysubsubsection{\texorpdfstring{AAX\_SLIDERCONVERSIONS\_H}{AAX\_SLIDERCONVERSIONS\_H}}
{\footnotesize\ttfamily \#define AAX\+\_\+\+SLIDERCONVERSIONS\+\_\+H}

\mbox{\Hypertarget{a00758_af5bd671969b131ba73e1651befa4f51f}\label{a00758_af5bd671969b131ba73e1651befa4f51f}} 
\index{AAX\_SliderConversions.h@{AAX\_SliderConversions.h}!AAX\_LIMIT@{AAX\_LIMIT}}
\index{AAX\_LIMIT@{AAX\_LIMIT}!AAX\_SliderConversions.h@{AAX\_SliderConversions.h}}
\doxysubsubsection{\texorpdfstring{AAX\_LIMIT}{AAX\_LIMIT}}
{\footnotesize\ttfamily \#define AAX\+\_\+\+LIMIT(\begin{DoxyParamCaption}\item[{}]{v1,  }\item[{}]{first\+Val,  }\item[{}]{second\+Val }\end{DoxyParamCaption})~( (second\+Val $>$ first\+Val) ? (std\+::max)((std\+::min)(v1,second\+Val),first\+Val) \+:  (std\+::min)((std\+::max)(v1,second\+Val),first\+Val) )}



\doxysubsection{Function Documentation}
\mbox{\Hypertarget{a00758_a5125f531cd70d1d4049c99335989a0ee}\label{a00758_a5125f531cd70d1d4049c99335989a0ee}} 
\index{AAX\_SliderConversions.h@{AAX\_SliderConversions.h}!LongControlToNewRange@{LongControlToNewRange}}
\index{LongControlToNewRange@{LongControlToNewRange}!AAX\_SliderConversions.h@{AAX\_SliderConversions.h}}
\doxysubsubsection{\texorpdfstring{LongControlToNewRange()}{LongControlToNewRange()}}
{\footnotesize\ttfamily int32\+\_\+t Long\+Control\+To\+New\+Range (\begin{DoxyParamCaption}\item[{int32\+\_\+t}]{a\+Value,  }\item[{int32\+\_\+t}]{range\+Min,  }\item[{int32\+\_\+t}]{range\+Max }\end{DoxyParamCaption})}

\mbox{\Hypertarget{a00758_abb594c44cd5d4dee1ec236f7c69adacb}\label{a00758_abb594c44cd5d4dee1ec236f7c69adacb}} 
\index{AAX\_SliderConversions.h@{AAX\_SliderConversions.h}!LongToLongControl@{LongToLongControl}}
\index{LongToLongControl@{LongToLongControl}!AAX\_SliderConversions.h@{AAX\_SliderConversions.h}}
\doxysubsubsection{\texorpdfstring{LongToLongControl()}{LongToLongControl()}}
{\footnotesize\ttfamily int32\+\_\+t Long\+To\+Long\+Control (\begin{DoxyParamCaption}\item[{int32\+\_\+t}]{a\+Value,  }\item[{int32\+\_\+t}]{range\+Min,  }\item[{int32\+\_\+t}]{range\+Max }\end{DoxyParamCaption})}



Convert from int32\+\_\+t control value 0x80000000...0x7\+FFFFFFF to a int32\+\_\+t ranging from range\+Min to range\+Max (linear) 

\mbox{\Hypertarget{a00758_a8c8994b0486ed20075fd7808dc0bc01e}\label{a00758_a8c8994b0486ed20075fd7808dc0bc01e}} 
\index{AAX\_SliderConversions.h@{AAX\_SliderConversions.h}!LongControlToDouble@{LongControlToDouble}}
\index{LongControlToDouble@{LongControlToDouble}!AAX\_SliderConversions.h@{AAX\_SliderConversions.h}}
\doxysubsubsection{\texorpdfstring{LongControlToDouble()}{LongControlToDouble()}}
{\footnotesize\ttfamily double Long\+Control\+To\+Double (\begin{DoxyParamCaption}\item[{int32\+\_\+t}]{a\+Value,  }\item[{double}]{first\+Val,  }\item[{double}]{second\+Val }\end{DoxyParamCaption})}



Convert from int32\+\_\+t control value 0x80000000...0x7\+FFFFFFF to an double ranging from first\+Val to second\+Val (linear) 

\mbox{\Hypertarget{a00758_a285ce2bf578a7ceb8c12eabbd5e5ad37}\label{a00758_a285ce2bf578a7ceb8c12eabbd5e5ad37}} 
\index{AAX\_SliderConversions.h@{AAX\_SliderConversions.h}!DoubleToLongControl@{DoubleToLongControl}}
\index{DoubleToLongControl@{DoubleToLongControl}!AAX\_SliderConversions.h@{AAX\_SliderConversions.h}}
\doxysubsubsection{\texorpdfstring{DoubleToLongControl()}{DoubleToLongControl()}}
{\footnotesize\ttfamily int32\+\_\+t Double\+To\+Long\+Control (\begin{DoxyParamCaption}\item[{double}]{a\+Value,  }\item[{double}]{first\+Val,  }\item[{double}]{second\+Val }\end{DoxyParamCaption})}



Convert from an double ranging from first\+Val to second\+Val (linear) to int32\+\_\+t control value 0x80000000...0x7\+FFFFFFF. 

\mbox{\Hypertarget{a00758_a76082aa640489b279cd7683c12fcbd33}\label{a00758_a76082aa640489b279cd7683c12fcbd33}} 
\index{AAX\_SliderConversions.h@{AAX\_SliderConversions.h}!DoubleToLongControlNonlinear@{DoubleToLongControlNonlinear}}
\index{DoubleToLongControlNonlinear@{DoubleToLongControlNonlinear}!AAX\_SliderConversions.h@{AAX\_SliderConversions.h}}
\doxysubsubsection{\texorpdfstring{DoubleToLongControlNonlinear()}{DoubleToLongControlNonlinear()}}
{\footnotesize\ttfamily int32\+\_\+t Double\+To\+Long\+Control\+Nonlinear (\begin{DoxyParamCaption}\item[{double}]{a\+Value,  }\item[{double $\ast$}]{min\+Val,  }\item[{double $\ast$}]{range\+Percent,  }\item[{int32\+\_\+t}]{num\+Ranges }\end{DoxyParamCaption})}

\mbox{\Hypertarget{a00758_a81279cd99c7d7193e4f79d5c74dccf54}\label{a00758_a81279cd99c7d7193e4f79d5c74dccf54}} 
\index{AAX\_SliderConversions.h@{AAX\_SliderConversions.h}!LongControlToDoubleNonlinear@{LongControlToDoubleNonlinear}}
\index{LongControlToDoubleNonlinear@{LongControlToDoubleNonlinear}!AAX\_SliderConversions.h@{AAX\_SliderConversions.h}}
\doxysubsubsection{\texorpdfstring{LongControlToDoubleNonlinear()}{LongControlToDoubleNonlinear()}}
{\footnotesize\ttfamily double Long\+Control\+To\+Double\+Nonlinear (\begin{DoxyParamCaption}\item[{int32\+\_\+t}]{a\+Value,  }\item[{double $\ast$}]{min\+Val,  }\item[{double $\ast$}]{range\+Percent,  }\item[{int32\+\_\+t}]{num\+Ranges }\end{DoxyParamCaption})}

\mbox{\Hypertarget{a00758_ae8dc426096379e56390b687762c79665}\label{a00758_ae8dc426096379e56390b687762c79665}} 
\index{AAX\_SliderConversions.h@{AAX\_SliderConversions.h}!LongControlToLogDouble@{LongControlToLogDouble}}
\index{LongControlToLogDouble@{LongControlToLogDouble}!AAX\_SliderConversions.h@{AAX\_SliderConversions.h}}
\doxysubsubsection{\texorpdfstring{LongControlToLogDouble()}{LongControlToLogDouble()}}
{\footnotesize\ttfamily double Long\+Control\+To\+Log\+Double (\begin{DoxyParamCaption}\item[{int32\+\_\+t}]{a\+Value,  }\item[{double}]{min\+Val,  }\item[{double}]{max\+Val }\end{DoxyParamCaption})}



Convert from int32\+\_\+t control value 0x80000000...0x7\+FFFFFFF to an double ranging from min\+Val to max\+Val (logarithmic) 

\begin{DoxyNote}{Note}
This is LOGARITHMIC, so min\+Val \& max\+Val have to be \texorpdfstring{$>$}{>} zero! 
\end{DoxyNote}
\mbox{\Hypertarget{a00758_ad5428b221d38f3503f1c168b6873d2c2}\label{a00758_ad5428b221d38f3503f1c168b6873d2c2}} 
\index{AAX\_SliderConversions.h@{AAX\_SliderConversions.h}!LogDoubleToLongControl@{LogDoubleToLongControl}}
\index{LogDoubleToLongControl@{LogDoubleToLongControl}!AAX\_SliderConversions.h@{AAX\_SliderConversions.h}}
\doxysubsubsection{\texorpdfstring{LogDoubleToLongControl()}{LogDoubleToLongControl()}}
{\footnotesize\ttfamily int32\+\_\+t Log\+Double\+To\+Long\+Control (\begin{DoxyParamCaption}\item[{double}]{a\+Value,  }\item[{double}]{min\+Val,  }\item[{double}]{max\+Val }\end{DoxyParamCaption})}



Convert from an double ranging from min\+Val to max\+Val (logarithmic) to int32\+\_\+t control value 0x80000000...0x7\+FFFFFFF. 

\begin{DoxyNote}{Note}
This is LOGARITHMIC, so min\+Val \& max\+Val have to be \texorpdfstring{$>$}{>} zero! 
\end{DoxyNote}
