[linux-audio-dev] ladspxmlgui needs numeric input controllers

Alfons Adriaensen fons.adriaensen at alcatel.be
Wed May 14 09:59:01 UTC 2003


On Wed, May 14, 2003 at 01:59:52PM +0100, Steve Harris wrote:

> True, I do what hardware devices do and declate -some_small_val to be -Inf,
> and either crossfade to 0 from -some_small_val+delta to some_small_val, or
> its its low enough just zero it at the minimum value.

That solves the problem internally, but the displayed value is wrong. Not that
it matters much excep maybe for a real mixer plugin.

There a trick to get this right, but it requires some understanding between the
plugin and the host. Say you want a fader with a range from -Inf to +10 dB, with
-60 dB being close to the bottom. Specifiy a range -61 to +10. Internally you
crossfade to zero gain between -60 and -61. A medium intelligent host would put a
scale along the slider with ticks every 10 dB, and the user would infer that the
lower limit is -Inf.

ladspa.h suggest you should use a slightly expanded range for integer parameters,
e.g. 0.9 to 10.1 if you want 1 to 10. Is this only to absorb errors in the
pixels -> value mapping, or has this another purpose ? Note that if the plugin
uses intparm = floor (x + 0.5), there should be no problem at all.

FA








More information about the Linux-audio-dev mailing list