home *** CD-ROM | disk | FTP | other *** search
/ Groovy Bytes: Behind the Moon / groovybytes.iso / GROOVY / SND_TOOL / WM10.ZIP / DOC.DAT / soxman.txt < prev    next >
Encoding:
Text File  |  1995-08-30  |  19.2 KB  |  348 lines

  1.            NAME
  2.  
  3.                 SOX - SOund eXchange - universal sound sample translator
  4.  
  5.            SYNOPSIS
  6.  
  7.                 SOX <infile> <outfile>
  8.                 SOX <infile> <outfile> [<effect> [<effect options> ...]]
  9.                 SOX <infile> -e <effect> [<effect options> ...]
  10.                 SOX [<general options>] [<format options>] <infile> 
  11.                     [<format options>] <outfile> 
  12.                     [<effect> [<effect options> ...]]
  13.  
  14.                 General options: [-V] [-v <volume>]
  15.  
  16.                 Format options:  [-t <filetype>] [-r <rate>] [-s/-u/-U/-A]
  17.                                  [-b/-w/-l/-f/-d/-D] [-c <channels>] [-x]
  18.                 Effects:
  19.  
  20.                      copy
  21.                      rate
  22.                      avg
  23.                      stat
  24.                      echo <delay> <volume> [<delay> <volume> ...]
  25.                      vibro <speed> [<depth>]
  26.                      lowp <center>
  27.                      highp <center>
  28.                      band [-n] <center> [<width>]
  29.  
  30.            DESCRIPTION
  31.  
  32.                 SOX translates sound files from one format to another, 
  33.                 possibly doing a sound effect.
  34.  
  35.            OPTIONS
  36.  
  37.                 The option syntax is a little grotty, but in essence:
  38.  
  39.                 SOX <source>.AU <destination>.VOC
  40.  
  41.                 translates a sound sample in Sun Sparc AU format into a
  42.                 SoundBlaster VOC file, while
  43.  
  44.                 SOX -v 0.5 <source>.AU -r 12000 <destination>.VOC rate
  45.  
  46.                 does the same format translation but also lowers the amplitude
  47.                 by 1/2 and changes the sampling rate from 8000 Hertz to 12000 
  48.                 Hertz via the rate sound effect loop.
  49.  
  50.                 File type options:
  51.  
  52.                 -t <filetype>
  53.  
  54.                           gives the type of the sound sample file.
  55.  
  56.                 -r <rate> Give sample rate in Hertz of file.
  57.  
  58.                 -s/-u/-U/-A
  59.  
  60.                           The sample data is signed linear (2's complement),
  61.                           unsigned linear, U-law (logarithmic), or A-law
  62.                           (logarithmic). U-law and A-law are the U.S. and
  63.                           international standards for logarithmic telephone
  64.                           sound compression.
  65.  
  66.                 -b/-w/-l/-f/-d/-D
  67.  
  68.                           The sample data is in bytes, 16-bit words, 32-bit
  69.                           longwords, 32-bit floats, 64-bit double floats, or
  70.                           80-bit IEEE floats. Floats and double floats are
  71.                           in native machine format.
  72.  
  73.                 -x        The sample data is in XINU format; that is, it
  74.                           comes from a machine with the opposite word order
  75.                           than yours and must be swapped according to the
  76.                           word-size given above. Only 16-bit and 32-bit
  77.                           integer data may be swapped. Machine-format
  78.                           floating-point data is not portable. IEEE floats
  79.                           are a fixed, portable format.
  80.  
  81.                 -c <channels>
  82.  
  83.                           The number of sound channels in the data file.
  84.                           This may be 1, 2, or 4; for mono, stereo, or quad
  85.                           sound data.
  86.  
  87.                 General options:
  88.  
  89.                 -e        after the input file allows you to avoid giving an
  90.                           output file and just name an effect. This is only
  91.                           useful with the stat effect.
  92.  
  93.                 -v <volume> 
  94.  
  95.                           Change amplitude (floating point); less than 1.0
  96.                           decreases, greater than 1.0 increases. Note: we
  97.                           perceive volume logarithmically, not linearly.
  98.                           Note: see the stat effect.
  99.  
  100.                 -V        Print a description of processing phases. Useful
  101.                           for figuring out exactly how SOX is mangling your
  102.                           sound samples.
  103.  
  104.                 The input and output files may be standard input and output.
  105.                 This is specified by "-".  The -t type option must be given
  106.                 in this case, else SOX will not know the format of the given
  107.                 file.  The -t, -r, -s/-u/-U/-A, -b/-w/-l/-f/-d/-D and -x
  108.                 options refer to the input data when given before the input
  109.                 file name. After, they refer to the output data.
  110.  
  111.                 If you don't give an output file name, SOX will just read
  112.                 the input file.  This is useful for validating structured
  113.                 file formats; the stat effect may also be used via the -e
  114.                 option.
  115.  
  116.            FILE TYPES
  117.  
  118.                 SOX needs to know the formats of the input and output files.
  119.                 File formats which have headers are checked, if that header
  120.                 doesn't seem right, the program exits with an appropriate
  121.                 message. Currently, raw (no header) binary and textual
  122.                 data, IRCAM Sound Files, Sound Blaster, SPARC AU
  123.                 (w/header), Mac HCOM, PC/DOS SOU, Sndtool, and Sounder,
  124.                 NeXT SND, Windows 3.1 RIFF/WAV, Turtle Beach SMP, CD-R,
  125.                 and Apple/SGI AIFF and 8SVX formats are supported.
  126.  
  127.                 AIFF      AIFF files used on Apple IIc/IIgs and SGI. Note:
  128.                           the AIFF format supports only one SSND chunk. It
  129.                           does not support multiple sound chunks, or the
  130.                           8SVX musical instrument description format. AIFF
  131.                           files are multimedia archives and and can have
  132.                           multiple audio and picture chunks. You may need a
  133.                           separate archiver to work with them.
  134.  
  135.                 AU        Sun Microsystems AU files. There are apparently
  136.                           many types of AU files; DEC has invented its own
  137.                           with a different magic number and word order. The
  138.                           AU handler can read these files but will not
  139.                           write them. Some AU files have valid AU headers
  140.                           and some do not. The latter are probably original
  141.                           Sun u-law 8000 Hz samples. These can be dealt
  142.                           with using the UL format (see below).
  143.  
  144.                 HCOM      Macintosh HCOM files. These are (apparently) Mac
  145.                           FSSD files with some variant of Huffman compression.
  146.                           The Macintosh has wacky file formats and this format 
  147.                           handler apparently doesn't handle all the ones it 
  148.                           should.  Mac users will need your usual arsenal of 
  149.                           file converters to deal with an HCOM file under Unix 
  150.                           or DOS.
  151.  
  152.                 RAW       Raw files (no header). The sample rate, size (byte, 
  153.                           word, etc), and style (signed, unsigned, etc.) of 
  154.                           the sample file must be given. The number of 
  155.                           channels defaults to 1.
  156.  
  157.                 UB, SB, UW, SW, UL
  158.  
  159.                           These are several suffices which serve as a shorthand
  160.                           for raw files with a given size and style. Thus, UB, 
  161.                           SB, UW, SW, and UL correspond to "unsigned byte", 
  162.                           "signed byte", "unsigned word", "signed word", and 
  163.                           "ulaw" (byte). The sample rate defaults to 8000 Hz 
  164.                           if not explicitly set, and the number of channels (as
  165.                           always) defaults to 1. There are lots of Sparc samples
  166.                           floating around in u-law format with no header and 
  167.                           fixed at a sample rate of 8000 Hz. (Certain sound 
  168.                           management software cheerfully ignores the headers.) 
  169.                           Similarly, most Mac sound files are in unsigned byte 
  170.                           format with a sample rate of 11025 or 22050 Hz.
  171.  
  172.                 SF        IRCAM Sound Files. SoundFiles are used by academic 
  173.                           music software such as the CSound package, and the 
  174.                           MixView sound sample editor.
  175.  
  176.                 VOC       Sound Blaster VOC files. VOC files are multi-part 
  177.                           and contain silence parts, looping, and different 
  178.                           sample rates for different chunks. On input, the 
  179.                           silence parts are filled out, loops are rejected, 
  180.                           and sample data with a new sample rate is rejected. 
  181.                           Silence with a different sample rate is generated 
  182.                           appropriately. On output, silence is not detected, 
  183.                           nor are impossible sample rates.
  184.  
  185.                 Auto      This is a "meta-type": specifying this type for
  186.                           an input file triggers some code that tries to
  187.                           guess the real type by looking for magic words in
  188.                           the header. If the type can't be guessed, the
  189.                           program exits with an error message. The input
  190.                           must be a plain file, not a pipe. This type can't
  191.                           be used for output files.
  192.  
  193.                 CDR       CD-R. CD-R files are used in mastering music Compact
  194.                           Disks. The file format is, as you might expect,
  195.                           raw stereo raw unsigned samples at 44kHz. But,
  196.                           there's some blocking/padding oddity in the format,
  197.                           so it needs its own handler.
  198.  
  199.                 DAT       Text Data files. These files contain a textual 
  200.                           representation of the sample data. There is one line 
  201.                           at the beginning that contains the sample rate. 
  202.                           Subsequent lines contain two numeric data items: the
  203.                           time since the beginning of the sample and the sample
  204.                           value. Values are normalized so that the maximum and 
  205.                           minimum are 1.00 and -1.00. This file format can be 
  206.                           used to create data files for external programs such 
  207.                           as FFT analyzers or graph routines. SOX can also 
  208.                           convert a file in this format back into one of the 
  209.                           other file formats.
  210.  
  211.                 SMP       Turtle Beach SampleVision files. SMP files are for 
  212.                           use with the PC-DOS package SampleVision by Turtle 
  213.                           Beach Softworks. This package is for communication to
  214.                           several MIDI samplers. All sample rates are supported
  215.                           by the package, although not all are supported by the
  216.                           samplers themselves. Currently loop points are 
  217.                           ignored.
  218.  
  219.                 WAV       Windows 3.1 WAV RIFF files. These appear to be very 
  220.                           similar to IFF files, but not the same. They are the 
  221.                           native sound file format of Windows 3.1. Obviously, 
  222.                           Windows 3.1 is of such incredible importance to the 
  223.                           computer industry that it just had to have its own 
  224.                           sound file format.
  225.  
  226.            EFFECTS
  227.  
  228.                 Only one effect from the palette may be applied to a sound
  229.                 sample.  To do multiple effects you'll need to run SOX in a
  230.                 pipeline.
  231.  
  232.                 copy                          Copy the input file to the
  233.                                               output file. This is the
  234.                                               default effect if both files
  235.                                               have the same sampling rate,
  236.                                               or the rates are "close".
  237.  
  238.                 rate                          Translate input sampling rate
  239.                                               to output sampling rate via
  240.                                               linear interpolation to the
  241.                                               Least Common Multiple of the
  242.                                               two sampling rates. This is
  243.                                               the default effect if the two
  244.                                               files have different sampling
  245.                                               rates. This is fast but
  246.                                               noisy: the spectrum of the
  247.                                               original sound will be shifted
  248.                                               upwards and duplicated faintly
  249.                                               when up-translating by a multiple.
  250.  
  251.                 avg                           Mix 4- or 2-channel sound file
  252.                                               into 2- or 1-channel file by
  253.                                               averaging the samples for
  254.                                               different speakers.
  255.  
  256.                 stat                          Do a statistical check on the
  257.                                               input file, and print results
  258.                                               on the standard error file.
  259.                                               stat may copy the file untouched 
  260.                                               from input to output, if you 
  261.                                               select an output file.
  262.                                               The "Volume Adjustment:"
  263.                                               field in the statistics gives
  264.                                               you the argument to the -v
  265.                                               number which will make the
  266.                                               sample as loud as possible.
  267.  
  268.                 echo [<delay> <volume>...]    Add echoing to a sound sample.
  269.                                               Each delay/volume pair gives
  270.                                               the delay in seconds and the
  271.                                               volume (relative to 1.0) of
  272.                                               that echo. If the volumes add
  273.                                               up to more than 1.0, the sound
  274.                                               will melt down instead of fading
  275.                                               away.
  276.  
  277.                 vibro <speed> [<depth>]       Add the world-famous Fender
  278.                                               Vibro-Champ sound effect to a
  279.                                               sound sample by using a sine
  280.                                               wave as the volume knob.
  281.                                               Speed gives the Hertz value of
  282.                                               the wave. This must be under
  283.                                               30. Depth gives the amount
  284.                                               the volume is cut into by the
  285.                                               sine wave, ranging 0.0 to 1.0
  286.                                               and defaulting to 0.5.
  287.  
  288.                 lowp <center>                 Apply a low-pass filter. The
  289.                                               frequency response drops 
  290.                                               logarithmically with center 
  291.                                               frequency in the middle of the
  292.                                               drop. The slope of the filter
  293.                                               is quite gentle.
  294.  
  295.                 highp <center>                Apply a high-pass filter. The
  296.                                               frequency response drops 
  297.                                               logarithmically with center 
  298.                                               frequency in the middle of the
  299.                                               drop. The slope of the filter
  300.                                               is quite gentle.
  301.  
  302.                 band [-n] <center> [<width>]  Apply a band-pass filter. The
  303.                                               frequency response drops 
  304.                                               logarithmically around the center
  305.                                               frequency. The width gives
  306.                                               the slope of the drop. The
  307.                                               frequencies at center + width
  308.                                               and center - width will be
  309.                                               half of their original amplitudes.
  310.                                               Band defaults to a mode oriented 
  311.                                               to pitched signals, i.e. voice, 
  312.                                               singing, or instrumental music.  
  313.                                               The -n (for noise) option uses 
  314.                                               the alternate mode for un-pitched
  315.                                               signals. Band introduces
  316.                                               noise in the shape of the
  317.                                               filter, i.e. peaking at the
  318.                                               center frequency and settling
  319.                                               around it.
  320.  
  321.                 SOX enforces certain effects. If the two files have
  322.                 different sampling rates, the requested effect must be one of
  323.                 copy, or rate. If the two files have different numbers of
  324.                 channels, the avg effect must be requested.
  325.  
  326.                 reverse                       Reverse the sound sample
  327.                                               completely.  Included for finding
  328.                                               Satanic subliminals.
  329.  
  330.            BUGS
  331.  
  332.                 The syntax is horrific. It's very tempting to include a
  333.                 default system that allows an effect name as the program
  334.                 name and just pipes a sound sample from standard input to
  335.                 standard output, but the problem of inputting the sample
  336.                 rates makes this unworkable.
  337.  
  338.            NOTICES
  339.  
  340.                 The echoplex effect is: Copyright (C) 1989 by Jef Poskanzer.
  341.  
  342.                 Permission to use, copy, modify, and distribute this software 
  343.                 and its documentation for any purpose and without fee is hereby
  344.                 granted, provided that the above copyright notice appear in all
  345.                 copies and that both that copyright notice and this permission 
  346.                 notice appear in supporting documentation. This software is 
  347.                 provided "as is" without express or implied warranty.
  348.