A non-transitory digital storage medium storing a computer program that, when executed by a computer, performs a method for encoding a current frame of an audio signal, the method comprising:
- receiving an audio signal comprising a current frame and one or more previous frames, wherein each frame includes one or more harmonic components and a plurality of spectral coefficients in a frequency domain or in a transform domain;
- determining an estimation of two harmonic parameters for each harmonic component of a most recent previous frame, wherein the estimation is based on a first group of three or more spectral coefficients from the one or more previous frames;
- determining a gain factor and a residual signal for encoding the current frame, wherein the gain factor and residual signal are based on a fundamental frequency of the harmonic components in the current and previous frames and on the estimated harmonic parameters of the most recent previous frame;
- and
- generating an encoded representation of the current frame, wherein the encoding includes the gain factor and the residual signal for subsequent decoding and playback by one or more loudspeakers.