The peaks arise from envelopes that arise when the function value nearly repeats. The peaks are at the roots of the implicit equation $\pm {\rm cos}(x)\pm {\rm cos}(\alpha x)\pm {\rm cos}(\beta x)$$\pm {\rm cos}(x)\pm {\rm cos}(\alpha x)\pm {\rm cos}(\beta x)=0$ for thisthe case of the function $f(x)= {\rm cos}(x)+ {\rm cos}(\alpha x)+ {\rm cos}(\beta x)=0$. More details can be found here.