Simulation of higher-order stochastic processes by spectral representation