5 #ifndef __PARAMETERCONVERSIONS_H_INCLUDED
6 #define __PARAMETERCONVERSIONS_H_INCLUDED
11 #define _USE_MATH_DEFINES
14 #define deg2level (1.0f / 360.0f)
15 #define halfDeg2level (1.0f / 180.0f)
16 #define level2deg (360.0f)
19 #define parmFalse 0.0f
21 #define parmDirOmni 0.0f
22 #define parmDirCard 0.5f
24 #define parmDirHyper 0.7f
26 #define parmFmtFuMa 0.0f
27 #define parmFmtACNSN3D 1.0f
31 return (
float)exp(M_LN10 * ((
double)db / 20.0));
36 return (
float)(20.0f * log((
double)level) / M_LN10);
41 return (360.0f * value);
66 return (360.0f * (value - 0.5f));
71 return (180.0f * (value - 0.5f));
86 return (180.0f * (value - 0.5f));
91 return (2.0f * value);
96 return (
float)((M_PI * x) - (M_PI_2));
101 return (
float)((x + (M_PI_2)) / M_PI);
106 return (
float)((x + (M_PI)) / (2 * M_PI));
111 return (
float)((2*M_PI * x) - M_PI);
116 return (
float)(2*M_PI * x);
121 return (24.0f * x) - 12.0f;
126 x = (x > 12.0f) ? 12.0f : x;
127 x = (x < -12.0f) ? -12.0f : x;
128 return (x + 12.0f) / 24.0f;
133 x = (x > 12.0f) ? 12.0f : x;
134 x = (x < -140.0f) ? -140.0f : x;
136 return (x + 12.0f) / 24.0f;
138 return (x + 140.0f) / 280.0f;
144 return (x - 0.5f) * 24.0f;
146 return (x - 0.5f) * 280.0f;
156 return (
float)exp(M_LN2 * (
double)x) / 4.0f;
161 dist = (dist > 4.0f) ? 4.0f : dist;
162 dist = (dist < 0.25f) ? 0.25f : dist;
163 return (
float)(log((
double)dist * 4.0) / M_LN2);
183 return (b ? 1.0f : 0.0f);
#define level2deg
Definition: ParameterConversions.h:16
float parm2pi(float x)
Definition: ParameterConversions.h:109
#define halfDeg2level
Definition: ParameterConversions.h:15
float degPM902Parm(float x)
Definition: ParameterConversions.h:54
float parm2degPM90(float value)
Definition: ParameterConversions.h:69
float deg1802Parm(float x)
Definition: ParameterConversions.h:79
float parm2Deg180(float x)
Definition: ParameterConversions.h:74
float halfpi2Parm(float x)
Definition: ParameterConversions.h:99
float pi2Parm(float x)
Definition: ParameterConversions.h:104
float bool2Parm(bool b)
Definition: ParameterConversions.h:181
#define deg2level
Definition: ParameterConversions.h:14
float channelGain2Parm(float x)
Definition: ParameterConversions.h:131
float dist2Parm(float dist)
Definition: ParameterConversions.h:159
float parm2Deg360(float x)
Definition: ParameterConversions.h:59
float db2level(float db)
Definition: ParameterConversions.h:29
float parm22pi(float x)
Definition: ParameterConversions.h:114
float parm2halfpi(float x)
Definition: ParameterConversions.h:94
float PlusMinus122Parm(float x)
Definition: ParameterConversions.h:124
float zeroTwoConvert(float value)
Definition: ParameterConversions.h:89
float parm2Dist(float x)
Definition: ParameterConversions.h:154
float degree360Convert(float value)
Definition: ParameterConversions.h:39
float level2db(float level)
Definition: ParameterConversions.h:34
float dir2Parm(float dir)
Definition: ParameterConversions.h:171
float parm2ChannelGain(float x)
Definition: ParameterConversions.h:141
float parm2PlusMinus12(float x)
Definition: ParameterConversions.h:119
float deg3602Parm(float x)
Definition: ParameterConversions.h:44
float degreePM90Convert(float value)
Definition: ParameterConversions.h:84
float degPM1802Parm(float x)
Definition: ParameterConversions.h:49
float parm2degPM180(float value)
Definition: ParameterConversions.h:64
float parm2Dir(float x)
Definition: ParameterConversions.h:166
bool parm2Bool(float x)
Definition: ParameterConversions.h:176