1. A method for encoding an audio signal, comprising: processing samples of the audio signal using a loudness model to determine the instantaneous loudness of the audio signal for a set of the samples; processing the instantaneous loudness using a primary nonlinear filter to generate a smoothed loudness; mapping the smoothed loudness to a dynamic range compression gain value; and combining the dynamic range compression gain value with the audio signal to generate a compressed audio signal.