wav MS Windows sound cdr audio CD raw fixed sampling rate, channels, and bytes per sample (= that of cdr); byte order must be specifiedThese operations can be performed on the data (combinations are possible as long as they are meaningful):
Scaling (volume change), integer arithmetic Scaling (volume change), floating point arithmetic Cutting of the input into pieces / tracks Conversion to mono and back to stereo Swapping of the 2 channels Adding silence to (or removing from, see cutting) the start and/or end Generation of cut numbers along silent intervals, e.g. to break up a record into tracks Information about non-silent intervals Fading in and out
"--cut NUM NUM [NUM...]" Cut the input into pieces, cutting at positions NUM. See sections about argument scanning and splitting below.
"--endsilence, --es DUR" Adds the given amount of silence to the end of each output file.
"--fadein LEN" Fade in at the start over a duration of LEN. The syntax for LEN is the same as for a cut number, see section about argument scanning below. If cutting is active, fade-in is applied to the beginning of each cut. Fading in is performed by increasing the amplitude for CD sectors by an amount derived from LEN over a duration of LEN. --fadein 3 would result in the amplitude of the first sector lowered to 1/4, of the second sector to 2/4, and the third sector to 3/4. The fourth sector is unchanged and has then reached full amplitude.
"--fadeout LEN" Fade out at the end over a duration of LEN. The syntax for LEN is the same as for a cut number, see section about argument scanning below. If cutting is active, fad-out is applied to the end of each cut. The computation is similar to --fadein. --fadein 3 would result in the last 3 CD sectors having their amplitudes lowered to 3/4, 2/4, and 1/4. The (non-existant) following sector is assumed to be silent. To add silent sector(s) to the end of the audio file, use --endsilence. Fading out can only be performed if the input size can be determined (i.e. the input must be seekable and cannot be a pipe). If cutting is active, the end of the cut is always known and the fade-out can be applied. If the fade-out starts before the fade-in is finished, both will overlap, producing sensible results.
"--fscale FLOAT" Scale data by FLOAT, i.e. multiply by FLOAT (1.0 does nothing).
"-h, -u, --usage" Display usage.
"--help" Display extensive help. (The information is derived from and equivalent to this manual page.)
"--inbig, -I" Input data is big endian (MSB, LSB) (Motorola).
"--incdr" Read cdr format (default is wav). Sets the correct byte order.
"--infile, -r NAME" Input filename. Defaults to stdin. '-' = stdin.
"--inlittle, -i" Input data is little endian (LSB, MSB) (Intel).
"--inraw" Read raw format. Byte order should be specified with -i/-I (default big).
"--inwav" Read wav format (default). Sets the correct byte order.
"--iscale NUM" Scale data to NUM percent (100 does nothing).
"--monostereo" Convert input to mono and immediately back to stereo. The result is 2 channels with the same data. This can be useful in some cases.
"--noswapchannels" Don't swap channels. (default)
"--outfile, -w NAME" Write output to file NAME. The track number is appended as a 2-digit number. The default is to write output to stdout. A NAME of '-' means stdout. When cutting is active and more than one cut is made, output can not be written to stdout and the use of this option is mandatory.
"--outbig, -O" Output data in big endian (MSB, LSB) (Motorola) byte order.
"--outlittle, -o" Output data in little endian (LSB, MSB) (Intel) byte order.
"--quiet" Suppress progress output. The name of this option might be misleading: it does not prevent copious output in other places which might be turned on by --verbose.
"--silencecuts" Generate cut numbers for cutting out silent intervals. This is useful when digitising a whole record and then cutting it into tracks. The cut numbers are output on stdout and can be fed back into --cut. After cutting, every second track (those with even numbers) contains a silent interval and can be deleted. Together with --verbose, the silence value of each sector is printed as well (can't be fed back into --cut then). This most likely produces some VERY long lines. Silence is detected by applying a threshold (--silencethresh) to a value computed for each CD sector; the value must be below the threshold for a minimum number of sectors (delay --silencedelay). Currently, the average is computed first (this is the DC component); then the average of the absolute of the difference between each sample and the DC component. The difference between these 2 averages is compared with the threshold. Check whether the cuts really fall into the silent intervals, and adjust threshold and duration if not (or edit the cut numbers manually). The silence delay period is part of the signal interval, not the silence interval. This means that each non-silent period has --silencedelay silence at the start and at the end. If the silent interval between two signal intervals is less than (2 * silence delay), the silent part at the start of the second signal period will be shortened.
"--silencedelay DELAY" The duration for which the "input" must be below the threshold in order to be detected as a silent interval. In other words, the number of sectors which must be silent before a silent interval is detected. Ignored without --silencecuts. The delay can be specified with units in the same way as for --cut, and is truncated to full CD sectors. Default is 30C (=0.4s).
"--silenceinfo" Similar to --silencecuts, but it generates more information. Silent and non-silent intervals are listed in a tabular format. The output format is useful for documentation, but not for feeding back into --cut. With --verbose, the silence values of each CD sector are shown as well. This produces lots of output, but it is useful for finding a suitable --silencethresh.
"--silencethresh THRESHOLD" Threshold for silence detection. Ignored without --silencecuts. Default is 10. Always select a threshold as low as possible. When cutting a record into tracks, the threshold must be high enough to recognise the crackling between pieces as silence. When the threshold is too high, a little at the beginning and end of each piece might be chopped off. As a special case, if the threshold is set to 0 the usual numerical computation of the silence value is bypassed, and the sector is deemed to be silent if all samples are 0.
"--startsilence, --ss DUR" Adds the given amount of silence to the start of each output file.
"--swapchannels" Swap the left with the right channel.
"--tocdr" Write data in cdr format (default). Sets the correct byte order.
"--toraw" Write data in raw format. Byte order should be specified with -o/-O (default big).
"--towav" Write data in wav format. Sets the correct byte order.
"--verbose" Produce more output. Currently only used by --silencecuts and --silenceinfo.
"--version, -V" Display version information.
"--" Stop argument processing. Remaining arguments can only be filenames, or cut numbers if cutting is used.
Example (assuming 50000 sectors in the input): wav2cdr < INPUT --outfile NAME --cut 500 20000 40000 sectors 0- 499: discarded 500-19999: saved to NAME.01 20000-39999: saved to NAME.02 40000-49999: discarded
wav2cdr < record.wav > cuts --silencecuts --silencedelay 2s wav2cdr < record.wav --of tracks --cut `cat cuts`Will store the tracks of the record in track.01, track.02, ..., with the delay for cutting at a silent part set to 2 seconds. The threshold used is the default. Note the `` syntax works under Unix and in this case puts the contents of file "cuts" on the command line.
(stdin): silnc 0 b, 0 C, 0 s, 00:00.00 min DIFF 811440 b, 345 C, 4 s, 00:04.22 min --> 811440 b, 345 C, 4 s, 00:04.22 min AUDIO 811440 b, 345 C, 4 s, 00:04.22 min DIFF 20603520 b, 8760 C, 116 s, 01:56.05 min --> 21414960 b, 9105 C, 121 s, 02:01.02 minshowing the beginning, length ("DIFF"), and end ("-->") of both silent ("silnc") and and non-silent ("AUDIO") intervals. This is useful for examining existing tracks, but it can not be used with --cut.
Copyright (C) Nov, Dec 1997, Jan, Mar, Apr, May 1998, Feb, May, Jun, Jul, Aug 1999, Oct 2000, Jan 2006 by Volker Kuhlmann <VolkerKuhlmann@gmx.de> formerly c/o EEE Dept, University of Canterbury Christchurch, New ZealandPermission granted to use and distribute this software free of charge, provided any improvements are sent back to the author. Comments and bug reports welcome. All rights reserved. Standard disclaimer applies.