From d0a51f017abd40e96ad3ed5249ec96960ba85125 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Fri, 3 Feb 2023 04:43:22 +0100 Subject: [PATCH] VST3: fix manually setting integer ctrls from UI (#9212) set_parameter_internal() normalizes the value (C++ reference), when setting a parameter manually (inline control, generic UI) only the shadow_data is updated (which is supposed to be normalized). --- libs/ardour/vst3_plugin.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/ardour/vst3_plugin.cc b/libs/ardour/vst3_plugin.cc index 968db13254..4644eb5179 100644 --- a/libs/ardour/vst3_plugin.cc +++ b/libs/ardour/vst3_plugin.cc @@ -1850,6 +1850,8 @@ VST3PI::set_parameter (uint32_t p, float value, int32 sample_off, bool to_list) { if (to_list) { set_parameter_internal (index_to_id (p), value, sample_off, false); + } else { + value = _controller->plainParamToNormalized (index_to_id (p), value); } _shadow_data[p] = value; _update_ctrl[p] = true;