[LV2] Custom value display text for control ports
Hanspeter Portner
dev at open-music-kontrollers.ch
Sun Aug 19 07:26:32 PDT 2018
On 8/19/18 10:17 AM, Dominique Würtz wrote:
> Is it possible to customize the way a control port value is represented
> as text in the host?
> E.g. for a stero pan control with value range -1.0 .. +1.0 I want it to
> be displayed as:
>
> -100% Left .. -1% Left, <C>, 1% Right .. 100% Right.
Yes, LV2 supports arbitrary control ranges and units.
Just define the control port to have a minimum of -100 and a maximum of +100 and
set its unit to percent [1]. If you want the control to be an integer, you can
additionally set that in the manifest, too [2].
Something along theses lines (*not tested*).
Hosts that support units, will then show them in a generic UI.
myuri:panLeft
a lv2:ControlPort , lv2:InputPort ;
lv2:index 0 ;
lv2:symbol "Pan left" ;
lv2:minimum -100 ;
lv2:maximum 100 ;
lv2:default 0 ;
units:unit units:pc ;
lv2:portProperty lv2:integer .
[1] http://lv2plug.in/ns/extensions/units#pc
[2] http://lv2plug.in/ns/lv2core#integer
More information about the Devel
mailing list