\hypertarget{a01866}{}\doxysection{AAX\+\_\+\+CLog\+Taper\+Delegate\texorpdfstring{$<$}{<} T, Real\+Precision \texorpdfstring{$>$}{>} Class Template Reference}
\label{a01866}\index{AAX\_CLogTaperDelegate$<$ T, RealPrecision $>$@{AAX\_CLogTaperDelegate$<$ T, RealPrecision $>$}}


{\ttfamily \#include $<$AAX\+\_\+\+CLog\+Taper\+Delegate.\+h$>$}



Inheritance diagram for AAX\+\_\+\+CLog\+Taper\+Delegate\texorpdfstring{$<$}{<} T, Real\+Precision \texorpdfstring{$>$}{>}\+:
% FIG 0


Collaboration diagram for AAX\+\_\+\+CLog\+Taper\+Delegate\texorpdfstring{$<$}{<} T, Real\+Precision \texorpdfstring{$>$}{>}\+:
% FIG 1


\doxysubsection{Description}
\subsubsection*{template$<$typename T, int32\+\_\+t Real\+Precision = 1000$>$\newline
class AAX\+\_\+\+CLog\+Taper\+Delegate$<$ T, Real\+Precision $>$}
A logarithmic taper conforming to \mbox{\hyperlink{a02338}{AAX\+\_\+\+ITaper\+Delegate}}. 

This taper spaces a parameter\textquotesingle{}s real values between its minimum and maximum bounds, with a natural logarithmic mapping between the parameter\textquotesingle{}s real and normalized values.

\begin{DoxyParagraph}{Real\+Precision}
In addition to its type templatization, this taper includes a precision template parameter. Real\+Precision is a multiplier that works in conjunction with the round() function to limit the precision of the real values provided by this taper. For example, if Real\+Precision is 1000, it will round to the closest 0.\+001 when doing any sort of value conversion. If Real\+Precision is 1, it will round to the nearest integer. If Real\+Precision is 1000000, it will round to the nearest 0.\+000001. This is particularly useful for preventing things like 1.\+9999999 truncating down to 1 instead of rounding up to 2.
\end{DoxyParagraph}
To accomplish this behavior, the taper multiplies its unrounded parameter values by Real\+Precision, rounds the result to the nearest valid value, then divides Real\+Precision back out.

Rounding will be disabled if Real\+Precision is set to a value less than 1 \doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{a01866_a757656707e996759b995e7fc0f74d820}{AAX\+\_\+\+CLog\+Taper\+Delegate}} (T min\+Value=0, T max\+Value=1)
\begin{DoxyCompactList}\small\item\em Constructs a Log Taper with specified minimum and maximum values. \end{DoxyCompactList}\item 
\mbox{\hyperlink{a01866}{AAX\+\_\+\+CLog\+Taper\+Delegate}}$<$ T, Real\+Precision $>$ $\ast$ \mbox{\hyperlink{a01866_afac51287c0ecb4490fb75064577d8292}{Clone}} () const \mbox{\hyperlink{a00542_ac2f24a5172689ae684344abdcce55463}{AAX\+\_\+\+OVERRIDE}}
\begin{DoxyCompactList}\small\item\em Constructs and returns a copy of the taper delegate. \end{DoxyCompactList}\item 
T \mbox{\hyperlink{a01866_a5c142294e18dcfac6069e4e5cf04277f}{Get\+Minimum\+Value}} () const \mbox{\hyperlink{a00542_ac2f24a5172689ae684344abdcce55463}{AAX\+\_\+\+OVERRIDE}}
\begin{DoxyCompactList}\small\item\em Returns the taper\textquotesingle{}s minimum real value. \end{DoxyCompactList}\item 
T \mbox{\hyperlink{a01866_a758cba19d16615578682d0c6af7d0496}{Get\+Maximum\+Value}} () const \mbox{\hyperlink{a00542_ac2f24a5172689ae684344abdcce55463}{AAX\+\_\+\+OVERRIDE}}
\begin{DoxyCompactList}\small\item\em Returns the taper\textquotesingle{}s maximum real value. \end{DoxyCompactList}\item 
T \mbox{\hyperlink{a01866_ae0c5ef04b9f6e62cff0d73fb9aad7318}{Constrain\+Real\+Value}} (T value) const \mbox{\hyperlink{a00542_ac2f24a5172689ae684344abdcce55463}{AAX\+\_\+\+OVERRIDE}}
\begin{DoxyCompactList}\small\item\em Applies a contraint to the value and returns the constrained value. \end{DoxyCompactList}\item 
T \mbox{\hyperlink{a01866_a363e09fe8517d4a5ecb151483f011752}{Normalized\+To\+Real}} (double normalized\+Value) const \mbox{\hyperlink{a00542_ac2f24a5172689ae684344abdcce55463}{AAX\+\_\+\+OVERRIDE}}
\begin{DoxyCompactList}\small\item\em Converts a normalized value to a real value. \end{DoxyCompactList}\item 
double \mbox{\hyperlink{a01866_abcc5e51eebe04ff347de512a103880de}{Real\+To\+Normalized}} (T real\+Value) const \mbox{\hyperlink{a00542_ac2f24a5172689ae684344abdcce55463}{AAX\+\_\+\+OVERRIDE}}
\begin{DoxyCompactList}\small\item\em Normalizes a real parameter value. \end{DoxyCompactList}\end{DoxyCompactItemize}
\begin{DoxyCompactItemize}
\item 
virtual \mbox{\hyperlink{a02338}{AAX\+\_\+\+ITaper\+Delegate}} $\ast$ \mbox{\hyperlink{a02338_a710ff3aae07de10dfebe7c027e4b33e2}{Clone}} () const =0
\begin{DoxyCompactList}\small\item\em Constructs and returns a copy of the taper delegate. \end{DoxyCompactList}\item 
virtual T \mbox{\hyperlink{a02338_a9b14f7d73d614b6c012ed03fadb9f0eb}{Get\+Maximum\+Value}} () const =0
\begin{DoxyCompactList}\small\item\em Returns the taper\textquotesingle{}s maximum real value. \end{DoxyCompactList}\item 
virtual T \mbox{\hyperlink{a02338_ac51bda25adc6f4ce320c0dd41fa332c7}{Get\+Minimum\+Value}} () const =0
\begin{DoxyCompactList}\small\item\em Returns the taper\textquotesingle{}s minimum real value. \end{DoxyCompactList}\item 
virtual T \mbox{\hyperlink{a02338_a1de7acdc2b3e114b6686bf845c2465f1}{Constrain\+Real\+Value}} (T value) const =0
\begin{DoxyCompactList}\small\item\em Applies a contraint to the value and returns the constrained value. \end{DoxyCompactList}\item 
virtual T \mbox{\hyperlink{a02338_a0aea0765b42855205bfab84673a2de33}{Normalized\+To\+Real}} (double normalized\+Value) const =0
\begin{DoxyCompactList}\small\item\em Converts a normalized value to a real value. \end{DoxyCompactList}\item 
virtual double \mbox{\hyperlink{a02338_ab017fe7e1c1dcf6191f8b4e8b09f8add}{Real\+To\+Normalized}} (T real\+Value) const =0
\begin{DoxyCompactList}\small\item\em Normalizes a real parameter value. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Public Member Functions inherited from \mbox{\hyperlink{a02334}{AAX\+\_\+\+ITaper\+Delegate\+Base}}}
\begin{DoxyCompactItemize}
\item 
virtual \mbox{\hyperlink{a02334_a38bf3326334b9bc248c62faff2492d38}{$\sim$\+AAX\+\_\+\+ITaper\+Delegate\+Base}} ()
\begin{DoxyCompactList}\small\item\em Virtual destructor. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
T \mbox{\hyperlink{a01866_a82712265ea02e84afbc89d2bd73ad0c3}{Round}} (double i\+Value) const
\end{DoxyCompactItemize}


\doxysubsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{a01866_a757656707e996759b995e7fc0f74d820}\label{a01866_a757656707e996759b995e7fc0f74d820}} 
\index{AAX\_CLogTaperDelegate$<$ T, RealPrecision $>$@{AAX\_CLogTaperDelegate$<$ T, RealPrecision $>$}!AAX\_CLogTaperDelegate@{AAX\_CLogTaperDelegate}}
\index{AAX\_CLogTaperDelegate@{AAX\_CLogTaperDelegate}!AAX\_CLogTaperDelegate$<$ T, RealPrecision $>$@{AAX\_CLogTaperDelegate$<$ T, RealPrecision $>$}}
\doxysubsubsection{\texorpdfstring{AAX\_CLogTaperDelegate()}{AAX\_CLogTaperDelegate()}}
{\footnotesize\ttfamily template$<$typename T , int32\+\_\+t Real\+Precision$>$ \\
\mbox{\hyperlink{a01866}{AAX\+\_\+\+CLog\+Taper\+Delegate}}$<$ T, Real\+Precision $>$\mbox{\hyperlink{a01866}{\+::\+AAX\+\_\+\+CLog\+Taper\+Delegate}} (\begin{DoxyParamCaption}\item[{T}]{min\+Value = {\ttfamily 0},  }\item[{T}]{max\+Value = {\ttfamily 1} }\end{DoxyParamCaption})}



Constructs a Log Taper with specified minimum and maximum values. 

\begin{DoxyNote}{Note}
The parameter\textquotesingle{}s default value should lie within the min to max range.
\end{DoxyNote}

\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em min\+Value} & \\
\hline
\mbox{\texttt{ in}}  & {\em max\+Value} & \\
\hline
\end{DoxyParams}


\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{a01866_afac51287c0ecb4490fb75064577d8292}\label{a01866_afac51287c0ecb4490fb75064577d8292}} 
\index{AAX\_CLogTaperDelegate$<$ T, RealPrecision $>$@{AAX\_CLogTaperDelegate$<$ T, RealPrecision $>$}!Clone@{Clone}}
\index{Clone@{Clone}!AAX\_CLogTaperDelegate$<$ T, RealPrecision $>$@{AAX\_CLogTaperDelegate$<$ T, RealPrecision $>$}}
\doxysubsubsection{\texorpdfstring{Clone()}{Clone()}}
{\footnotesize\ttfamily template$<$typename T , int32\+\_\+t Real\+Precision$>$ \\
\mbox{\hyperlink{a01866}{AAX\+\_\+\+CLog\+Taper\+Delegate}}$<$ T, Real\+Precision $>$ $\ast$ \mbox{\hyperlink{a01866}{AAX\+\_\+\+CLog\+Taper\+Delegate}}$<$ T, Real\+Precision $>$\+::\+Clone (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [virtual]}}



Constructs and returns a copy of the taper delegate. 

In general, this method\textquotesingle{}s implementation can use a simple copy constructor\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T>}
\DoxyCodeLine{AAX\_CSubclassTaperDelegate<T>*\ \ AAX\_CSubclassTaperDelegate<T>::Clone()\textcolor{keyword}{\ const}}
\DoxyCodeLine{\textcolor{keyword}{}\{}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{new}\ AAX\_CSubclassTaperDelegate(*\textcolor{keyword}{this});}
\DoxyCodeLine{\}}

\end{DoxyCode}
 

Implements \mbox{\hyperlink{a02338_a710ff3aae07de10dfebe7c027e4b33e2}{AAX\+\_\+\+ITaper\+Delegate$<$ T $>$}}.

\mbox{\Hypertarget{a01866_a5c142294e18dcfac6069e4e5cf04277f}\label{a01866_a5c142294e18dcfac6069e4e5cf04277f}} 
\index{AAX\_CLogTaperDelegate$<$ T, RealPrecision $>$@{AAX\_CLogTaperDelegate$<$ T, RealPrecision $>$}!GetMinimumValue@{GetMinimumValue}}
\index{GetMinimumValue@{GetMinimumValue}!AAX\_CLogTaperDelegate$<$ T, RealPrecision $>$@{AAX\_CLogTaperDelegate$<$ T, RealPrecision $>$}}
\doxysubsubsection{\texorpdfstring{GetMinimumValue()}{GetMinimumValue()}}
{\footnotesize\ttfamily template$<$typename T , int32\+\_\+t Real\+Precision = 1000$>$ \\
T \mbox{\hyperlink{a01866}{AAX\+\_\+\+CLog\+Taper\+Delegate}}$<$ T, Real\+Precision $>$\+::\+Get\+Minimum\+Value (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}



Returns the taper\textquotesingle{}s minimum real value. 



Implements \mbox{\hyperlink{a02338_ac51bda25adc6f4ce320c0dd41fa332c7}{AAX\+\_\+\+ITaper\+Delegate$<$ T $>$}}.

\mbox{\Hypertarget{a01866_a758cba19d16615578682d0c6af7d0496}\label{a01866_a758cba19d16615578682d0c6af7d0496}} 
\index{AAX\_CLogTaperDelegate$<$ T, RealPrecision $>$@{AAX\_CLogTaperDelegate$<$ T, RealPrecision $>$}!GetMaximumValue@{GetMaximumValue}}
\index{GetMaximumValue@{GetMaximumValue}!AAX\_CLogTaperDelegate$<$ T, RealPrecision $>$@{AAX\_CLogTaperDelegate$<$ T, RealPrecision $>$}}
\doxysubsubsection{\texorpdfstring{GetMaximumValue()}{GetMaximumValue()}}
{\footnotesize\ttfamily template$<$typename T , int32\+\_\+t Real\+Precision = 1000$>$ \\
T \mbox{\hyperlink{a01866}{AAX\+\_\+\+CLog\+Taper\+Delegate}}$<$ T, Real\+Precision $>$\+::\+Get\+Maximum\+Value (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}



Returns the taper\textquotesingle{}s maximum real value. 



Implements \mbox{\hyperlink{a02338_a9b14f7d73d614b6c012ed03fadb9f0eb}{AAX\+\_\+\+ITaper\+Delegate$<$ T $>$}}.

\mbox{\Hypertarget{a01866_ae0c5ef04b9f6e62cff0d73fb9aad7318}\label{a01866_ae0c5ef04b9f6e62cff0d73fb9aad7318}} 
\index{AAX\_CLogTaperDelegate$<$ T, RealPrecision $>$@{AAX\_CLogTaperDelegate$<$ T, RealPrecision $>$}!ConstrainRealValue@{ConstrainRealValue}}
\index{ConstrainRealValue@{ConstrainRealValue}!AAX\_CLogTaperDelegate$<$ T, RealPrecision $>$@{AAX\_CLogTaperDelegate$<$ T, RealPrecision $>$}}
\doxysubsubsection{\texorpdfstring{ConstrainRealValue()}{ConstrainRealValue()}}
{\footnotesize\ttfamily template$<$typename T , int32\+\_\+t Real\+Precision$>$ \\
T \mbox{\hyperlink{a01866}{AAX\+\_\+\+CLog\+Taper\+Delegate}}$<$ T, Real\+Precision $>$\+::\+Constrain\+Real\+Value (\begin{DoxyParamCaption}\item[{T}]{value }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [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.

\begin{DoxyNote}{Note}
This is the function that should actually enforces the constraints in Normalize\+To\+Real() and \mbox{\hyperlink{a01866_abcc5e51eebe04ff347de512a103880de}{Real\+To\+Normalized()}}.
\end{DoxyNote}

\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em value} & The unconstrained value \\
\hline
\end{DoxyParams}


Implements \mbox{\hyperlink{a02338_a1de7acdc2b3e114b6686bf845c2465f1}{AAX\+\_\+\+ITaper\+Delegate$<$ T $>$}}.

\mbox{\Hypertarget{a01866_a363e09fe8517d4a5ecb151483f011752}\label{a01866_a363e09fe8517d4a5ecb151483f011752}} 
\index{AAX\_CLogTaperDelegate$<$ T, RealPrecision $>$@{AAX\_CLogTaperDelegate$<$ T, RealPrecision $>$}!NormalizedToReal@{NormalizedToReal}}
\index{NormalizedToReal@{NormalizedToReal}!AAX\_CLogTaperDelegate$<$ T, RealPrecision $>$@{AAX\_CLogTaperDelegate$<$ T, RealPrecision $>$}}
\doxysubsubsection{\texorpdfstring{NormalizedToReal()}{NormalizedToReal()}}
{\footnotesize\ttfamily template$<$typename T , int32\+\_\+t Real\+Precision$>$ \\
T \mbox{\hyperlink{a01866}{AAX\+\_\+\+CLog\+Taper\+Delegate}}$<$ T, Real\+Precision $>$\+::\+Normalized\+To\+Real (\begin{DoxyParamCaption}\item[{double}]{normalized\+Value }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [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 \mbox{\hyperlink{a01866_abcc5e51eebe04ff347de512a103880de}{Real\+To\+Normalized()}}, to within the roundoff precision of the individual taper implementation.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em normalized\+Value} & The normalized value that will be converted \\
\hline
\end{DoxyParams}


Implements \mbox{\hyperlink{a02338_a0aea0765b42855205bfab84673a2de33}{AAX\+\_\+\+ITaper\+Delegate$<$ T $>$}}.



References \mbox{\hyperlink{a00948_ae8de30637f08cd29bb0e27526ce9e21b}{AAX\+::\+Safe\+Log()}}.

Here is the call graph for this function\+:
% FIG 2
\mbox{\Hypertarget{a01866_abcc5e51eebe04ff347de512a103880de}\label{a01866_abcc5e51eebe04ff347de512a103880de}} 
\index{AAX\_CLogTaperDelegate$<$ T, RealPrecision $>$@{AAX\_CLogTaperDelegate$<$ T, RealPrecision $>$}!RealToNormalized@{RealToNormalized}}
\index{RealToNormalized@{RealToNormalized}!AAX\_CLogTaperDelegate$<$ T, RealPrecision $>$@{AAX\_CLogTaperDelegate$<$ T, RealPrecision $>$}}
\doxysubsubsection{\texorpdfstring{RealToNormalized()}{RealToNormalized()}}
{\footnotesize\ttfamily template$<$typename T , int32\+\_\+t Real\+Precision$>$ \\
double \mbox{\hyperlink{a01866}{AAX\+\_\+\+CLog\+Taper\+Delegate}}$<$ T, Real\+Precision $>$\+::\+Real\+To\+Normalized (\begin{DoxyParamCaption}\item[{T}]{real\+Value }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [virtual]}}



Normalizes a real parameter value. 

This is where the actual taper algorithm is implemented.

This function should perform the exact inverse of \mbox{\hyperlink{a01866_a363e09fe8517d4a5ecb151483f011752}{Normalized\+To\+Real()}}, to within the roundoff precision of the individual taper implementation.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em real\+Value} & The real parameter value that will be normalized \\
\hline
\end{DoxyParams}


Implements \mbox{\hyperlink{a02338_ab017fe7e1c1dcf6191f8b4e8b09f8add}{AAX\+\_\+\+ITaper\+Delegate$<$ T $>$}}.



References \mbox{\hyperlink{a00948_ae8de30637f08cd29bb0e27526ce9e21b}{AAX\+::\+Safe\+Log()}}.

Here is the call graph for this function\+:
% FIG 3
\mbox{\Hypertarget{a01866_a82712265ea02e84afbc89d2bd73ad0c3}\label{a01866_a82712265ea02e84afbc89d2bd73ad0c3}} 
\index{AAX\_CLogTaperDelegate$<$ T, RealPrecision $>$@{AAX\_CLogTaperDelegate$<$ T, RealPrecision $>$}!Round@{Round}}
\index{Round@{Round}!AAX\_CLogTaperDelegate$<$ T, RealPrecision $>$@{AAX\_CLogTaperDelegate$<$ T, RealPrecision $>$}}
\doxysubsubsection{\texorpdfstring{Round()}{Round()}}
{\footnotesize\ttfamily template$<$typename T , int32\+\_\+t Real\+Precision$>$ \\
T \mbox{\hyperlink{a01866}{AAX\+\_\+\+CLog\+Taper\+Delegate}}$<$ T, Real\+Precision $>$\+::\+Round (\begin{DoxyParamCaption}\item[{double}]{i\+Value }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [protected]}}



The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{a00674}{AAX\+\_\+\+CLog\+Taper\+Delegate.\+h}}\end{DoxyCompactItemize}
