SOX(1) UNIX System V SOX(1)
NAME sox -SOund eXchange - universal sound sampletranslator
SYNOPSIS sox infile outfile sox infile outfile [ effect [ effect options ... ] ] sox infile -e effect [ effect options ... ] sox [ general options ] [ format options ] ifile [ format options ] ofile [ effect [ effect options ... ] ]
General options: [ -V ] [ -v volume ]
Format options: [ -t filetype ] [ -r rate ] [ -s/-u/-U/-A ] [ -b/-w/-l/-f/-d/-D ] [ -c channels ] [ -x ] Effects: copy rate avg stat echo delay volume [ delay volume ... ] vibro speed [ depth ] lowp center band [ -n ] center [ width ]
DESCRIPTION Sox translates sound files from one format to another, possibly doing a sound effect.
OPTIONS The option syntax is a littlegrotty,but in essence: sox file.au file.voc translates a sound sample in SUN Sparc .AU format into a SoundBlaster .VOC file, while sox -v 0.5 file.au -rate12000 file.voc rate does the sameformat translation but also lowers the amplitude by 1/2 and changes the sampling rate from 8000 hertz to 12000 hertz via the rate sound effect loop.
File type options:
-t filetype gives the type of the soundsample file.
-r rate Give sample rate in Hertz of file.
-s/-u/-U/-A Thesample data is signed linear (2's complement), unsigned linear, U-law (logarithmic), or A-law (logarithmic). U-law and A-law arethe U.S. and international standards forlogarithmic telephone sound compression.
-b/-w/-l/-f/-d/-D Thesample data is in bytes, 16-bitwords, 32-bit
Page 1 (printed 2/3/93)
SOX(1) UNIX System V SOX(1)
longwords, 32-bit floats, 64-bit double floats, or 80-bit IEEEfloats. Floatsand double floats are in native machine format.
-x The sample data is in XINU format; that is, it comes from a machine with the opposite wordorder than yours and mustbe swapped according tothe word-size given above. Only 16-bitand 32-bit integer data may beswapped. Machine-format floating-point datais not portable. IEEE floats area fixed, portable format. ???
-c channels Thenumber of soundchannels in thedata file. This may be1, 2, or 4; formono, stereo, or quad sound data.
General options:
-e after the input file allows you to avoid giving an output fileand just name an effect. This is only useful with the stat effect.
-v volume Change amplitude (floating point); less than 1.0 decreases, greater than 1.0increases. Note: we perceive volume logarithmically, not linearly. Note: see the stat effect.
-V Print a description of processing phases. Useful for figuring out exactly how sox is mangling your sound samples.
The input andoutput files may be standard input and output. This is specified by '-'. The -t type option must be given in this case, else sox will not know the format of the given file. The -t, -r, -s/-u/-U/-A, -b/-w/-l/-f/-d/-D and -x options referto the input data when given before theinput file name. After, they referto the output data.
If you don't give an output file name, sox will just read the input file. Thisis useful for validating structured file formats; the stat effect may also be used via the -e option.
FILE TYPES Sox needs to know the formats of the input and output files. File formats which have headers are checked, if that header doesn't seem right, the program exitswith anappropriate message. Currently, the raw (no header), IRCAM SoundFiles, SoundBlaster, SPARC .AU (w/header), Mac HCOM, PC/DOS.SOU, Sndtool, and Sounder,NeXT .SND, Windows 3.1 RIFF/WAV, Turtle Beach .SMP, and Apple/SGI AIFFand 8SVX formats are
Page 2 (printed 2/3/93)
SOX(1) UNIX System V SOX(1)
supported.
.aiff AIFF files used on Apple IIc/IIgs and SGI. Note: theAIFF format supports only one SSND chunk. It does not support multiple sound chunks, or the 8SVX musical instrument descriptionformat. AIFF files are multimedia archives and and can have multiple audio and picture chunks.You mayneed a separate archiver to work with them.
.au SUN Microsystems AU files. There are apparently many types of .au files; DEC has invented its own with a different magic number and word order. The .auhandlercan read these files but will not write them. Some .au fileshave valid AU headers andsome donot. The latter are probably original SUNu-law 8000 hz samples.These can be dealt with using the .ul format (see below).
.hcom Macintosh HCOM files. These are (apparently) Mac FSSD files with some variant of Huffman compression. The Macintoshhas wacky file formats andthis format handler apparently doesn't handle allthe ones it should. Mac users will need your usual arsenal of file converters todeal with an HCOM file under Unix or DOS.
.raw Raw files (no header). Thesample rate, size (byte, word, etc), and style (signed, unsigned, etc.) of the sample file must be given. The number of channels defaults to 1.
.ub, .sb, .uw, .sw, .ul These are several suffices which serve as a shorthand for raw files with a given size and style. Thus, ub, sb, uw, sw, and ul correspond to "unsigned byte", "signed byte", "unsigned word", "signed word", and "ulaw" (byte). The sample rate defaults to8000 hzif not explicitly set, and the number of channels (as always) defaults to 1. There are lots of Sparc samples floating around in u-law format with no headerand fixed at a sample rate of 8000 hz. (Certain sound management software cheerfullyignoresthe headers.) Similarly, most Macsound files arein unsigned byte formatwith a sample rate of 11025 or 22050 hz.
.sf IRCAM Sound Files. SoundFiles are usedby academic music software such as theCSound package,and theMixViewsound sample editor.
Page 3 (printed 2/3/93)
SOX(1) UNIX System V SOX(1)
.voc Sound Blaster VOC files. VOCfiles are multi-part and contain silence parts, looping, anddifferent sample rates for different chunks. On input, the silence parts are filled out,loops are rejected, andsample data with a new sample rate is rejected. Silence with a differentsample rate is generated appropriately. On output, silence is not detected, nor are impossible samplerates.
.auto This is a ``meta-type'': specifying this type for an input file triggers somecode that triesto guess the real typeby looking for magic words in theheader. If thetype can't be guessed, the program exits with an errormessage. The input must be a plain file, not apipe. This type can't be used foroutput files.
.smp Turtle Beach SampleVision files. SMPfiles are for use with the PC-DOS package SampleVision by Turtle Beach Softworks. This package is for communication to several MIDI samplers. All sample rates are supported bythe package, although not all are supported by the samplers themselves. Currently looppoints are ignored.
.wav Windows 3.1 .WAV RIFF files. These appear to be very similar to IFF files, but notthe same. They are the native sound file format of Windows 3.1. Obviously, Windows 3.1 is of such incredible importance to the computer industry that it just had to have its own sound file format.
EFFECTS Only one effect from the palette may be applied to a sound sample. To do multiple effects you'll need to run sox in a pipeline.
copyCopy the input file to the output file. This is the defaulteffect if both files have the same sampling rate, or the rates are "close".
rateTranslate inputsampling rate to output sampling ratevia linear interpolation tothe Least Common Multiple of the two sampling rates. This is the default effect if the two
Page 4 (printed 2/3/93)
SOX(1) UNIX System V SOX(1)
files have different sampling rates.This isfast but noisy.
avgMix 4- or 2-channel sound file into 2-or 1-channel file by averaging the samples for different speakers.
statDo a statistical check on the input file, andprint results on the standarderror file. stat may copy the file untouched from input to output,if you select an output file. The "Volume Adjustment:" field in the statistics gives you the argument to the -v number which will makethe sample as loud aspossible.
echo [ delay volume ... ] Add echoing to a sound sample. Each delay/volume pair gives the delay in seconds and the volume (relative to 1.0) of that echo. If the volumes add up to more than1.0, the sound will melt down instead of fading away.
vibro speed [ depth ] Add the world-famous Fender Vibro-Champ sound effect to a sound sample byusing asine wave asthe volume knob. Speed gives the Hertz value of the wave. Thismust beunder 30. Depth gives the amount the volume is cut into by the sine wave, ranging 0.0 to 1.0 and defaulting to 0.5.
lowp center Apply a low-pass filter. The frequency response drops logarithmically with center frequency in the middleof the drop. The slope of thefilter is quite gentle.
band [ -n ] center [ width ] Apply a band-pass filter. The frequency response drops logarithmicallyaround the
Page 5 (printed 2/3/93)
SOX(1) UNIX System V SOX(1)
center frequency. The width gives the slopeof the drop. The frequencies at center + width and center - width will be halfof their original amplitudes. Band defaults to a mode orientedto pitched signals, i.e. voice, singing, or instrumental music. The -n (for noise) option usesthe alternate mode for un-pitched signals. Band introduces noise in the shape of the filter,i.e. peaking atthe center frequency and settling around it.
Sox enforces certain effects. If the two files have different sampling rates, therequested effect must be one of copy, or rate, If the two files have different numbers of channels, the avg effect must be requested.
BUGS The syntax ishorrific. It'svery tempting to include a default system that allows aneffect name as the program name and justpipes asound sample from standard input to standard output, but the problem of inputtingthe sample ratesmakes this unworkable.
FILES SEE ALSO NOTICES The echoplex effect is: Copyright(C) 1989 by JefPoskanzer. Permission to use, copy, modify, and distribute this software and its documentation forany purpose andwithoutfee is hereby granted, provided that the above copyright notice appear inall copies and that both that copyrightnotice and thispermission notice appear in supporting documentation. This software is provided"as is" without express or implied warranty.
Page 6 (printed 2/3/93)
Manufacturer : | |
Product : | Application |
Original Format : | 3.5 |
Part No. : | |
Operating System : | DOS |
Version : | |
Imaging Tool : | Zip |
|
Got something to say about this item? Submit your review below!