Re: [linux-audio-dev] LADSPA proposal ...

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

Subject: Re: [linux-audio-dev] LADSPA proposal ...
From: Mike Rawes (mike_rawes_AT_yahoo.co.uk)
Date: Sat May 15 2004 - 13:58:55 EEST


On Sat, 15 May 2004 11:46:47 +0200
Marcus Andersson <marcus.t.andersson_AT_spray.se> wrote:

> Mike Rawes wrote:
>
> > You're right - there's an asymptote at x=0 - there's no correct way
> > of
> >
> >dealing with it. What I've done in the past is do linear conversion
> >near 0:
> >
> >to linear:
> >value > e : log(value)
> > < -e : -log(-value)
> > : value / e
> >
> >to logarithmic
> >value > 1 : exp(value)
> > < -1 : -exp(-value)
> > : value * e
> >
> >However, it is also perfectly valid to simply clip the lower bound.
> >What isn't right is for a host to *assume* that the lower bound of a
> >LOGARITHMIC
> >port is always > 0. I myself want to be able to specify a logarithmic
> >frequency port with range + / - 24000 for my oscillator plugins,
> >without having a host break by doing log(-440) or something.
> >
> >
>
> But how can the host know how close to zero the exp should become
> linear? What do you do with a LOGARITHMIC parameter with the range
> -1.0 to 1.0? Something is missing here to make the LOGARITHMIC hint
> unambiguous. But maybe that's not the goal of LADSPA. :(

That's a good point.

The host could just do a simple linear mapping for small ranges, or it
may want to scale up the range internally so that only a fixed
proportion of the range (say 10%) is linear. Or it may clip the range to
+ve values. Or it could offer them all to the user as configuration
options!

We could add an extra hint for log ranges in 2.x for plugins that want
to assert a particular behaviour... it all gets a bit messy though.
There'd need to be two ranges - the linear range, and then the log
range.

-
Myk


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

This archive was generated by hypermail 2b28 : Sat May 15 2004 - 13:58:22 EEST