Hi,

I would like to know if there is any agreed upon logarithmic function to
use for LADSPA control ports when the LADSPA_HINT_LOGARITHMIC is set. In
practice, the function should map display coordinates (the slider) to
control values.

The best I have come up with myself is this:

Control port value, v
Control port low limit, v_low
Control port high limit, v_high
Display coordinates, d
Display coordinates low limit, d_low
Display coordinates high limit, d_high
Transposition to positive range, log_offset

Setup:

log_offset = -v_low+1;
d_low = log(v_low + log_offset);
d_high = log(v_high + log_offset);
d = log(v + log_offset);

Slider moved: 

v = exp(d) - log_offset;

Marcus

Reply via email to