gearmulator

Emulation of classic VA synths of the late 90s/2000s that are based on Motorola 56300 family DSPs
Log | Files | Refs | Submodules | README | LICENSE

commit 4425bba1177e6aabb23f9c839de1e40e3e4f0b9b
parent fe7b765ff72472a138467b536bf010c8d378af64
Author: dsp56300 <dsp56300@users.noreply.github.com>
Date:   Wed, 29 May 2024 23:18:58 +0200

add helper func to return the bound parameter of a juce component

Diffstat:
Msource/jucePluginLib/parameterbinding.cpp | 8++++++++
Msource/jucePluginLib/parameterbinding.h | 1+
2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/source/jucePluginLib/parameterbinding.cpp b/source/jucePluginLib/parameterbinding.cpp @@ -209,6 +209,14 @@ namespace pluginLib return it->second; } + Parameter* ParameterBinding::getBoundParameter(const juce::Component* _component) const + { + const auto it = m_boundComponents.find(_component); + if(it == m_boundComponents.end()) + return nullptr; + return it->second; + } + void ParameterBinding::removeMouseListener(juce::Slider& _slider) { const auto it = m_sliderMouseListeners.find(&_slider); diff --git a/source/jucePluginLib/parameterbinding.h b/source/jucePluginLib/parameterbinding.h @@ -65,6 +65,7 @@ namespace pluginLib const auto& getBindings() const { return m_bindings; } juce::Component* getBoundComponent(const pluginLib::Parameter* _parameter) const; + pluginLib::Parameter* getBoundParameter(const juce::Component* _component) const; private: void removeMouseListener(juce::Slider& _slider);