19#include "public.sdk/source/vst/vstparameters.h"
20#include "pluginterfaces/base/ibstream.h"
21#include "pluginterfaces/vst/ivstparameterchanges.h"
22#include "public.sdk/source/vst/vstaudioeffect.h"
23#include "pluginterfaces/base/ustring.h"
47 virtual void toString (ParamValue normValue, String128
string)
const;
48 virtual bool fromString (
const TChar*
string, ParamValue& normValue)
const;
66 LogParameter(
const TChar* title, ParamID tag,
const TChar* units = 0,
67 ParamValue minPlain = 0., ParamValue maxPlain = 1., ParamValue defaultValuePlain = 0.,
68 int32 stepCount = 0, int32 flags = ParameterInfo::kCanAutomate, UnitID unitID = kRootUnitId);
70 virtual void toString (ParamValue normValue, String128
string)
const;
71 virtual bool fromString (
const TChar*
string, ParamValue& normValue)
const;
72 virtual ParamValue toPlain(ParamValue _valueNormalized)
const;
73 virtual ParamValue toNormalized(ParamValue plainValue)
const;
74 virtual ParamValue getMin ()
const {
return minPlain;}
75 virtual void setMin (ParamValue value) {minPlain = value;}
76 virtual ParamValue getMax ()
const {
return maxPlain;}
77 virtual void setMax (ParamValue value) {maxPlain = value;}
85 inline float calcLogParameter(
float fNormalizedParam)
const
87 if(fNormalizedParam <= 0.0)
return 0.0;
88 if(fNormalizedParam >= 1.0)
return 1.0;
96 inline float calcLogPluginValue(
float fPluginValue)
const
98 if(fPluginValue <= 0.0)
return 0.0;
99 if(fPluginValue >= 1.0)
return 1.0;
123 ParamValue minPlain = 0., ParamValue maxPlain = 1., ParamValue defaultValuePlain = 0.,
124 int32 stepCount = 0, int32 flags = ParameterInfo::kCanAutomate, UnitID unitID = kRootUnitId);
126 virtual void toString (ParamValue normValue, String128
string)
const;
127 virtual bool fromString (
const TChar*
string, ParamValue& normValue)
const;
128 virtual ParamValue toPlain(ParamValue _valueNormalized)
const;
129 virtual ParamValue toNormalized(ParamValue plainValue)
const;
130 virtual ParamValue getMin ()
const {
return minPlain;}
131 virtual void setMin (ParamValue value) {minPlain = value;}
132 virtual ParamValue getMax ()
const {
return maxPlain;}
133 virtual void setMax (ParamValue value) {maxPlain = value;}
141 inline float calcAntiLogParameter(
float fNormalizedParam)
const
143 if(fNormalizedParam <= 0.0)
return 0.0;
144 if(fNormalizedParam >= 1.0)
return 1.0;
152 inline float calcAntiLogPluginValue(
float fPluginValue)
const
154 if(fPluginValue <= 0.0)
return 0.0;
155 if(fPluginValue >= 1.0)
return 1.0;
159 if(transformed >= 1.0) transformed = 1.0;
180 ParamValue minPlain = 0., ParamValue maxPlain = 1., ParamValue defaultValuePlain = 0.,
181 int32 stepCount = 0, int32 flags = ParameterInfo::kCanAutomate, UnitID unitID = kRootUnitId);
183 virtual void toString (ParamValue normValue, String128
string)
const;
184 virtual bool fromString (
const TChar*
string, ParamValue& normValue)
const;
185 virtual ParamValue toPlain(ParamValue _valueNormalized)
const;
186 virtual ParamValue toNormalized(ParamValue plainValue)
const;
187 virtual ParamValue getMin ()
const {
return minPlain;}
188 virtual void setMin (ParamValue value) {minPlain = value;}
189 virtual ParamValue getMax ()
const {
return maxPlain;}
190 virtual void setMax (ParamValue value) {maxPlain = value;}
197 inline float calcVoltOctaveParameter(
float fCookedParam)
const
199 double dOctaves = log2(getMax()/getMin());
200 return log2( fCookedParam/getMin() )/dOctaves;
205 inline float calcVoltOctavePluginValue(
float fPluginValue)
const
207 double dOctaves = log2(getMax()/getMin());
208 float fDisplay = getMin()*exp2(fPluginValue*dOctaves);
209 float fDiff = getMax() - getMin();
210 return (fDisplay - getMin())/fDiff;
The AntiLogParameter object encapsulates an anti-log parameter. Note that the standard log potentiome...
Definition: customparameters.h:120
The LogParameter object encapsulates a log parameter. Note that the standard log potentiometer in ele...
Definition: customparameters.h:64
The PeakParameter object encapsulates a uni-polar parameter such as a metering variable.
Definition: customparameters.h:43
The VoltOctaveParameter object encapsulates a Volt-per-Octave parameter for emulating analog synthesi...
Definition: customparameters.h:177
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 double kCTCoefficient
concave and/or convex transform correction factor
Definition: guiconstants.h:135
const double kCTCorrFactorAntiUnity
inverse concave/convex transform correction factor at x = 1
Definition: guiconstants.h:163
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
globally utilized constants and enumerations