diff --git a/CMakeLists.txt b/CMakeLists.txt index 0a797edc..aedfcd85 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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") diff --git a/src/detail/vst3/parameter.cpp b/src/detail/vst3/parameter.cpp index 4edd5af0..8c4ace7d 100644 --- a/src/detail/vst3/parameter.cpp +++ b/src/detail/vst3/parameter.cpp @@ -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); } diff --git a/src/detail/vst3/parameter.h b/src/detail/vst3/parameter.h index 0b764187..2f8e1881 100644 --- a/src/detail/vst3/parameter.h +++ b/src/detail/vst3/parameter.h @@ -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 diff --git a/src/wrapasvst3.h b/src/wrapasvst3.h index b9fb6149..4ec78248 100644 --- a/src/wrapasvst3.h +++ b/src/wrapasvst3.h @@ -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;