I'm working on a audio program for fun before Uni starts again. It makes use of a few simple functions. You can see them plotted in the bellow image.

I need to be able to morph a y = x straight line into each function. I would like this to be done by a single scalar value if posible. So as the value of the scalar changes, a straight line slowly curves out into the function. Preferably the scalar value should be in the range 0 and 1. So that it has a value of 0 when it's a straight line and a value of 1 once it has curved into the function. This though is not that important. It just makes the code cleaner.
I don't know if there is a simple way to do this.
As an exsample I already worked out a way to do it for one of the functions.
[tex]f(x) = x^3[/tex]
becomes...
[tex]f(x) = \frac{x^3} {x^2 + c(1 - x^2)}[/tex]
So as the scalar [tex]c[/tex] changes from 0 to 1 the line curves out into the function.
I could really use some help working out how to do that for the other 3 functions. The must be some logical way to approach this.
I only a first year Computer Science student so if this gets into any higher mathematics please go slow.
Here are the functions:
[tex]f(x) = x^3[/tex]
[tex]f(x) = tan^{-1}(x)[/tex]
[tex]f(x) = tanh(3x)[/tex]
[tex]f(x) = \frac{1}{1 + e^{-x}} * 0.5[/tex]
thanks...

MENU