[linux-audio-dev] LADSPA_HINT_LOGARITHMIC

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

Subject: [linux-audio-dev] LADSPA_HINT_LOGARITHMIC
From: Marcus Andersson (054185595_AT_telia.com)
Date: Tue Sep 04 2001 - 19:16:20 EEST


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


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

This archive was generated by hypermail 2b28 : Tue Sep 04 2001 - 19:13:50 EEST