Pre-echo
Encyclopedia
Pre-echo is a digital audio
compression artifact
where a sound is heard before it occurs (hence the name). It is most noticeable in impulsive sounds from percussion instrument
s such as castanet
s or cymbal
s.
It occurs in transform-based audio compression algorithms – typically based on the modified discrete cosine transform
(MDCT) – such as MP3
, MPEG-4 AAC
, and Vorbis
, and is due to quantization noise being spread over the entire transform-window of the codec.
is much stronger than backwards temporal masking, hence one hears a pre-echo, but no post-echo.
filters. Such filters necessarily introduce phase
distortion and temporal smearing, but this additional distortion is less audible because of strong forward masking.
Avoiding pre-echo is a substantial design difficulty in transform domain lossy audio codec
s such as MP3
, MPEG-4 AAC
, and Vorbis
. It is also one of the problems encountered in digital room correction
algorithm
s and frequency domain filters in general (denoising
by spectral subtraction, equalization
, and others). One way of reducing "breathing" for filters and compression techniques using piecewise Fourier-based transforms is picking a smaller transform window (short blocks in MP3), thus increasing the temporal resolution of the algorithm at the cost of reducing its frequency resolution.
Digital audio
Digital audio is sound reproduction using pulse-code modulation and digital signals. Digital audio systems include analog-to-digital conversion , digital-to-analog conversion , digital storage, processing and transmission components...
compression artifact
Compression artifact
A compression artifact is a noticeable distortion of media caused by the application of lossy data compression....
where a sound is heard before it occurs (hence the name). It is most noticeable in impulsive sounds from percussion instrument
Percussion instrument
A percussion instrument is any object which produces a sound when hit with an implement or when it is shaken, rubbed, scraped, or otherwise acted upon in a way that sets the object into vibration...
s such as castanet
Castanet
Castanets are a percussion instrument , used in Moorish, Ottoman, ancient Roman, Italian, Spanish, Sephardic Music, and Portuguese music. The instrument consists of a pair of concave shells joined on one edge by a string. They are held in the hand and used to produce clicks for rhythmic accents or...
s or cymbal
Cymbal
Cymbals are a common percussion instrument. Cymbals consist of thin, normally round plates of various alloys; see cymbal making for a discussion of their manufacture. The greater majority of cymbals are of indefinite pitch, although small disc-shaped cymbals based on ancient designs sound a...
s.
It occurs in transform-based audio compression algorithms – typically based on the modified discrete cosine transform
Modified discrete cosine transform
The modified discrete cosine transform is a Fourier-related transform based on the type-IV discrete cosine transform , with the additional property of being lapped: it is designed to be performed on consecutive blocks of a larger dataset,...
(MDCT) – such as MP3
MP3
MPEG-1 or MPEG-2 Audio Layer III, more commonly referred to as MP3, is a patented digital audio encoding format using a form of lossy data compression...
, MPEG-4 AAC
Advanced Audio Coding
Advanced Audio Coding is a standardized, lossy compression and encoding scheme for digital audio. Designed to be the successor of the MP3 format, AAC generally achieves better sound quality than MP3 at similar bit rates....
, and Vorbis
Vorbis
Vorbis is a free software / open source project headed by the Xiph.Org Foundation . The project produces an audio format specification and software implementation for lossy audio compression...
, and is due to quantization noise being spread over the entire transform-window of the codec.
Explanation
The psychoacoustic component of the effect is that one hears only the echo preceding the transient, not the one following – because this latter is drowned out by the transient. Formally, forward temporal maskingTemporal masking
Temporal masking or "non-simultaneous masking" occurs when a sudden stimulus sound makes inaudible other sounds which are present immediately preceding or following the stimulus...
is much stronger than backwards temporal masking, hence one hears a pre-echo, but no post-echo.
Mitigation
In an effort to avoid pre-echo artifacts, many sound processing systems use filters where all of the response occurs after the main impulse, rather than linear phaseLinear phase
Linear phase is a property of a filter, where the phase response of the filter is a linear function of frequency, excluding the possibility of wraps at \pm\pi. In a causal system, perfect linear phase can be achieved with a discrete-time FIR filter...
filters. Such filters necessarily introduce phase
Phase (waves)
Phase in waves is the fraction of a wave cycle which has elapsed relative to an arbitrary point.-Formula:The phase of an oscillation or wave refers to a sinusoidal function such as the following:...
distortion and temporal smearing, but this additional distortion is less audible because of strong forward masking.
Avoiding pre-echo is a substantial design difficulty in transform domain lossy audio codec
Codec
A codec is a device or computer program capable of encoding or decoding a digital data stream or signal. The word codec is a portmanteau of "compressor-decompressor" or, more commonly, "coder-decoder"...
s such as MP3
MP3
MPEG-1 or MPEG-2 Audio Layer III, more commonly referred to as MP3, is a patented digital audio encoding format using a form of lossy data compression...
, MPEG-4 AAC
Advanced Audio Coding
Advanced Audio Coding is a standardized, lossy compression and encoding scheme for digital audio. Designed to be the successor of the MP3 format, AAC generally achieves better sound quality than MP3 at similar bit rates....
, and Vorbis
Vorbis
Vorbis is a free software / open source project headed by the Xiph.Org Foundation . The project produces an audio format specification and software implementation for lossy audio compression...
. It is also one of the problems encountered in digital room correction
Digital room correction
Digital room correction is a process in the field of acoustics where digital filters designed to ameliorate unfavorable effects of a room's acoustics are applied to the input of a sound reproduction system...
algorithm
Algorithm
In mathematics and computer science, an algorithm is an effective method expressed as a finite list of well-defined instructions for calculating a function. Algorithms are used for calculation, data processing, and automated reasoning...
s and frequency domain filters in general (denoising
Noise reduction
Noise reduction is the process of removing noise from a signal.All recording devices, both analogue or digital, have traits which make them susceptible to noise...
by spectral subtraction, equalization
Equalization
Equalization, is the process of adjusting the balance between frequency components within an electronic signal. The most well known use of equalization is in sound recording and reproduction but there are many other applications in electronics and telecommunications. The circuit or equipment used...
, and others). One way of reducing "breathing" for filters and compression techniques using piecewise Fourier-based transforms is picking a smaller transform window (short blocks in MP3), thus increasing the temporal resolution of the algorithm at the cost of reducing its frequency resolution.