added RMS envelope, plus a crossfade from peak to RMS