Skip to content

Commit

Permalink
Fix a VST3 off-by-one error in a stepped param
Browse files Browse the repository at this point in the history
The step count is not +1, but rather just the range, as
demonstrated by the clap-first distortion plugin compared in
bitwig.

Closes #258
  • Loading branch information
baconpaul committed Jun 10, 2024
1 parent eb8b190 commit 4026835
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/detail/vst3/parameter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ Vst3Parameter* Vst3Parameter::create(
v.defaultNormalizedValue = (info->default_value - info->min_value) / param_range;
if ((info->flags & CLAP_PARAM_IS_STEPPED) || (info->flags & CLAP_PARAM_IS_ENUM))
{
auto steps = param_range + 1;
auto steps = param_range;
v.stepCount = steps;
}
else
Expand Down

0 comments on commit 4026835

Please sign in to comment.