free-audio / clap

Audio Plugin API
https://cleveraudio.org/
MIT License
1.73k stars 98 forks source link

Versioning question #344

Closed sjoerdvankreel closed 11 months ago

sjoerdvankreel commented 11 months ago

Hi!

Wondering how to do plugin versioning with clap? Lets say for example a plugin with versions 1, 2, 3 are all backwards compatible, but, version 4 introduces major breaking changes and i want to be able to run v3 and v4 alongside each other.

In vst3, i'd solve this by 1/2/3 sharing the same plugin id (guid) and switching to a new id for version 4. But in clap, it looks like clap_plugin_descriptor.id is meant to look like "vendor_name.plugin_name", i.e., not something that i want to switch from v3 to v4. How would i go about running multiple versions side-by-side? Or in the case this is handled by the clap_plugin_descriptor.version field, is it then not possible to "replace" v1 by v2, i.e., you get new side-by-side installs each time the version number is bumped?

Thanks in advance, sjoerd

baconpaul commented 11 months ago

the descriptor id can look like whatever you want as long as it is (1) stable for the "same" plugin - your (1,2,3) and (2) UTF-8

I personally would solve this by using a new descriptor id for version 4.

(We did exactly this in Surge with 1.9 being Surge and new versions being SurgeXT. But you can use less fancy names if you want. Just call it com.myplug.thingy.2023-version and keep that name until you break again

sjoerdvankreel commented 11 months ago

Ok, so it is in fact the id field that can solve this, thanks.

baconpaul commented 11 months ago

That’s how I would do it And some synth do this today. Pianoteq has a new plugin id per major version for instance so I have 6 7 and 8 all installed on my system. (The use the AU and vst3 id for thst but same thing)

sjoerdvankreel commented 11 months ago

Yeah thats actually not a bad idea, to re-use the vst3 id somehow.