How does one go about creating simple approximations of curves of known values (with tolerances)?

27 Views Asked by At

I'm currently working on a synth, and many of the knobs are not linear in nature. Often, knobs will have a simple algorithm by which they transform linear changes into curved ones (such as volume or frequency). In other cases, the curve is a bit more arbitrary, and this is one of those cases.

I know what values I want to hit (roughly), and have a pretty large degree of relative tolerance for some of the values. Here are the values and their tolerances:

(0,    1) //no tolerance
(0.25, 1.75194 +- .00001) 
(0.5,  3.5     +- .5) 
(0.75, 11      +- 1) 
(1,    500     +- 100)

They end up creating a pretty hard curve, and I've been attempting to match it by plugging values into a somewhat similar curve equation:

enter image description here

I know there must be a better way, but I have no idea how to solve a multiple variable equation for multiple known values which each have tolerances. Further, it has to (in my case) be computationally simple.

How can one create an simple equation to approximate a curve of known values which each have tolerances?

So far my steps are:

  1. Find a simple equation that's already fairly similar.
  2. Graph the points and equation
  3. Start messing with the increment rate of x, and any other variables and hope you get close.

But I'm certain there are much better approaches.

Edit: for anyone interested, here's where the values of y and their tolerances were derived from. It is an equation which can go from a triangle wave, to roughly a sine wave, to roughly a square wave. I think it's pretty neat! enter image description here