I am trying to create a function $f(t)$ that smoothly interpolates between $\sin(tg)$ and $\sin(t(g+1))$, where $g$ is a small integer. Additionally, I want the function to satisfy the constraint $f(t) = 0$ whenever $\bmod{2\pi t} = 0$.
For my initial attempt, I began with the linear interpolation $f(t) = \alpha\sin(t(g+1)) + (1-\alpha)\sin(tg)$, where $\alpha \in [0, 1]$. However, I observed an undesirable behavior where the amplitude envelope varies with time. To correct for this, I calculated the amplitude envelope to be:
$$E(t) = 1 - 2q + 2q \left(\frac{\cos t + 1}{2}\right)^{1-q},$$
where $q = 0.5 - |0.5 - \alpha|$. Then, I plotted the ratio $\frac{f(t)}{E(t)}$.
While this approach is almost what I am looking for, there is an unattractive kink in the plot when $\alpha \approx 0.5$. My goal is to find an elegant equation that produces a visually appealing plot when animated from $\alpha = 0$ to $\alpha = 1$.
Can anyone help? Many thanks.