I don’t really understand what the wrapper classes help with? I’m trying to avoid
Is there anything you cannot do if you use this wrapper? If you can present a compelling argument then that might stop us removing the methods.
It’s not so much what the abstraction can/can’t do so much as how they do it, and removing the “raw” parameter API will either force me to change designs or write a ton of boilerplate to fit a square peg into a round hole. That’s not to say I don’t use the classes ever, or think they don’t do their job, just that I would like the freedom to avoid them. I understand that “my code works now and won’t if you change stuff” isn’t the most compelling argument.
Here’s some arguments for keeping the API:
- The Parameter/ValueTreeState classes are not zero cost abstractions and hide locking behavior (e.g.
setValueNotifyingHost on a parameter with listeners which is called from
operator=, which could be called from the audio thread, and I suspect plenty of people do).
- The new-er API is not very cache-friendly (have to take care to deal with cache locality of parameters used together in the DSP)
- Certain abstraction models, (like an Entity-Component System), are much simpler to deal with through the legacy API than the parameter classes.
- With the exception of AUv3 (to my knowledge), all the plugin APIs have the same conceptual model for reporting parameters’ existence and changes to the host. If the primary goal of the
AudioProcessor class is to serve as a least common denominator for those APIs, it does not make sense to abstract over an API that doesn’t need abstraction.
- Not all of us are using
AudioProcessor as the core of a product, rather as an API to target, or a prototyping system. The legacy API is easy to target or wrap, the Parameter classes are not.
I know maintaining an API is not free, and that there are probably features you intend to implement through the parameter abstraction (like you did with parameter groups, maybe sample accurate automation in the future?). But I don’t see any added value in removing the legacy API. To the contrary, it removes functionality that myself and others rely on.