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

Steve Harris S.W.Harris at ecs.soton.ac.uk
Wed May 14 11:34:34 UTC 2003

On Wed, May 14, 2003 at 03:46:20PM +0200, Alfons Adriaensen 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.

But conceptually it is OK.
> 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.

I dont think it matters, the user just wants minimum, so they stick it at
the bottom.
> 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.

yes, or intparm = lrintf(x). I think ladspa.h is wrong to suggest that, I
dont do it.

- Steve

More information about the Linux-audio-dev mailing list