WaveGain V 1.2.6
WaveGain
is an application of the ReplayGain algorithms to
standard PCM wave files. Where it differs from the other applications of this
principle is that the gain adjustments are applied directly to adjusting
the scaling of the samples. In other words, the option to write tags
that can be read by other applications to apply the gain adjustment does not
exist, so the adjustments are made directly to the data within the file.
Therefore,
in the strictest meaning of the word, this process is NOT lossless. However,
with the application of dithering to the output, the losses can
be minimized and are, in any event, unlikely to be audible to the human ear.
So in
simple terms, the program reads in wave files, analyses them, calculates and
displays recommended gain adjustments (track and album), and then applies the
adjustments directly to the wave data, if requested.
wavegain [options] input.wav
[...]
if WIN32 compile
wavegain [options] input.wav
[...] [-e cmd [args]]
-h,--help Prints
the Help information
-a,--album Use
ReplayGain Audiophile/Album gain setting
Analyses the ReplayGain values for each of the
tracks (files) specified and collectively for the whole selection. The album
gain value, if applied, ensures that all tracks are adjusted by the same
scaling factor and so retain the same relative level of loudness.
-r,--radio Use
ReplayGain Radio/Single Track gain setting (DEFAULT)
Analyses the ReplayGain values for each of the
tracks (files) specified on an individual basis.
-q, --adc Apply
Album based DC Offset correction.
DEFAULT is Track based
DC Offset correction.
-p, --no_offset Do NOT apply
DC Offset correction.
-c,
--calculate Calculates and prints gain settings, and
DC Offsets BUT DOES NOT APPLY THEM - This is the DEFAULT.
-x, --scale Writes scale values to stdout
in the format: n.nnnnnn
In Album mode it
only writes the Album Scale value, and in Title mode it only writes the Title
Scale values.
ONLY works in
Calculation mode.
-y, --apply Calculates
and APPLIES gain settings, and applies DC Offset correction. DC Offset
correction is not an option as there is no reason for not correcting it.
-s, --fast Calculates and prints gain settings - DOES NOT
APPLY THEM.
NOTE: This method does NOT process all
samples, it only processes 200 x 16k chunks of samples. Results will NOT be as
accurate as a full analysis but, with most material, will be within +/- 0.5db.
Files of 8,192,000 real
samples, or less, will be analysed in full. DC Offset is neither calculated
nor corrected in FAST mode.
-z, --recursive Search
for files recursively, each folder as an album
Recurses through subdirectories/folders, and
the route directory/folder, treating each directory/folder as a separate album.
-l, --log Write
log file.(Default filename = WGLog.txt)
Writes the screen displayed information to a log file.
-f, --logfile Specify
log filename. (Assumes -l if present.)
-n, --noclip NO
Clipping Prevention.
Normally
clipping prevention is applied by default.
-d, --dither X Dither output, where X =
0 for dither OFF (DEFAULT).
1 for dither without Noise Shaping.
2 for dither with Light Noise Shaping.
3 for dither with Medium Noise Shaping.
4 for dither with Heavy Noise Shaping.
Whenever the values of samples are altered, it is advisable, as a final
stage before writing out, to apply dithering to the amended values. This
process aids in preserving information in the low order bits that would
otherwise be lost. In some cases, the application of noise shaping also
aids this process. (I am not including any detail of the whys/wherefores
or hows here as there are sources of
information on the web that cover these far more eloquently and capably than I
would be able to provide!) If the output is to be used for subsequent
processing such as encoding to a lossy format, then
dithering is not recommended. If dithering is applied, it should be in the last
stage of processing.
-t, --limiter Apply
6dB Hard Limiter to output.
This option would normally be expected to be used in conjunction with the next one, --gain, when an increase in the recommended gain is required.
-g, --gain X Apply additional Manual Gain
adjustment in decibels, where
X = any floating point number between -12.0 and +12.0.
Clipping Prevention WILL be applied UNLESS '-n' is used.
Normally used in conjunction with the hard limiter when an
increase in gain is to be applied. This gain figure is added to the value recommended
by the ReplayGain calculation. Where an increase in
gain is required, application of the hard limiter provides a smooth compression
of the peaks and troughs rather than simply applying a crude hard cutoff at
full peak scale.
-s, --fast Calculates and prints gain settings
- DOES NOT APPLY THEM.
NOTE: This method does NOT process all samples, it only processes 200 x
16k chunks of samples. Results will NOT be as accurate as a full analysis but,
with most material, will be within +/- 0.5db. Files of 8,192,000 real samples,
or less, will be analysed in full. DC Offset is
neither calculated nor corrected in FAST mode.\n");
-o, --stdout Write
output file to stdout.
FORMAT OPTIONS (One option ONLY may be used)
-b, --bits X Set output sample format,
where X =
1 for 8 bit unsigned PCM data.
2 for 16 bit signed PCM data (DEFAULT).
3 for 24 bit signed PCM data.
4 for 32 bit signed PCM data.
5 for 32 bit floats.
6 for 16 bit 'aiff'
format.
Wave file output can be specified in any one of the above formats
regardless of the input file type.
NOTE:
By default, the output file will be of the same bitwidth
and type as the input file.
if WIN32 compile
WaveGain input files may be 8, 16, 24 or 32 bit integer, or floating point wave files with 1 or 2 channels and a sample rate of 48000Hz, 44100Hz, 32000Hz, 24000Hz, 22050Hz, 16000Hz, 12000Hz, 11025Hz or 8000Hz.\n"); Wildcards (?, *) can be used in the filename, or '-' for stdin.
With 1.2.4, all header data was copied through to the processed file including ‘bext’ and ‘cart’ chunks. As of this version, all trailers are now also copied through regardless of content. This ensures that any chunks appearing after the ‘data’ chunk are not lost as a result of ‘wavegaining’ the file. These changes have been implemented primarily to meet the needs of the broadcasting industry but will have no impact when processing regular wave files that contain the minimum chunk requirements.