free-audio / clap-wrapper

Wrappers for using CLAP in other plugin environments
MIT License
120 stars 20 forks source link

VST3+Ableton Live does not load parameters properly #303

Open lewloiwc opened 1 month ago

lewloiwc commented 1 month ago

I believe the actual problem is on Ableton Live's side rather than with the clap-wrapper, but I'd like to hear everyone's opinions.

After load(), even if we send the current parameter values to the host using try_push() in process(), for some reason Live then sends default values back to CLAP, resulting in all parameters being reset to their default values.

Live sends incorrect values to CLAP only during the first sample of process() after load(), so we've managed to successfully load parameters by ignoring it only at that time.

baconpaul commented 1 month ago

Which version of live?

lewloiwc commented 1 month ago

Confirmed on 11.3.10 and 12.0

baconpaul commented 1 month ago

Thanks!

lewloiwc commented 1 month ago

When the processes are arranged in chronological order, they look like this: init() activate() start_processing() save() load() save() deactivate() activate() start_processing() process() PluginSyncMainToAudio(plugin, process->out_events); (sends parameter values to the host using try_push()) c99dist_process_event(plug, hdr); (for some reason, the default parameter value is sent from the host, which causes issues)


By making these changes, parameters can be successfully loaded:

However, since this CLAP does not perform try_push(), the parameters loaded will not be displayed accurately in the host's simple UI, but if you actually apply the effect to the sound, you'll find that the state itself is being loaded correctly.

baconpaul commented 1 month ago

so basically the first process block after a load has the entire set of params as defaults set into the input queue it sounds like?

@defiantnerd did you test in live much with the wrapper? I have not. but it sounds like we should!

lewloiwc commented 1 month ago

That’s exactly right!