Skip to content

VST3: never hand a wrapper-owned parameter id to the plugin - #562

Merged
defiantnerd merged 1 commit into
nextfrom
fix-554-wrapper-owned-params
Sep 15, 2026
Merged

defiantnerd merged 1 commit into
nextfrom
fix-554-wrapper-owned-params

Conversation

@defiantnerd

Copy link
Copy Markdown
Collaborator

Closes #554.

The preset selector is not a CLAP parameter — it has an invented ParamID and leaves param_index_for_clap_get_info at 0. VST3-2 (b4835df) fixed one loop that skipped only isMidi; two more did the same:

  • syncParameterValuesFromClap() — called get_value with the selector's id
  • getParamValueByString() — called text_to_value with it

Rather than patch the two, this adds Vst3Parameter::isWrapperOwned() (isMidi || isPreset) and routes every walk of the parameter container through it, including the two that were already correct. A grep for isMidi in wrapasvst3.cpp now returns nothing, so the next wrapper-owned parameter kind cannot quietly reintroduce this.

No behavioural change for a correct plugin: the invented id was previously rejected by get_value/text_to_value rather than acted on. What changes is that the wrapper no longer depends on every plugin being defensive about unknown ids.

One place the predicate deliberately does not apply. detail/vst3/process.cpp:297,314 dispatches on isPreset and isMidi separately, in that order, and that split is load-bearing — the preset selector must not be turned into a 0xC0 message. A future wrapper-owned kind still needs its own branch there.

Build-gated on clap-first-distortion_vst3, clean.

isWrapperOwned() covers the MIDI parameters and the preset selector, and every walk of the parameter container now tests it.
@defiantnerd
defiantnerd force-pushed the fix-554-wrapper-owned-params branch from 35f8e35 to 6b90133 Compare September 15, 2026 04:30
@defiantnerd
defiantnerd merged commit d92dc5f into next Sep 15, 2026
28 checks passed
@defiantnerd
defiantnerd deleted the fix-554-wrapper-owned-params branch September 15, 2026 04:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant