The output consists of linear combinations of the input data channels. For instance output channel A can be formed as the average of input channel A and input channel B. For multichannel data, the data is organized into sample frames, with samples from individual channels making up a frame.
Sample limits may be specified for the input data. The same sample limits apply to each channel in a file. Samples in the file are numbered from zero. Negative sample limits may be specified; the samples corresponding to negative indices have zero values. Similarly, sample limits beyond the end-of-file may be specified; samples beyond the end-of-file are assumed to have zero values.
The combine and concatenate modes differ in how they treat multiple input files. For the combine mode, if there is more than one input file, channels assignments cross between input files. Consider two input files, with the first having 3 channels, and the second having 2 channels. The channels are labelled A to E, with channels A, B and C coming from the first input file and channels D and E coming from the second input file. For the combine mode, a single sample limits specification applies to all input files. The default sample limits correspond to the length of the longest input file. If necessary, the data from the input files is padded with zeros to a common length before combining.
In the concatenate mode, the data in the input files is concatenated. The number of channels in each input file must be the same. For the concatenate mode, sample limits can be specified for each input file. The default sample limits for an input file correspond to the length of that file.
For fixed point data, the data is normalized to the range -1 to +1. This normalization becomes important when files with different data formats are combined.
The default data format for the output file is chosen according to a data format promotion rule based on the data types of the input files. For single input files, the output data format will be the same as the input data format as long as that data format is compatible with the output file type.
".au" - AU audio file ".wav" - WAVE file ".aif" - AIFF sound file ".afc" - AIFF-C sound file ".raw" - Headerless file (native byte order) ".txt" - Headerless file (text data)
[+|-] [gain *] chan +|- [gain *] chan ... +|- offsetwhere chan is A through L. The gains can be expressed as ratios, i.e. of the form "n/m". The offset is in normalized units, where an offset of one corresponds to full scale. Note that that the character "*" is a special character to Unix shells and should appear only within quotes to prevent the shell from interpreting it.
...
"AU" or "au" - AU audio file "WAVE" or "wave" - WAVE file "WAVE-NOEX" or "wave-noex" - WAVE file (no extensible data) "AIFF-C" "aiff-c" - AIFF-C sound file "AIFF" or "aiff" - AIFF sound file "noheader" or "noheader_native" - Headerless file (native byte order) "noheader_swap" - Headerless file (byte swapped) "noheader_big-endian" - Headerless file (big-endian byte order) "noheader_little-endian" - Headerless file (little-endian byte order)
"mu-law8" - 8-bit mu-law data "A-law8" - 8-bit A-law data "unsigned8" - offset-binary 8-bit integer data "integer8" - two's-complement 8-bit integer data "integer16" - two's-complement 16-bit integer data "integer24" - two's-complement 24-bit integer data "integer32" - two's-complement 32-bit integer data "float32" - 32-bit floating-point data "float64" - 64-bit floating-point data "text" - text dataThe data formats available depend on the output file type. AU audio files:
mu-law, A-law, 8/16/24/32-bit integer, 32/64-bit floatWAVE files:
mu-law, A-law, offset-binary 8-bit integer, 16/24/32-bit integer, 32/64-bit floatAIFF-C sound files:
mu-law, A-law, 8/16/24/32-bit integer, 32/64-bit floatAIFF sound files:
8/16/24/32-bit integerHeaderless files:
all data formatsOptionally, the number of "valid" bits may be specified as a qualifier to the data format, e.g. "integer16/12". The number of valid bits is for informational purposes only.
"FL" - Front Left "FR" - Front Right "FC" - Front Center "LF" - Low Frequency "BL" - Back Left "BR" - Back Right "FLC" - Front Left of Center "FRC" - Front Right of Center "BC" - Back Center "SL" - Side Left "SR" - Side Right "TC" - Top Center "TFL" - Top Front Left "TFC" - Top Front Center "TFR" - Top Front Right "TBL" - Top Back Lefty "TBC" - Top Back Center "TBR" - Top Back Right "-" - noneA speaker position can be associated with only one channel. In the case of WAVE files, the subset of spacial positions must appear in the order given above.
This program allows direct specification of the gains for 12 output channels and 20 input channels. The program can handle larger numbers of channels for the case that the input channels are in a one-to-one correspondence with the output channels. A gain factor applying to all channels can be specified with the -g or --gain option.
By default, the output file contains a standard audio file information string.
Standard Audio File Information: date: 2001-01-25 19:19:39 UTC date user: kabal@aldebaran user program: CopyAudio program nameThis information can be changed with the information string which is specified as one of the command line options. Structured information records should adhere to the above format with a named field terminated by a colon, followed by numeric data or text. Comments can follow as unstructured information.
Record delimiter: Newline character or the two character escape sequence "\" + "n". Line delimiter: Within records, lines are delimiteded by a carriage control character, the two character escape sequence "\" + "r", or the two character sequence "\" + newline.If the information string starts with a record delimiter, the header information string is appended to the standard header information. If not, the user supplied header information string appears alone.
CopyAudio abc.au abc.wav
CopyAudio -C abc1.au abc2.au abc12.au
CopyAudio --chanA=A-B abc1.au abc2.au diff.au
CopyAudio --gain=1/2 abc.au scaled.auThe same result can be obtained by specifying the gain for the (single) output channel.
CopyAudio --chanA="0.5*A" abc.au scaled.au
CopyAudio -P integer16 -F noheader_swap abc.au swap.au
CopyAudio -l 1000:1999 abc.au out.au
CopyAudio abc1.wav abc2.wav -S "FL FR" stereo.wav
CopyAudio --chanA="A-8.63/32768" abc.au zeromean.au
"auto" - determine the input file type from the file header "AU" or "au" - AU audio file "WAVE" or "wave" - WAVE file "AIFF" or "aiff" - AIFF or AIFF-C sound file "noheader" - headerless (non-standard or no header) audio file "SPHERE" - NIST SPHERE audio file "ESPS" - ESPS sampled data feature file "IRCAM" - IRCAM soundfile "SPPACK" - SPPACK file "INRS" - INRS-Telecom audio file "SPW" - Comdisco SPW Signal file "CSL" or "NSP" - CSL NSP file "text" - Text audio file
"Format, Start, Sfreq, Swapb, Nchan, ScaleF"The list can be shortened and elements skipped (nothing between adjacent commas. The missing parameters take on default values.
"undefined" - Headerless files will be rejected "mu-law8" - 8-bit mu-law data "A-law8" - 8-bit A-law data "unsigned8" - offset-binary 8-bit integer data "integer8" - two's-complement 8-bit integer data "integer16" - two's-complement 16-bit integer data "integer24" - two's-complement 24-bit integer data "integer32" - two's-complement 32-bit integer data "float32" - 32-bit floating-point data "float64" - 64-bit floating-point data "text" - text data
"native" - no byte swapping "little-endian" - file data is in little-endian byte order "big-endian" - file data is in big-endian byte order "swap" - swap the data bytes as the data is read
"default" - Scale factor chosen appropriate to the type of data. The scaling factors shown below are applied to the data in the file. 8-bit mu-law: 1/32768 8-bit A-law: 1/32768 8-bit integer: 128/32768 16-bit integer: 1/32768 24-bit integer: 1/(256*32768) 32-bit integer: 1/(65536*32768) float data: 1 "<number or ratio>" - Specify the scale factor to be applied to the data from the file.
"undefined, 0, 8000., native, 1, default"