Probably, you not once heard about the ringing of audio. It’s one of the kinds of distortions, that it's not looking good at plots. It may be well visible for musical instruments with a sharp attack: piano, guitar, drums, etc. Read what is audio ringing? Why it appears? Is it that so bad for sound quality and whether worth to reduce this artefact?
HD music file conversion
Ringing audio is artefacts (oscillations) of output response of an audio device or DSP algorithm (software/firmware) to input pulse signal.
Digital input test pulse is 1 sample with maximal amplitude.
Analog input test pulse should have minimum durations that tends to zero.
The ideal output signal should be the similar to the input signal.
But elements of the system have digital filters and/or feedback.
A digital filter unit can cause ringing.
The unit:
After it, the unit:
I.e. the inputs slide along the processed-audio-signal samples.
Digital filter inner work
As we told above, to calculate an output sample, a digital filter takes several input samples. The maximal amplitude at the output rise when the pulse's sample will at the middle of the inputs. It's shown in the picture below (time N).
Ringing audio at output of a linear phase filter
So, we can consider time N as a moment of pulse rising at the output.
But in previous moment time 1, when pulse's sample comes to the most left input with minimum gain, non-zero level rise at the filter output.
So, we can view the non-zero output level by the input pulse, before it comes to output in maximal level (time N).
When the pulse's sample comes to the second input with higher gain, it produces a higher non-zero output level (time 2). And, same way, up to time N when pulse achieved tap with maximal gain.
Oscillations (distortions) at the output [before actual pulse moment (time N)] are called as pre-ringing.
Post-ringing is the opposite effect. When pulse moves from the input with maximal gain to the most right input with minimum gain, non-zero levels rise at the filter output.
It happens after pulse's actual moment at the output (time N). I.e. already no signal at the output, but oscillations, still, are there.
Pre-ringing and post-ringing at the output
From an analog system's point of view, pre-ringing is a "strange" issue enough.
Still no signal but its artefacts are there.
To solve the issue, a minimum phase filter was invented.
Minimum phase filter
However, minimum phase filter have own issues.
Minimum vs linear phase filter
Linear | Minimum phase | |
---|---|---|
Magnitude-frequency response | identical for both ones | |
Phase-frequency response | linear | non-linear |
Pre-ringing | yes | no |
Post-ringing | yes | yes |
Post-ringing energy | Higher than post-ringing energy of linear phase filter |
Minimum vs linear phase filter
A minimum phase filter has a non-linear phase into the passband. Non-linearity degree depends on filtering unit implementation.
For example, we consider a low-frequency filter, that is very popular in audio. Other filtering types have same properties.
Low-frequency filter has passband at low frequencies and stopband at high ones.
Between these bands, transient band is placed.
Magnitude-frequency response (low-frequency filter output) and ringing,
when pulse at the input
To keep the maximal signal band after resampling, the transient band should have zero width.
But the band minimization requires more taps (see above: filter inputs). And higher tap number causes the longer length of ringing (see picture "Ringing audio of linear phase filter").
It is fairly for the minimum phase one too.
When the audio system (digital or analog) has a flat amplitude-frequency response from 0 to Infinity Hz, no ringing is there.
Many sampling rate conversion algorithms use resampling filters.
For the qualitative rejection of conversion artefacts and minimum losses of the passband width:
Filter stopband and ringing
Sharpness (width) of the transient band depend on the suppression level at stopband. The suppression level defines distortion level into useful (including audible) band after resampling.
But filtering unit with narrower transition band (higher its sharpness) has higher energy of the ringing oscillations out of the time of input pulse.
NOTE: these bandwidths of a digital filter are considered in relative coordinated. As rule, total bandwidth is considered as 1.0. And the bandwidths are in range 0.0 ... 1.0.
The widths and ringing lenght (in samples) don't depend on sample rate.
The author has no information about proper studies of real ringing impact to sound quality.
In the general case, ringing is not so scary, as it seems at the response to the pulse plot.
To achieve this effect, the difference between neighbor samples should be close to maximal possible value.
But, in most cases, the difference is too small.
And the ringing level is very low too.
For sharp-attack waveforms (piano, guitar, drums, etc.), ringing may be visible even.
Anyway, high resolution of musical signals allows using a wider transient band and keep artefact suppression.
The actual audible range is up to 20 kHz. High resolution has a higher band.
So resampling and other filters may start transient band from 20 kHz.
A higher sampling rate allows to reduce the sharpness of the transient band and keeps stopband.
Lesser sharpness reduces tap number and ringing.
In audio, designers strive to reduce or rid of the ringing.
One of the examples is an apodizing filter. For input pulse, it should provide output response without oscillations. As example, it may be implemented as some expanding of the pulse in time at the output.
However, the backside of the improvement is the lesser sharpness of the transient band. In some cases, it can cause audible aliases due to sampling rate limitation. However, high-resolution may solve (or partially solve) sharpness-aliases issue.
In digital filtering, ringing audio is unavoidable artefacts. Only filter optimization may be applied to save balance between:
The author knows nothing about proper researches of ringing impact to sound quality.
In majority of musical signal types, ringing levels are below noise floor. And we don't even have consider the artefacts there.
In general case of audio device/software design, ringing-audio reducing may be recommended.
Author: Yuri Korzunov,
Audiophile Inventory's developer,
2020 updated
Read about audio issues
Copyright © Yuri Korzunov
["Audiophile Inventory" (since 2011), "AudiVentory", "Audiophile Inventory by AudiVentory.com".
Также "Audiophile Inventory by AudiVentory.com" (прежде "Audiophile Inventory") охраняемое коммерческое обозначение],
2010-2021. All Rights Reserved.
All prices at this site in the U.S. dollars without V.A.T. and other applicable taxes. The prices are recommended. All information at this site is not a public offer.