13#ifndef _guiconstants_h
14#define _guiconstants_h
16#define _MATH_DEFINES_DEFINED
38enum { tinyGUI, verySmallGUI, smallGUI, normalGUI, largeGUI, veryLargeGUI };
52 if (tag >= 131072 && tag <= 131999)
90#define enumToInt(ENUM) static_cast<int>(ENUM)
102#define compareEnumToInt(ENUM,INT) (static_cast<int>(ENUM) == (INT))
115#define compareIntToEnum(INT,ENUM) ((INT) == static_cast<int>(ENUM))
128#define convertIntToEnum(INT,ENUM) static_cast<ENUM>(INT)
184const double kPi = 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899;
191const double kTwoPi = 2.0*3.14159265358979323846264338327950288419716939937510582097494459230781640628620899;
216#define FLT_EPSILON_PLUS 1.192092896e-07
218#define FLT_EPSILON_MINUS -1.192092896e-07
220#define FLT_MIN_PLUS 1.175494351e-38
222#define FLT_MIN_MINUS -1.175494351e-38
225#define _MATH_DEFINES_DEFINED
255enum class taper { kLinearTaper, kLogTaper, kAntiLogTaper, kVoltOctaveTaper };
288enum class controlVariableType { kFloat, kDouble, kInt, kTypedEnumStringList, kMeter, kNonVariableBoundControl };
329 sampleRate = samplingRate;
332 a = exp(-
kTwoPi / (smoothingTimeInMSec * 0.001 * sampleRate));
336 linInc = (maxVal - minVal) / (smoothingTimeInMSec * 0.001 * sampleRate);
354 minVal = minControlValue;
355 maxVal = maxControlValue;
356 sampleRate = samplingRate;
357 smoothingTimeInMSec = smoothingTimeInMs;
373 if (smootherType == smoothingMethod::kLPFSmoother)
375 z = (in * b) + (z * a);
418 T sampleRate = 44100;
419 T smoothingTimeInMSec = 100.0;
The ParamSmoother object performs parameter smoothing on GUI control information. You can choose line...
Definition: guiconstants.h:320
bool smoothParameter(T in, T &out)
Definition: guiconstants.h:371
void setSampleRate(T samplingRate)
Definition: guiconstants.h:327
void initParamSmoother(T smoothingTimeInMs, T samplingRate, T initValue, T minControlValue, T maxControlValue, smoothingMethod smoother=smoothingMethod::kLPFSmoother)
Definition: guiconstants.h:347
bool isReservedTag(int tag)
check to see if a tag is reserved: ASPiK defines several reserved control ID values.
Definition: guiconstants.h:49
bool isBonusParameter(int tag)
check to see if a tag is Bonus Parameter: these should NOT be added to API parameter lists
Definition: guiconstants.h:67
const double kCTCorrFactorUnity
concave/convex transform correction factor at x = 1
Definition: guiconstants.h:156
const double kCTCorrFactorAntiLogScale
concave/convex transform scaling factor
Definition: guiconstants.h:177
const double kCTCorrFactorAnitZero
inverse concave/convex transform factor at x = 0
Definition: guiconstants.h:149
const float ENVELOPE_DIGITAL_TC
ln(1%)
Definition: guiconstants.h:204
const double kCTCoefficient
concave and/or convex transform correction factor
Definition: guiconstants.h:135
smoothingMethod
Use this strongly typed enum to easily set the smoothing type.
Definition: guiconstants.h:240
const double kCTCorrFactorAntiUnity
inverse concave/convex transform correction factor at x = 1
Definition: guiconstants.h:163
controlVariableType
Use this strongly typed enum to easily set the control's behavior; this tells the PluginParameter obj...
Definition: guiconstants.h:288
meterCal
Use this strongly typed enum to easily set meter calibration.
Definition: guiconstants.h:270
boundVariableType
Use this strongly typed enum to easily set the control's linked variable datatype (for automatic vari...
Definition: guiconstants.h:304
const double kTwoPi
2pi to 80 decimal places
Definition: guiconstants.h:191
const double kCTCorrFactorAntiLog
concave/convex transform correction factor
Definition: guiconstants.h:170
const double kCTCorrFactorZero
concave/convex transform correction factor at x = 0
Definition: guiconstants.h:142
const uint32_t ENVELOPE_DETECT_MODE_RMS
SQRT((1/N)|x|^2)
Definition: guiconstants.h:201
taper
Use this strongly typed enum to easily set the control taper.
Definition: guiconstants.h:255
const float GUI_METER_UPDATE_INTERVAL_MSEC
repaint interval; larger = slower
Definition: guiconstants.h:211
const uint32_t ENVELOPE_DETECT_MODE_MS
(1/N)|x|^2
Definition: guiconstants.h:200
const uint32_t ENVELOPE_DETECT_MODE_PEAK
|x|
Definition: guiconstants.h:199
const float ENVELOPE_ANALOG_TC
ln(36.7%)
Definition: guiconstants.h:205
const double kPi
pi to 80 decimal places
Definition: guiconstants.h:184
const uint32_t ENVELOPE_DETECT_MODE_NONE
not used
Definition: guiconstants.h:202
const unsigned int PLUGIN_SIDE_BYPASS
RESERVED PARAMETER ID VALUE.
Definition: guiconstants.h:25
const unsigned int WRITE_PRESET_FILE
RESERVED PARAMETER ID VALUE.
Definition: guiconstants.h:29
const unsigned int SCALE_GUI_SIZE
RESERVED PARAMETER ID VALUE.
Definition: guiconstants.h:30
const unsigned int VECTOR_JOYSTICK
RESERVED PARAMETER ID VALUE.
Definition: guiconstants.h:27
const float GUI_METER_MIN_DB
min GUI value in dB
Definition: guiconstants.h:212
const unsigned int XY_TRACKPAD
RESERVED PARAMETER ID VALUE.
Definition: guiconstants.h:26
const unsigned int CUSTOM_VIEW_BASE
ID values for Custom Views (not necessarily required)
Definition: guiconstants.h:35
const unsigned int PRESET_NAME
RESERVED PARAMETER ID VALUE.
Definition: guiconstants.h:28