20 #include <pongasoft/logging/logging.h> 22 #include <base/source/fstreamer.h> 23 #include <public.sdk/source/vst/vsteditcontroller.h> 32 using namespace Steinberg;
33 using namespace Steinberg::Vst;
41 explicit VstParameters(EditController *
const iParametersOwner) : fParametersOwner{iParametersOwner}
43 DCHECK_NOTNULL_F(iParametersOwner);
47 inline ParamValue
getParamNormalized(ParamID iParamID)
const {
return fParametersOwner->getParamNormalized(iParamID); }
48 inline tresult
setParamNormalized(ParamID iParamID, ParamValue iValue)
const {
return fParametersOwner->setParamNormalized(iParamID, iValue); }
49 inline tresult
beginEdit(ParamID iParamID)
const {
return fParametersOwner->beginEdit(iParamID); }
50 inline tresult
performEdit(ParamID iParamID, ParamValue iValue)
const {
return fParametersOwner->performEdit(iParamID, iValue); }
51 inline tresult
endEdit(ParamID iParamID)
const {
return fParametersOwner->endEdit(iParamID); }
52 Vst::Parameter *
getParameterObject(ParamID iParamID)
const {
return fParametersOwner->getParameterObject(iParamID); }
58 auto parameter = getParameterObject(iParamID);
59 return parameter ? ¶meter->getInfo() :
nullptr;
69 return std::make_unique<GUIParamCx>(iParamID,
70 getParameterObject(iParamID),
82 return std::make_unique<FObjectCxCallback>(getParameterObject(iParamID),
83 std::move(iChangeCallback));
89 inline bool exists(ParamID iParamID)
const {
return getParameterObject(iParamID) !=
nullptr; }
Vst::ParameterInfo const * getParameterInfo(ParamID iParamID) const
Definition: VstParameters.h:57
EditController *const fParametersOwner
Definition: VstParameters.h:92
VstParameters(EditController *const iParametersOwner)
Definition: VstParameters.h:41
ParamValue getParamNormalized(ParamID iParamID) const
Definition: VstParameters.h:47
Vst::Parameter * getParameterObject(ParamID iParamID) const
Definition: VstParameters.h:52
tresult setParamNormalized(ParamID iParamID, ParamValue iValue) const
Definition: VstParameters.h:48
tresult endEdit(ParamID iParamID) const
Definition: VstParameters.h:51
tresult beginEdit(ParamID iParamID) const
Definition: VstParameters.h:49
std::function< void()> ChangeCallback
Definition: Parameters.h:57
Definition: VstParameters.h:38
tresult performEdit(ParamID iParamID, ParamValue iValue) const
Definition: VstParameters.h:50
std::unique_ptr< FObjectCx > connect(ParamID iParamID, Parameters::ChangeCallback iChangeCallback) const
Definition: VstParameters.h:79
std::unique_ptr< FObjectCx > connect(ParamID iParamID, Parameters::IChangeListener *iChangeListener)
Definition: VstParameters.h:66
bool exists(ParamID iParamID) const
Definition: VstParameters.h:89
std::shared_ptr< VstParameters > VstParametersSPtr
Definition: VstParameters.h:95
Definition: Parameters.h:45