RE: [linux-audio-dev] LADSPA_HINT_LOGARITHMIC

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: RE: [linux-audio-dev] LADSPA_HINT_LOGARITHMIC
From: Richard W.E. Furse (richard_AT_muse.demon.co.uk)
Date: Wed Sep 05 2001 - 15:57:42 EEST


Assuming just d and v are variable, you'll probably want some thing like

d(v):
        d = d_low + (d_high - d_low) * (log(v) - log(v_low)) / (log(v_high) -
log(v_low));

v(d):
        v = v_low * pow(v_high / v_low, (d - d_low) / (d_high - d_low));

--Richard

> -----Original Message-----
> From: owner-linux-audio-dev_AT_music.columbia.edu
> [mailto:owner-linux-audio-dev_AT_music.columbia.edu]On Behalf Of Marcus
> Andersson
[...]
> 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
[...]


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Wed Sep 05 2001 - 15:59:21 EEST