CopyAudio [options] AFileA AFileB ... AFileO
Copy audio files (combine/concatenate, scale and shift data)
This program copies samples from one or more input audio files to an output audio file. The samples in the output file are linear combinations of the samples in the different channels in the input files. In the combine mode, data from multiple input files is combined. In the concatenate mode, data from multiple input files is concatenated.
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. Sample limits are offset into the file data and 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 file 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 a single input file, 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" - Text audio file (with header)
[+|-] [gain *] chan +|- [gain *] chan ... +|- offset,
"AU" or "au" - AU audio file "WAVE" or "wave" - WAVE file. Whether or not to use the WAVE file extensible format is automatically determined. "WAVE-EX" or "wave-ex" - WAVE file. Use the WAVE file extensible format. "WAVE-NOEX" or "wave-noex" - WAVE file; do not use the WAVE file extensible format "AIFF-C" or "aiff-c" - AIFF-C sound file "AIFF-C/sowt" or "aiff-c/sowt" - AIFF-C (byte-swapped data) "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) "text-audio" - Text audio file (with header)
"mu-law8" - 8-bit mu-law data "mu-lawR8" - 8-bit bit-reversed 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 IEEE floating-point data "float64" - 64-bit IEEE floating-point data "text16" - text data, scaled the same as 16-bit integer data "text" - text data, scaled the same as float/double data
AU audio files: mu-law, A-law, 8/16/24/32-bit integer, 32/64-bit float WAVE files: mu-law, A-law, offset-binary 8-bit, 16/24/32-bit integer, 32/64-bit float AIFF-C sound files: mu-law, A-law, 8/16/24/32-bit integer, 32/64-bit float AIFF and AIFF-C/sowt sound files: 8/16/24/32-bit integer Headerless files: all data formats Text audio files: text16, text
"FL" - Front Left "FR" - Front Right "FC" - Front Center "LFE1" - Low Frequency Effects-1 "BL" - Back Left "BR" - Back Right "FLc" - Front Left center "FRc" - Front Right center "BC" - Back Center "LFE2" - Low Frequency Effects-2 "SiL" - Side Left "SiR" - Side Right "TpFL" - Top Front Left "TpFR" - Top Front Right "TpFC" - Top Front Centre "TpC" - Top Centre "TpBL" - Top Back Left "TpBR" - Top Back Right "TpSiL" - Top Side Left "TpSiR" - Top Side Right "TpBC" - Top Back Centre "BtFC" - Bottom Front Centre "BtFL" - Bottom Front Left "BtFR" - Bottom Front Right "FLw" - Front Left wide "FRw" - Front Right wide "LS" - Left Surround "RS" - Right Surround "LSd" - Left Surround direct "RSd" - Right Surround direct "TpLS" - Top Left Surround "TpRS" - Top Right Surround "-" - No speaker assigned
"LF" -> "LFE1" "SL" -> "SiL", ... "TpFL" -> "TFL", ...
"Stereo" -> "FL FR" "Quad" -> "FL, FR, BL BR" "5.1" -> FL, FR, FC, LFE1, BR, BL "7.1" -> FL, FC, FR, LFE1, BR, BL, SiL, SiR"
FL, FR, FC, LFE1, BL, BR FLc, FRc, BC, SiL, SiR, TpC, TpFL, TpFC, TpFR, TpBR, TpBC, TpBR"
This program allows direct specification of the gains for 12 output channels and 26 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 standard information records. These are written to the file header.
date: 2001-01-25 19:19:39 UTC date program: CopyAudio program name sampling_rate: 8000.5 non-integer sampling rate This record is generated if the sampling frequency is not an integer value and the output file format does not support non-integer sampling rates in its header. loudspeakers: FL FR loudspeaker locations This record is generated if the output file format does not support the specification of loudspeaker locations in its header. bits/sample: 12/16 bits per sample This record is generated if the bits per sample is less than the number of bits in the data format and the output file format does not support this specification in its header.
This information can be changed with the header 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. Within records, lines are delimited by a newline ('\n') control characters.
CopyAudio abc.au abc.wav
CopyAudio -C abc1.au abc2.au abc12.au
CopyAudio --combine abc1.au abc2.au -cA A+B -cB A-B sumdiff.au
CopyAudio --gain=1/2 abc.au scaled.au
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 -cA"-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-audio" - Text audio file with header
"Format, Start, Sfreq, Swapb, Nchan, FullScale"
"undefined, 0, 8000., native, 1, default"
Format: File data type "undefined" - Headerless or non-standard files will be rejected "mu-law8" - 8-bit mu-law data "mu-lawR8" - 8-bit bit-reversed 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 Start: byte offset to the start of data (integer value) Sfreq: sampling frequency in Hz (floating point number or ratio) Swapb: Data byte swap parameter "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 Nchan: number of channels The data consists of interleaved samples from Nchan channels FullScale: full scale value This vale is used to scale data from the file to fall in the range -1 to +1. If the FullScale value is set to "default", the FullScale value is determined based on the type of data in the file. data type FullScale 8-bit mu-law: 32768 8-bit bit-reversed mu-law: 32768 8-bit A-law: 32768 8-bit integer: 256 16-bit integer: 32768 24-bit integer: 256*32768 (838808) 32-bit integer: 65536*32768 (2147483648) float data: 1 text16 data: 32768 text data: 1 The value of FullScale can be specified as a value or ratio of values.
P. Kabal / v10r2 2018-11-16