Replies: 1 comment 1 reply
-
I would absolutely support this - I have this issue right now with the AU wrapper where I can not properly match parameter types. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It would be nice if there was a flag in
clap_param_info_flags
to mark a parameter as an enum.Take the example of a waveform parameter.
Say the plugin implements this as an integer parameter (min: 0, max: 3) with the 4 integer values mapped to these 4 waveforms: sine, square, saw, triangle. The mapping of each parameter value with each waveform is completely arbitrary, since the integer "2" is unrelated to saw waves, for example. Because of this arbitrary mapping of integer values to specific meanings, this waveform parameter can be considered an "enum" parameter.
For hosts, this information - whether a parameter is an enum or not - can be important to know because it can impact the decision of which type of UI element is best suited for displaying the parameter to users:
clap_plugin_params.value_to_text
function, but a drop-down full of plain integers would not look as good.Unfortunately, the CLAP standard currently does not provide a way for CLAP hosts to know whether a parameter is an enum or not.
This may be possible through some inadequate (and inefficient) heuristics if the host parses and guesses the meaning of the string
clap_plugin_params.value_to_text
returns, but clearly that is not desirable.Luckily, there's a simple and backwards-compatible solution to this dilemma: Add an IS_ENUM flag to the
clap_param_info_flags
enum.If this proposal is accepted, I can create a PR.
Beta Was this translation helpful? Give feedback.
All reactions