Symplectic schemes for highly oscillatory Hamiltonian systems: the homogenization approach beyond the constant frequency case