New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Parameter class accessible by both Plugin and UI #150
Comments
To this problem, I have in mind some solutions, none of which are particularly ideal.
|
It was proposed on IRC discussion to favor a macro such as It's some first thoughts on the matter:
I would favor the implementation practice where bypass will be smoothed as a gain between 0-1, avoiding the clicky transition. The bypass will act more as a tri-state: Off ↔ Transition ↔ On It's why I think preferable for the plugin implementer to decide when bypass engages, instead of the framework to decide so. I would think the pair of methods discourages the best practices. If I were to implement the bypass in a way driven as I want, it's a more awkward formulation.
If bypass stops to be represented as instance of
The issue is related directly to this limitation: that UI is unable to access directly the array of parameters. In my opinion, it's a shame that Parameters are not accessible in the framework, for reasons that exceed the simple one of bypass, and it's beneficial long-term if we can have them. In UI development, I was many times fighting against a DPF "way of things", that wants parameter as Plugin-Only. It opens a possibility to formulate such things as:
This helps application of D.R.Y. principles. |
I fully agree that making the Parameter class accessible by both Plugin and UI class would be really helpful.
I really want to avoid the situation of having to define the same parameter data on DSP and UI side. |
Now about the bypass, I see the issues about a new function for such processing yes, but it is important to remember that the plugin is not supposed to make any sound in this mode, so the run function is supposed to be different by design. Why do you think the UI needs to know if the DSP is bypassed or not? Does it make any difference? |
I think of You can obtain a global, non-duplicated parameter array by using a function-scope static-local variable. It would do automatically the thing wanted, regardless of using separate binaries, or instance-access. (instanciate once-only, + is thread-synchronized)
I refer you to a pattern how I make this usually.
The LV2 documentation seems to not really agree, judging from what I read from the property See http://lv2plug.in/ns/lv2core/#enabled. I think, operation like the current parameter is fine actually, just provide the value 0-1 that plugin feeds into a lowpass.
Inputs must stay, because sound has to compute during a transition period. Why cut the MIDI? does a part of specification say something about it?
It needs it, in case UI indicated bypass status by check button or LED. |
The issue with bypass inverted was fixed in e889c58 |
In a LV2 UI, the bypass value received in
parameterChanged
is the inverse of the DSP value.But in VST, it's fine.
DistrhoUILV2
should invert a parameter with the bypass designation before sending.Problem: the parameter metadata is not accessible from a separated UI, so it's unknown which parameter is a bypass.
The text was updated successfully, but these errors were encountered: