commit 0e92e1169556e82620499b1da26a6367d46def22 parent fc11811b0182441ba582474a710554708943cb92 Author: Tal Aviram <me@talaviram.com> Date: Fri, 20 Aug 2021 12:39:36 +0300 controller - parameter, fix setValue to respect/convert normalised Diffstat:
M | source/jucePlugin/VirusParameter.h | | | 4 | ++-- |
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/source/jucePlugin/VirusParameter.h b/source/jucePlugin/VirusParameter.h @@ -54,8 +54,8 @@ namespace Virus const juce::NormalisableRange<float> &getNormalisableRange() const override { return m_range; } - float getValue() const override { return m_value.getValue(); } - void setValue(float newValue) override { return m_value.setValue(newValue); }; + float getValue() const override { return convertTo0to1(m_value.getValue()); } + void setValue(float newValue) override { return m_value.setValue(convertFrom0to1(newValue)); }; void setValueFromSynth(int newValue, bool notifyHost = true); float getDefaultValue() const override { return 0; /* maybe return from ROM state? */ }