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. :(
Marcus
