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; }
bool exists(ParamID iParamID) const
Definition: VstParameters.h:89
VstParameters(EditController *const iParametersOwner)
Definition: VstParameters.h:41
Vst::Parameter * getParameterObject(ParamID iParamID) const
Definition: VstParameters.h:52
std::function< void()> ChangeCallback
A callback that will be invoked for changes.
Definition: Parameters.h:55
tresult setParamNormalized(ParamID iParamID, ParamValue iValue) const
Definition: VstParameters.h:48
ParamValue getParamNormalized(ParamID iParamID) const
Definition: VstParameters.h:47
tresult beginEdit(ParamID iParamID) const
Definition: VstParameters.h:49
std::unique_ptr< FObjectCx > connect(ParamID iParamID, Parameters::IChangeListener *iChangeListener)
Definition: VstParameters.h:66
This class acts as a facade/proxy to the vst parameters managed by the host daw.
Definition: VstParameters.h:38
std::unique_ptr< FObjectCx > connect(ParamID iParamID, Parameters::ChangeCallback iChangeCallback) const
Definition: VstParameters.h:79
Vst::ParameterInfo const * getParameterInfo(ParamID iParamID) const
Definition: VstParameters.h:57
std::shared_ptr< VstParameters > VstParametersSPtr
Definition: VstParameters.h:95
tresult endEdit(ParamID iParamID) const
Definition: VstParameters.h:51
tresult performEdit(ParamID iParamID, ParamValue iValue) const
Definition: VstParameters.h:50
Interface to implement to receive parameter changes.
Definition: Parameters.h:43
EditController *const fParametersOwner
Definition: VstParameters.h:92