dither [-S|-s|-f filter] [-a] [-p precision]
Apply dithering to the audio. Dithering deliberately adds a small amount of noise to the signal in order to mask audible quantization effects that can occur if the output sample size is less than 24 bits.
With no options, this effect will add triangular (
TPDF) white noise.
Noise-shaping (only for certain sample rates) can be selected with
-s.
With the
-f option, it is possible to select a particular noise-shaping filter from the following list: lipshitz, f-weighted, modified-e-weighted, improved-e-weighted, gesemann, shibata, low-shibata, high-shibata. Note that most filter types are available only with 44100Hz sample rate.
The filter types are distinguished by the following properties: audibility of noise, level of (inaudible, but in some circumstances, otherwise problematic) shaped high frequency noise, and processing speed. See
SoX - Sound eXchange | NoiseShaping for graphs of the different noise-shaping curves.
The
-S option selects a slightly
'sloped' TPDF, biased towards higher frequencies. It can be used at any sampling rate but below ≈22k, plain TPDF is probably better, and above ≈ 37k, noise-shaped is probably better.
The -a option enables a mode where dithering (and noise-shaping if applicable) are automatically enabled only when needed. The most likely use for this is when applying fade in or out to an already dithered file, so that the redithering applies only to the faded portions. However, auto dithering is not fool-proof, so the fades should be carefully checked for any noise modulation; if this occurs, then either re-dither the whole file, or use trim, fade, and concatencate.
The
-p option allows overriding the
target precision.
If the SoX global option -R option is not given, then the pseudo-random number generator used to generate the white noise will be `reseeded', i.e. the generated noise will be different between invocations.
This effect should not be followed by any other effect that affects the audio.
See also the `Dithering' section above.