1. Calculate the Envelope
The envelope $y(t)$ captures the instantaneous power of the oscillations (see the plot, where the envelope is in red), which I think is what you're looking for. The wiki page on the analytic function is a good place to start for this.
2. Be Careful of Autocorrelation
As discussed here,
you can't just correlate two time series.
There's lots of good advice in the linked question,
but the simplest thing you can do is to differentiate the two signals,
$\frac{dx(t)}{dt} = x(\tau) - x(\tau-1)$ for all values of $\tau$,
check that there's no autocorrelation in the differentiated signals,
and then correlate them.
Actually, since you're interested in how the rate of change in $x$ predicts oscillatory power in $y$, you need to first calculate the second derivate of $X$ (reflecting change in the rate of change, or acceleration/deceleration), and correlate it with the first derivate of envelope of $y$ (reflecting change in power).
In pseudo-code:
ddx = diff(diff(x))
power_y = envelope(y)
d_power_y = diff(power_y)
cor.test(ddx, d_power_y)
For the frequency of the oscillations in $y$, you can do the same thing with the instantaneous frequency.