An energy-based envelope function for the stochastic simulation of earthquake accelerograms