On Fri, May 14, 2004 at 05:55:07PM +0200, Marcus
Andersson wrote:
Alfons Adriaensen wrote:
>Another point. I've defended the adoption of simple integer
enumerations>>
>(corresponding to a C switch) using the
argument that it is the
single>>missing essential feature in the port
information. At the
Karlsruhe BOF>>it was said that this is not true, as the LOGARITHMIC
hint does not>>specify the log base. Indeed it doesn't, nor is there
any reason why>>it should. The LOG hint means that the user would
expect a widget, e.g.>>a slider, that maps a certain displacement to
a certain ratio (as opposed>>to difference) of the controlled
parameter. So the host has to do a linear>>to exponential conversion,
but it is completely irrelevant to what base>>this calculation is
done.>>
I thought the idea with the LOGARITHMIC hint was to maximize the
controllability of the parameter and make use of the entire slider
range >better.
If the base is left out, the host will have to guess,
and most >often miss the optimal slider mapping.
Sorry but this is wrong. For example, if the range is 1 to 1000, then
it's clear that 10 will be at 1/3 and 100 at 2/3 of the slider range.
This does not depend on the log base at all.
Interesting interpretation. This means that the mapping between the
slider and the parameter will be
f(x) = k*a^x
with k=f(0) and a = f(1) if the slider goes form 0 to 1.
In the example above, k=1 and a=1000.
This also means that it is illegal to include 0 in the parameter
range.
If this is what we want LOGARITHMIC to mean, it should be documented
to this detail in the LADSPA specification. Otherwise, host and plugin
writers might get it wrong.