Il giorno ven 24 feb 2023 alle ore 13:21 Fons Adriaensen
<fons(a)linuxaudio.org> ha scritto:
On Fri, Feb 24, 2023 at 12:14:19PM +0100, Stefano D'Angelo wrote:
Given any
three points (x1, y1), (x2, (y1+y3)/2), (x3, y3) where
y1>y2>y3 or y1<y2<y3 you can find an exponential function passing
through them as explained here:
https://www.orastron.com/blog/potentiometers-parameter-mapping-part-1
(+ "output scaling").
Sorry, typo: I meant points (x1,y1), ((x1+x3)/2,y2), (x3,y3).
That function may include some exponential term, but
If
F (x) = A exp (B * x) # A pure exponential
then
F ((x1 + x2) / 2) = sqrt (F (x1) * F (x2))
So the mid point is fixed, you can't choose it.
Of course you need a third degree of freedom. An offset term is
sufficient for the purpose:
F(x)=A*exp(B*x)+C
IIRC, imposing the midpoint value leads to a nonlinear yet solvable system.
--
Stefano D'Angelo