Symptom
A clap-wrapper VST3 loses its state when an Ableton Live set is reloaded: after reopening the set, all parameters show (and behave as) their default values, even though the plugin's state was saved correctly.
Diagnosis
Live's Log.txt shows what happens on set reload:
info: VST3: Going to restore: <plugin>
info: VST3: plugin processor successfully loaded: ...
info: Vst3: couldn't initialize controller with processor state of <plugin>: not implemented
info: VST3: couldn't hand processor state of <plugin> to controller: not implemented
info: VST3: Restored: <plugin>
Live restores the processor via IComponent::setState (which works — ClapAsVst3::setState forwards to clap_plugin_state.load), and then hands the same stream to the edit controller via IEditController::setComponentState to initialize its parameter view. ClapAsVst3 is a SingleComponentEffect and does not override setComponentState, so the EditController base returns kNotImplemented.
The result is that Live's parameter layer keeps the default values from plugin creation: the device panel displays defaults, and Live writes those stale values back over the plugin's freshly restored state — so the restore is effectively undone.
Why validators don't catch it
Both clap-validator (on the underlying CLAP) and pluginval at strictness 8 (including GUI + state-restoration tests) pass: neither drives the controller through setComponentState the way Live does.
Fix
Implement setComponentState: load the handed state into the CLAP plugin (idempotent when setState already ran, and covers hosts that call the controller side first), then refresh the wrapper's VST3 parameter cache from the live CLAP values — the same sync param_rescan(CLAP_PARAM_RESCAN_VALUES) performs. Verified in Ableton Live 12.4: set reload now restores correctly.
PR follows.
Symptom
A clap-wrapper VST3 loses its state when an Ableton Live set is reloaded: after reopening the set, all parameters show (and behave as) their default values, even though the plugin's state was saved correctly.
Diagnosis
Live's Log.txt shows what happens on set reload:
Live restores the processor via
IComponent::setState(which works —ClapAsVst3::setStateforwards toclap_plugin_state.load), and then hands the same stream to the edit controller viaIEditController::setComponentStateto initialize its parameter view.ClapAsVst3is aSingleComponentEffectand does not overridesetComponentState, so theEditControllerbase returnskNotImplemented.The result is that Live's parameter layer keeps the default values from plugin creation: the device panel displays defaults, and Live writes those stale values back over the plugin's freshly restored state — so the restore is effectively undone.
Why validators don't catch it
Both clap-validator (on the underlying CLAP) and pluginval at strictness 8 (including GUI + state-restoration tests) pass: neither drives the controller through
setComponentStatethe way Live does.Fix
Implement
setComponentState: load the handed state into the CLAP plugin (idempotent whensetStatealready ran, and covers hosts that call the controller side first), then refresh the wrapper's VST3 parameter cache from the live CLAP values — the same syncparam_rescan(CLAP_PARAM_RESCAN_VALUES)performs. Verified in Ableton Live 12.4: set reload now restores correctly.PR follows.