[LAD] Re: Calculating logarithmic curve for controller automation

"Stefano D'Angelo" <[email protected]>
Newsgroups gmane.linux.audio.devel
Message-ID <CANtmRDgm3PpY5OCU8b6ZyzuVvRa-OZytH816EaC-4aPsVH3_nw@mail.gmail.com>
Il giorno ven 24 feb 2023 alle ore 13:21 Fons Adriaensen
<[email protected]> 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
https://www.orastron.com/ - https://dangelo.audio/
_______________________________________________
Linux-audio-dev mailing list -- linux-audio-dev-cunTk1MwBs/[email protected]
To unsubscribe send an email to linux-audio-dev-leave-cunTk1MwBs/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.