AuburnSounds / Dplug

Audio plugin framework. VST2/VST3/AU/AAX/LV2 for Linux/macOS/Windows.
https://dplug.org/
Other
483 stars 32 forks source link

Namespacing LV2 ports #517

Open p0nce opened 3 years ago

p0nce commented 3 years ago

LV2 symbols named depends on the LV2 index but this cause symbols to change when we add a parameter, or where an optional port is there. Namespace them as in PR #516 because it is ugly. Also: this is breaking, need an Option.

jpcima commented 3 years ago

May this be an opportunity to adopt a more reliable solution for keeping parameter state? The lv2 solution based on symbols, it exists exactly to prevent the unstable numbering situation.

I believe in DPF, they adopted the symbol-based solution for VST too. (iirc one has to enable the "full state" compile option)

The DPF parameter has both a symbol and a name. For the storage of parameters in binary blob, it stores (symbol,value) pairs instead of a value array. It permits for remapping dynamically index to symbols, which lets parameter definitions free to be changed as much as desired.

p0nce commented 3 years ago

This is a good idea, we're also not at the point where we'll be able to do like DPF, it could took years. Let me explain.

Step1

We need to first get out of "not using VST chunks", this is #96 . It's not hard but we'll need to support both cases for a while to keep exising released VST 2.4 plugin to work in sessions. So basically further work is delayed until the end of the deprecation process for the corresponding Option (say, "legacyVSTChunk").

What is really long is releasing major version for existing plugins, as customers expect actual externally visible changes in a major version. That's in the roadmap for https://github.com/AuburnSounds/Dplug/wiki/Roadmap

This is entirely my fault for not using VST2 chunks by default as soon as I could.

Step 2 After that deprecation process is finished, all formats will be now using Dplug chunks, whose format is here: https://github.com/AuburnSounds/Dplug/blob/master/client/dplug/client/preset.d#L268

Currently this is used by all formats but VST2.4

Then we can evolve the format to have more desirable properties like you proposed. Also a chunk version 2 would allow private state not-exposed-to-host, DPF also implements that correctly based on the LV2 idea and I was convinced on the #lv2 IRC. (EDIT: this is #352)

Also An uncorrelated but also interesting change would be to expose the full range of param, this is a mistake that Dplug does in AU / AAX / LV2 and VST3 and to undo this is also an Option. :) In my mind I imagined this merged with Step 1. Currently, most parameters are exposed as 0..1 float instead of exposing internals. Unfortunately that prevents remapping. This is a consequence of not using VST2 chunks from the start. (EDIT: this is #518 )

So, yeah. Sorry that it will take years.