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: Marcus Andersson (054185595_AT_telia.com)
Date: Wed Sep 05 2001 - 21:29:27 EEST


The problem with your functions is that with v_low <= 0, log(v_low) is
undefined or negative infinity. At least a couple of plugins, like the
one pole LP and HP filters, do have a lower limit of 0 in combination
with LADSPA_HINT_LOGARITHMIC. This is why I used a log_offset.

Another interesting observation is that if d_low and d_high can be
choosen freely (which they usually can for a slider), and they are
choosen to d_low = log(v_low), d_high = log(v_high), your first function
is reduced to d = log(v), which is basically what I suggested in the
first mail, except for the log_offset. Your functions are still
interesting though, being more general.

Marcus

"Richard W.E. Furse" wrote:
>
> 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 - 21:28:40 EEST