Energy of a simple harmonic oscillator

An oscillator's energy swaps between kinetic and potential while the total stays $\frac{1}{2}kA^2$, so the amplitude fixes the energy and the speed at any position follows from it.

From AP Physics C: Mechanics.