How to smoothly adjust sine amplitude I move a device by sending a sine wave proportional to the displacement. I would like to modify the amplitude and mean value dynamically. 

For example at the beginning I would like to go from :

Signal(t) = 1 * sin(t) + 1


to:

Signal(t) = 0.95 *sin(t) + 0.95


My issue is that I don't know how to do that without having a big step in my signal, which is unacceptable for my application.
For now, all I have is something that change the coefficient on a "long" time, by small step (1>0.99>0.98>0.97>0.96>0.95) so that the "steps" in the output signal remain small, but it is not very clean.
There's no problem letting the coefficients be a slowly varying function of time,

$$S(t)=a(t)\sin(t)+b(t),$$

for example a linear ramp 
$$a(t)=(a_1-a_0)\frac{t-t_0}{t_1-t_0}+a_0$$ for $t\in[t_0,t_1]$ and similar for $b(t)$.