Skip to content

Commit

Permalink
fixing VST3 program changes (#252)
Browse files Browse the repository at this point in the history
* fixing VST3 program changes
* pushing version to 0.9.1
  • Loading branch information
defiantnerd committed May 8, 2024
1 parent 4cc7f87 commit eb8b190
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ option(CLAP_WRAPPER_WINDOWS_SINGLE_FILE "Build a single fine (rather than folder

project(clap-wrapper
LANGUAGES C CXX
VERSION 0.9.0
VERSION 0.9.1
DESCRIPTION "CLAP-as-X wrappers"
)
set(CLAP_WRAPPER_VERSION "${CMAKE_PROJECT_VERSION}" CACHE STRING "Version of the wrapper project")
Expand Down
4 changes: 0 additions & 4 deletions src/detail/vst3/parameter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ Vst3Parameter::~Vst3Parameter() = default;

bool Vst3Parameter::setNormalized(Steinberg::Vst::ParamValue v)
{
if (isMidi && (info.flags & Steinberg::Vst::ParameterInfo::kIsProgramChange))
{
return true;
}
return super::setNormalized(v);
}

Expand Down
4 changes: 4 additions & 0 deletions src/detail/vst3/parameter.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ class Vst3Parameter : public Steinberg::Vst::Parameter

inline double asClapValue(double vst3value) const
{
if (info.stepCount > 0)
{
return (vst3value * info.stepCount) + min_value;
}
return (vst3value * (max_value - min_value)) + min_value;
}
inline double asVst3Value(double clapvalue) const
Expand Down
19 changes: 10 additions & 9 deletions src/wrapasvst3.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,15 +192,16 @@ class ClapAsVst3 : public Steinberg::Vst::SingleComponentEffect,
tresult PLUGIN_API getUnitByBus(Vst::MediaType /*type*/, Vst::BusDirection /*dir*/, int32 /*busIndex*/,
int32 /*channel*/, Vst::UnitID& /*unitId*/ /*out*/) SMTG_OVERRIDE;

#if 0
// units selection --------------------
Vst::UnitID PLUGIN_API getSelectedUnit () SMTG_OVERRIDE { return selectedUnit; }
tresult PLUGIN_API selectUnit (Vst::UnitID unitId) SMTG_OVERRIDE
{
selectedUnit = unitId;
return kResultTrue;
}
#endif
// units selection --------------------
Vst::UnitID PLUGIN_API getSelectedUnit() SMTG_OVERRIDE
{
return selectedUnit;
}
tresult PLUGIN_API selectUnit(Vst::UnitID unitId) SMTG_OVERRIDE
{
selectedUnit = unitId;
return kResultTrue;
}

//---IContextMenuTarget ----------------------------------------------------------------
tresult PLUGIN_API executeMenuItem(int32 tag) override;
Expand Down

0 comments on commit eb8b190

Please sign in to comment.