This looks like a periodic repetition of a wave formed by pasting together two sine waves: one that "rises" in $a$ seconds and one that "falls" in $b$ seconds.
A formula for a sine wave which falls or rises in $T$ seconds is $\sin\left(\frac{\pi x}{T}\right).$ Let's call this function $\sin_T$, like so: $$\sin_T(x) = \sin\left(\frac{\pi x}{T}\right).$$
TL, DR
One possible definition of the secret wave function in terms of the $\sin_T(x)$ function just defined and rising and falling times $a$ and $b$ is given at the bottom of the answer .
Detailed explanation
Indeed, $\sin\left(\frac{\pi x}T\right)$ achieves its peaks when $\frac{\pi x}T$ equals $\frac \pi2, \frac \pi2 + 2\pi, \frac \pi2 + 4\pi, \dots$ etc. Solving for $x$ we get
\begin{align}
\frac{\pi x}{T} &= \frac \pi2 + k\cdot2\pi \\
\implies x&= \frac T2 + k\cdot2T,
\end{align}
which tells us that the period is $2T$ ($T$ for rising and $T$ for falling).
A good way to construct the asymmetrical wave of your animation is to define it first in an interval containing the origin and then repeating it in a periodic fashion.
Let's start with $\sin_a(x)$. We know that its value at $x=0$ is $0$, and that we want a single "rise". From the equations above, its closest peak happens at $x=\frac a2. $ By the sine's symmetry, we can infer that its closest minimum happens at $x=-\frac a2$.
According to this, the secret formula can be defined as $\sin_a(x)$ for $x\in\left[-\frac a2,\frac a2\right]$.
Now we must paste the falling side of $\sin_b$ to the right of $\sin_a$ in continuous way. We can achieve this by shifting the former so that it has a peak at $x=\frac a2$.
A peak of $\sin_b$ occurs at $x=\frac b2$. We define a translated version of it, $\sin_b(x-\tau)$, that achieves a peak at $x=\frac a2$ by the condition $$\frac a2-\tau = \frac b2 \implies \tau = \frac {a-b}2.$$
Starting from $x=\frac a2$ it should fall for $b$ seconds, so the secret formula can be defined as $\sin_b\left(x-\frac{a-b}{2}\right)$ for $x\in \left(\frac a2,\frac a2 + b\right)$.
Now that we defined the function in the interval $I = \left[-\frac a2, -\frac a2 + (a+b)\right)$ we can complete the definition for all $x$. One way to do it is using the modulo operator "%", like so:
Definition
$$\text{secretWave}(x) =
\begin{cases}
\sin_a\left(r- \frac a2\right), & \text{if } r = \left( x+\frac a2\right) \bmod (a+b) \text{ and }r\le a \\
\sin_b\left(r-\frac a2 - \frac{a-b}2\right) & \text{if } r = \left( x+\frac a2\right) \bmod (a+b) \text{ and }r> a.
\end{cases}$$
Edit
Here is a plot of a Python implementation of the final version with $a=4, b=1$ using matplotlib.
