On Wed, 2015-05-27 at 21:42 +0200, Christopher Arndt wrote:
Is there a way to have the value range of a control
input port of a LV2
plugin be in one range (e.g. 0.0f..1.0f or 0-127) and have the LV2 host
display the values scaled or mapped to a different range (e.g. 20-20,000
Hz or 2 - 2000 ms)?
I know about lv2:scalePoints and the lv2:enumeration property to handle
list of discrete values and the units:unit properties to set the value
unit, but how do I map the actual values of a large continuous range? Is
there a way to define a transfer function? Or does that need to happen
inside the plug-in code?
And what about more advanced parameter display, e.g. a wet/dry setting,
which I want to display as going from 100:00 through 50:50 to 0:100, but
the actual parameter value is just 0.0..1.0 (or -1.0..+1.0)?
Background: I'm trying to improve the JX10.ttl from the mda.lv2
collection [1], so that the parameter display in the LV2 host generated
plug-in UI is more useful and intuitive, i.e. instead of e.g. the slider
for OSC Tuning being going from 0.0 .. 1.0, I want it to be displayed as
-24 .. +24 cents. All control input ports of the plugin are defined as
taking a value 0.0f..1.0f.
Nope. LV2 uses the real meaningful value in ports and has no facility
for doing otherwise at present.
Such a thing could be added, of course, but I'm not sure that's a great
idea. Pain for hosts to support to facilitate a situation that doesn't
really make any sense to begin with.
If anyone ever comes up with a comprehensive and correct mapping for all
the MDA controls, then a new package can be made with a more sane
interface. However, this takes a lot of tedious manual work because VST
sucks and provides no programmatic access to this information, aside
from display strings. It can't be half done because changing this
breaks the plugin in sessions and so on.
--
dr