home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 November / Chip_2004-11_cd1.bin / zkuste / dolby / download / sox / sox12174.exe / sox12174 / sox.txt < prev    next >
Text File  |  2003-03-23  |  50KB  |  1,254 lines

  1. SoX(1)                               SoX(1)
  2.  
  3.  
  4.  
  5. NAME
  6.        sox - Sound eXchange : universal sound sample translator
  7.  
  8. SYNOPSIS
  9.        sox infile outfile
  10.  
  11.        sox [ general options ] [ format options ] infile
  12.        [ format options ] outfile
  13.        [ effect [ effect options ] ... ]
  14.  
  15.        soxmix infile1 infile2 outfile
  16.  
  17.        soxmix [ general options ] [ format options ] infile1
  18.        [ format options ] infile2
  19.        [ format options ] outfile
  20.        [ effect [ effect options ] ... ]
  21.  
  22.  
  23.        General options:
  24.        [ -h ] [ -p ] [ -v volume ] [ -V ]
  25.  
  26.        Format options:
  27.        [  -t filetype ] [ -r rate ] [ -s/-u/-U/-A/-a/-i/-g/-f
  28.        ]
  29.        [ -b/-w/-l ]
  30.        [ -c channels ] [ -x ] [ -e ]
  31.  
  32.        Effects:
  33.        avg [ -l | -r | -f | -b | n,n,...,n ]
  34.        band [ -n ] center [ width ]
  35.        bandpass frequency bandwidth
  36.        bandreject frequency bandwidth
  37.        chorus gain-in gain out delay decay speed depth
  38.           -s | -t [ delay decay speed depth -s | -t ]
  39.        compand attack1,decay1[,attack2,decay2...]
  40.            in-dB1,out-dB1[,in-dB2,out-dB2...]
  41.            [ gain [ initial-volume [ delay ] ] ]
  42.        copy
  43.        dcshift shift [ limitergain ]
  44.        deemph
  45.        earwax
  46.        echo gain-in gain-out delay decay [ delay decay ... ]
  47.        echos gain-in gain-out delay decay [ delay decay ... ]
  48.        fade [ type ] fade-in-length
  49.         [ stop-time [ fade-out-length ] ]
  50.        filter [ low ]-[ high ] [ window-len [ beta ]]
  51.        flanger gain-in gain-out delay decay speed < -s | -t >
  52.        highp frequency
  53.        highpass frequency
  54.        lowp frequency
  55.        lowpass frequency
  56.        map
  57.        mask
  58.        pan direction
  59.        phaser gain-in gain-out delay decay speed < -s | -t >
  60.        pick [ -1 | -2 | -3 | -4 | -l | -r ]
  61.        pitch shift [ width interpole fade ]
  62.        polyphase [ -w < nut / ham > ]
  63.              [    -width < long / short / # > ]
  64.              [ -cutoff # ]
  65.        rate
  66.        resample [ -qs | -q | -ql ] [ rolloff [ beta ] ]
  67.        reverb gain-out reverb-time delay [ delay ... ]
  68.        reverse
  69.        silence above_periods [ duration threshold[ d | % ]
  70.            [ below_periods duration
  71.              threshold[ d | % ]]
  72.        speed [ -c ] factor
  73.        split
  74.        stat [ -s n ] [ -rms ] [ -v ] [ -d ]
  75.        stretch [ factor [ window fade shift fading ]
  76.        swap [ 1 2 | 1 2 3 4 ]
  77.        synth [ length ] type mix [ freq [ -freq2 ]
  78.          [ off ] [ ph ] [ p1 ] [ p2 ] [ p3 ]
  79.        trim start [ length ]
  80.        vibro speed [ depth ]
  81.        vol gain [ type [ limitergain ] ]
  82.  
  83. DESCRIPTION
  84.        SoX is a command line program that can convert most  popu¡
  85.        lar  audio files to most other popular audio file formats.
  86.        It can optionally change the audio sample  data    type  and
  87.        apply  one  or  more sound effects to the file during this
  88.        translation.
  89.  
  90.        soxmix is functionally the same as the command  line  pro¡
  91.        gram sox expect that it takes two files as input and mixes
  92.        the audio together to produce a single file as output.  It
  93.        has  a  restriction  that  both input files must be of the
  94.        same data type and sample rates.
  95.  
  96.        There are two types of audio files formats  that     SoX  can
  97.        work  with.   The  first are self-describing file formats.
  98.        These contain a header that completely describe the  char¡
  99.        acteristics of the audio data that follows.
  100.  
  101.        The  second type are header-less data, or sometimes called
  102.        raw data.  A user must pass enough information to  SoX  on
  103.        the  command  line  so  that it knows what type of data it
  104.        contains.
  105.  
  106.        Audio data can usually be totally described by four  char¡
  107.        acteristics:
  108.  
  109.        rate     The  sample  rate is in samples per second.  For
  110.          example, CD sample rates are at 44100.
  111.  
  112.        data size The precision the data is stored in.  Most popu¡
  113.          lar are 8-bit bytes or 16-bit words.
  114.  
  115.        data encoding
  116.          What  encoding the data type uses.  Examples are
  117.          u-law, ADPCM, or signed linear data.
  118.  
  119.        channels     How many channels are    contained  in  the  audio
  120.          data.     Mono and Stereo are the two most common.
  121.  
  122.        Please refer to the soxexam(1)  manual  page  for  a  long
  123.        description  with  examples on how to use SoX with various
  124.        types of file formats.
  125.  
  126. OPTIONS
  127.        The option syntax is a little grotty, but in essence:
  128.  
  129.         sox File.au file.wav
  130.  
  131.        translates a sound file in SUN Sparc  .AU  format  into    a
  132.        Microsoft .WAV file, while
  133.  
  134.         sox -v 0.5 file.au -r 12000 file.wav mask
  135.  
  136.        does  the  same    format    translation  but  also lowers the
  137.        amplitude by 1/2,  changes  the    sampling  rate    to  12000
  138.        hertz,  and  applies  the  mask    sound effect to the audio
  139.        data.
  140.  
  141.        The following will mix two sound files together to to pro¡
  142.        duce a single sound file.
  143.  
  144.            soxmix music.wav voice.wav mixed.wav
  145.  
  146.        Format options:
  147.  
  148.        Format  options effect the audio samples that they immedi¡
  149.        ately precede.  If they are placed before the  input  file
  150.        name  then they effect the input data.  If they are placed
  151.        before the output file name then they will effect the out¡
  152.        put data.  By taking advantage of this, you can override a
  153.        input file's corrupted header or produce     an  output  file
  154.        that  is     totally different style then the input file.  It
  155.        is also how SoX is informed about the format of raw  input
  156.        data.
  157.  
  158.        -t filetype
  159.          gives the type of the sound sample file.  Useful
  160.          when file extension is not standard or for spec¡
  161.          ifying the .auto file type.
  162.  
  163.        -r rate     Gives    the sample rate in Hertz of the file.  To
  164.          cause the output file to have a different sample
  165.          rate than the input file, include this option as
  166.          a part of the output options.
  167.          If the input and  output  files  have    different
  168.          rates    then  a sample rate change effect must be
  169.          ran.  If a sample rate changing  effect  is  not
  170.          specified  then a default one will internally be
  171.          ran by SoX using its default parameters.
  172.  
  173.        -s/-u/-U/-A/-a/-i/-g/-f
  174.          The sample data encoding is signed  linear  (2's
  175.          complement),  unsigned     linear, u-law (logarith¡
  176.          mic),    A-law  (logarithmic),  ADPCM,  IMA_ADPCM,
  177.          GSM, or Floating-point.
  178.          U-law    (actually shorthand for mu-law) and A-law
  179.          are the U.S.  and  international  standards  for
  180.          logarithmic  telephone     sound compression.  When
  181.          uncompressed u-law has roughly the precision  of
  182.          14-byte PCM audio and A-law has roughly the pre¡
  183.          cision of 13-bit PCM audio.
  184.          A-law and u-law data is sometimes encoded  using
  185.          a  reversed  bit-ordering (ie. MSB becomes LSB).
  186.          Internally, SoX understands  how  to  work  with
  187.          this  encoding but there is currently no command
  188.          line option to specify it.   If  you  need  this
  189.          support  then    you can use the psuedo file types
  190.          of ".la" and ".lu" to inform sox of  the  encod¡
  191.          ing.  See supported file types for more informa¡
  192.          tion.
  193.          ADPCM is a form of sound compression that has    a
  194.          good  compromise  between good sound quality and
  195.          fast encoding/decoding time.    It  is    used  for
  196.          telephone sound compression and places were full
  197.          fidelity is not as important.    When uncompressed
  198.          it  has  roughly  the    precision  of  16-bit PCM
  199.          audio.     Popular version of ADPCM include  G.726,
  200.          MS  ADPCM,  and IMA ADPCM.  The -a flag has dif¡
  201.          ferent meanings in different file handlers.   In
  202.          .wav  files it represents MS ADPCM files, in all
  203.          others it means G.726 ADPCM.    IMA  ADPCM  is    a
  204.          specific  form     of  ADPCM  compression, slightly
  205.          simpler  and  slightly      lower      fidelity   than
  206.          Microsoft's  flavor of ADPCM.    IMA ADPCM is also
  207.          called DVI ADPCM.
  208.          GSM is a standard used for telephone sound  com¡
  209.          pression  in  European countries and its gaining
  210.          popularity because of its quality.   It  usually
  211.          is CPU intensive to work with GSM audio data.
  212.  
  213.        -b/-w/-l     The  sample data size is in bytes, 16-bit words,
  214.          or 32-bit long words.
  215.  
  216.        -x     The sample data is in XINU format; that  is,  it
  217.          comes    from  a     machine  with    the opposite word
  218.          order than yours and must be  swapped    according
  219.          to  the  word-size given above.  Only 16-bit and
  220.          32-bit integer data may  be  swapped.     Machine-
  221.          format floating-point data is not portable.
  222.  
  223.        -c channels
  224.          The  number  of sound channels in the data file.
  225.          This may be 1, 2, or 4;  for  mono,  stereo,  or
  226.          quad  sound  data.   To cause the output file to
  227.          have a different number  of  channels    than  the
  228.          input    file, include this option with the output
  229.          file options.    If the input and output file have
  230.          a  different  number  of  channels  then the avg
  231.          effect must be used.  If the avg effect  is  not
  232.          specified on the command line it will be invoked
  233.          internally with default parameters.
  234.  
  235.        -e     When used after the input filename (so     that  it
  236.          applies  to  the  output  file) it allows you to
  237.          avoid giving an output     filename  and    will  not
  238.          produce an output file.  It will apply any spec¡
  239.          ified effects to the input file.  This is mainly
  240.          useful with the stat effect but can be used with
  241.          others.
  242.  
  243.        General options:
  244.  
  245.        -h     Print version number and usage information.
  246.  
  247.        -p     Run in preview mode and  run  fast.   This  will
  248.          somewhat speed up SoX when the output format has
  249.          a different number of channels and  a    different
  250.          rate  than  the  input     file.     Currently,  this
  251.          defaults to using the rate effect instead of the
  252.          resample effect for sample rate changes.
  253.  
  254.        -v volume Change amplitude (floating point); less than 1.0
  255.          decreases, greater than 1.0 increases.     May  use
  256.          a  negative  number  to  invert the phase of the
  257.          audio data.  It is interesting to note     that  we
  258.          perceive volume logarithmically but this adjusts
  259.          the amplitude linearly.
  260.          Note: see the stat  effect  for  information  on
  261.          finding  the maximum value that can be used with
  262.          this option without causing  audio  data  be  be
  263.          clipped.
  264.  
  265.        -V     Print    a description of processing phases.  Use¡
  266.          ful for figuring out exactly how SoX is mangling
  267.          your sound samples.
  268.  
  269. FILE TYPES
  270.        SoX  attempts  to  determine  the file type of input files
  271.        automatically by looking at the header of the audio  file.
  272.        When  it     is  unable  to detect the file type or if its an
  273.        output file then it uses the file extension of the file to
  274.        determine  what    type of file format handler to use.  This
  275.        can be overridden by specifying the  "-t"  option  on  the
  276.        command line.
  277.  
  278.        The  input  and    output files may be read from standard in
  279.        and out.     This is done by specifying '-' as the    filename.
  280.  
  281.        File  formats  which  have  headers  are     checked, if that
  282.        header doesn't seem  right,  the     program  exits     with  an
  283.        appropriate message.
  284.  
  285.        The following file formats are supported:
  286.  
  287.  
  288.        .8svx     Amiga    8SVX  musical instrument description for¡
  289.          mat.
  290.  
  291.        .aiff     AIFF files  used  on  Apple  IIc/IIgs    and  SGI.
  292.          Note:    the  AIFF  format  supports only one SSND
  293.          chunk.      It  does  not     support  multiple  sound
  294.          chunks,  or the 8SVX musical instrument descrip¡
  295.          tion format.  AIFF files are multimedia archives
  296.          and  can have multiple audio and picture chunks.
  297.          You may need a separate archiver  to  work  with
  298.          them.
  299.  
  300.        .au     SUN Microsystems AU files.  There are apparently
  301.          many types of .au files; DEC  has  invented  its
  302.          own  with  a  different  magic     number     and word
  303.          order.     The .au handler can read these files but
  304.          will  not write them.    Some .au files have valid
  305.          AU headers and some  do  not.     The  latter  are
  306.          probably  original  SUN  u-law     8000 hz samples.
  307.          These can be dealt with  using     the  .ul  format
  308.          (see below).
  309.  
  310.        .avr     Audio Visual Research
  311.          The  AVR  format is produced by a number of com¡
  312.          mercial packages on the Mac.
  313.  
  314.        .cdr     CD-R
  315.          CD-R files are used in mastering music     on  Com¡
  316.          pact  Disks.  The audio data on a CD-R disk is a
  317.          raw audio file with a format  of  stereo  16-bit
  318.          signed samples at a 44khz sample rate.     There is
  319.          a special blocking/padding oddity at the end  of
  320.          the  audio file and is why it needs its own han¡
  321.          dler.
  322.  
  323.        .cvs     Continuously Variable Slope Delta modulation
  324.          Used to compress speech audio    for  applications
  325.          such as voice mail.
  326.  
  327.        .dat     Text Data files
  328.          These    files contain a textual representation of
  329.          the sample data.   There  is  one  line  at  the
  330.          beginning   that   contains   the  sample  rate.
  331.          Subsequent lines contain two numeric data items:
  332.          the time since the beginning of the first sample
  333.          and the sample value.    Values are normalized  so
  334.          that the maximum and minimum are 1.00 and -1.00.
  335.          This file format can  be  used     to  create  data
  336.          files    for external programs such as FFT analyz¡
  337.          ers or graph routines.     SoX can also  convert    a
  338.          file  in  this format back into one of the other
  339.          file formats.
  340.  
  341.        .gsm     GSM 06.10 Lossy Speech Compression
  342.          A standard for compressing speech which is  used
  343.          in  the Global Standard for Mobil telecommunica¡
  344.          tions (GSM).  Its good for its purpose,  shrink¡
  345.          ing  audio data size, but it will introduce lots
  346.          of noise when a given sound  sample  is  encoded
  347.          and decoded multiple times.  This format is used
  348.          by some voice mail applications.  It  is  rather
  349.          CPU intensive.
  350.          GSM in SoX is optional and requires access to an
  351.          external GSM library.    To see if there     is  sup¡
  352.          port  for  gsm     run sox -h and look for it under
  353.          the list of supported file formats.
  354.  
  355.        .hcom     Macintosh HCOM files.     These    are  (apparently)
  356.          Mac FSSD files with some variant of Huffman com¡
  357.          pression.  The Macintosh has wacky file  formats
  358.          and  this format handler apparently doesn't han¡
  359.          dle all the ones it should.  Mac users will need
  360.          your  usual  arsenal  of file converters to deal
  361.          with an HCOM file under Unix or DOS.
  362.  
  363.        .maud     An Amiga format
  364.          An IFF-conform sound file type, registered by MS
  365.          MacroSystem  Computer GmbH, published along with
  366.          the "Toccata" sound-card on the  Amiga.   Allows
  367.          8bit  linear, 16bit linear, A-Law, u-law in mono
  368.          and stereo.
  369.  
  370.        .mp3     MP3 Compressed Audio
  371.          MP3 audio files come from the MPEG standards for
  372.          audio    and  video compression.     They are a lossy
  373.          compression format that achieves  good     compres¡
  374.          sion  rates  with  a  minimum    amount of quality
  375.          loss.    Also see Ogg Vorbis for a similar format.
  376.          MP3  support  in  SoX    is  optional and requires
  377.          access to either or both the external libmad and
  378.          libmp3lame  libraries.      To see if there is sup¡
  379.          port for Mp3 run sox -h and look  for    it  under
  380.          the list of supported file formats as "mp3".
  381.  
  382.  
  383.        .nul     Null  file  handler.  This is a fake file hander
  384.          that act as if its reading a stream of 0's  from
  385.          a  while or fake writing output to a file.  This
  386.          is not a very useful file handler in most cases.
  387.          It  might  be useful in some scripts were you do
  388.          not want to read or write from a real    file  but
  389.          would    like  to  specify  a filename for consis¡
  390.          tency.
  391.  
  392.        .ogg     Ogg Vorbis Compressed Audio.
  393.          Ogg Vorbis is a open, patent-free CODEC designed
  394.          for  compressing  music and streaming audio.  It
  395.          is similar to MP3, VQF,  AAC,    and  other  lossy
  396.          formats.  SoX can decode all types of Ogg Vorbis
  397.          files, but can only encode at 128 kbps.   Decod¡
  398.          ing  is  somewhat  CPU intensive and encoding is
  399.          very CPU intensive.
  400.          Ogg Vorbis  in     SoX  is  optional  and     requires
  401.          access to external Ogg Vorbis libraries.  To see
  402.          if there is support for Ogg Vorbis  run  sox  -h
  403.          and look for it under the list of supported file
  404.          formats as "vorbis".
  405.  
  406.        ossdsp     OSS /dev/dsp device driver
  407.          This is a pseudo-file type and can be optionally
  408.          compiled  into     SoX.    Run  sox -h to see if you
  409.          have support for  this     file  type.   When  this
  410.          driver     is used it allows you to open up the OSS
  411.          /dev/dsp file and configure it to use    the  same
  412.          data  format  as passed in to SoX.  It works for
  413.          both playing and recording sound samples.   When
  414.          playing  sound     files    it attempts to set up the
  415.          OSS driver to use the same format as  the  input
  416.          file.     It  is     suggested to always override the
  417.          output values to use the highest quality samples
  418.          your  sound card can handle.  Example: -t ossdsp
  419.          -w -s /dev/dsp
  420.  
  421.        .sf     IRCAM Sound Files.
  422.          Sound Files are used by academic music     software
  423.          such  as  the    CSound    package,  and the MixView
  424.          sound sample editor.
  425.  
  426.        .sph
  427.          SPHERE (SPeech HEader Resources) is a file  for¡
  428.          mat defined by NIST (National Institute of Stan¡
  429.          dards and Technology) and is  used  with  speech
  430.          audio.      SoX can read these files when they con¡
  431.          tain u-law and PCM data.   It    will  ignore  any
  432.          header     information  that  says the data is com¡
  433.          pressed using shorten compression and will treat
  434.          the  data  as    either    u-law  or PCM.    This will
  435.          allow SoX and the command line     shorten  program
  436.          to be ran together using pipes to uncompress the
  437.          data and then pass the result to  SoX    for  pro¡
  438.          cessing.
  439.  
  440.        .smp     Turtle Beach SampleVision files.
  441.          SMP  files  are  for use with the PC-DOS package
  442.          SampleVision by  Turtle  Beach     Softworks.  This
  443.          package  is  for  communication  to several MIDI
  444.          samplers. All sample rates are supported by  the
  445.          package,  although  not all are supported by the
  446.          samplers themselves. Currently loop  points  are
  447.          ignored.
  448.  
  449.        .snd
  450.          Under    DOS  this  file format is the same as the
  451.          .sndt format.    Under all other platforms  it  is
  452.          the same as the .au format.
  453.  
  454.        .sndt     SoundTool files.
  455.          This is an older DOS file format.
  456.  
  457.        sunau     Sun /dev/audio device driver
  458.          This is a pseudo-file type and can be optionally
  459.          compiled into SoX.  Run sox -h     to  see  if  you
  460.          have  support    for  this  file     type.    When this
  461.          driver is used it allows you to open  up  a  Sun
  462.          /dev/audio file and configure it to use the same
  463.          data type as passed in to  SoX.   It  works  for
  464.          both  playing and recording sound samples.  When
  465.          playing sound files it attempts to  set  up  the
  466.          audio driver to use the same format as the input
  467.          file.    It is suggested to  always  override  the
  468.          output values to use the highest quality samples
  469.          your hardware can handle.  Example: -t sunau  -w
  470.          -s /dev/audio or -t sunau -U -c 1 /dev/audio for
  471.          older sun equipment.
  472.  
  473.        .txw     Yamaha TX-16W sampler.
  474.          A file format from a  Yamaha  sampling     keyboard
  475.          which    wrote  IBM-PC format 3.5" floppies.  Han¡
  476.          dles reading of files which do not have the sam¡
  477.          ple  rate  field  set    to one of the expected by
  478.          looking at some other bytes in     the  attack/loop
  479.          length     fields,  and  defaulting to 33kHz if the
  480.          sample rate is still unknown.
  481.  
  482.        .vms     More info to come.
  483.          Used to compress speech audio    for  applications
  484.          such as voice mail.
  485.  
  486.        .voc     Sound Blaster VOC files.
  487.          VOC  files  are  multi-part  and contain silence
  488.          parts, looping, and different sample  rates  for
  489.          different  chunks.   On input, the silence parts
  490.          are filled out, loops are rejected,  and  sample
  491.          data    with  a     new  sample  rate  is    rejected.
  492.          Silence with a different sample rate  is  gener¡
  493.          ated  appropriately.    On output, silence is not
  494.          detected,  nor     are  impossible  sample   rates.
  495.          Note,    this  version  now  supports  playing VOC
  496.          files with multiple blocks and supports  playing
  497.          files containing u-law and A-law samples.
  498.  
  499.        vorbis     See .ogg format.
  500.  
  501.        .wav     Microsoft .WAV RIFF files.
  502.          These    appear    to  be very similar to IFF files,
  503.          but not the same.  They  are  the  native  sound
  504.          file format of Windows.  (Obviously, Windows was
  505.          of such incredible importance    to  the     computer
  506.          industry  that it just had to have its own sound
  507.          file format.)    Normally .wav files have all for¡
  508.          matting  information in their headers, and so do
  509.          not need any format  options  specified  for  an
  510.          input    file.  If any are, they will override the
  511.          file header, and you  will  be     warned     to  this
  512.          effect.  You had better know what you are doing!
  513.          Output format options will cause a  format  con¡
  514.          version,  and    the  .wav  will written appropri¡
  515.          ately.     SoX currently can read PCM, ULAW,  ALAW,
  516.          MS  ADPCM, and IMA (or DVI) ADPCM.  It can write
  517.          all of these formats including (NEW!)    the ADPCM
  518.          encoding.
  519.  
  520.        .wve     Psion 8-bit A-law
  521.          These    are  8-bit A-law 8khz sound files used on
  522.          the Psion palmtop portable computer.
  523.  
  524.        .raw     Raw files (no header).
  525.          The sample rate, size    (byte,    word,  etc),  and
  526.          encoding (signed, unsigned, etc.)  of the sample
  527.          file must be  given.    The  number  of     channels
  528.          defaults to 1.
  529.  
  530.        .ub, .sb, .uw, .sw, .ul, .al, .lu, .la, .sl
  531.          These    are  several  suffices    which  serve as a
  532.          shorthand for raw files with a     given    size  and
  533.          encoding.   Thus, ub, sb, uw, sw, ul, al, lu, la
  534.          and sl correspond to  "unsigned  byte",  "signed
  535.          byte",     "unsigned  word", "signed word", "u-law"
  536.          (byte), "A-law" (byte), inverse  bit  order  "u-
  537.          law",    inverse     bit  order  "A-law", and "signed
  538.          long".     The sample rate defaults to 8000  hz  if
  539.          not  explicitly  set, and the number of channels
  540.          defaults to 1.     There are lots of Sparc  samples
  541.          floating  around  in u-law format with no header
  542.          and fixed at a sample rate of 8000 hz.     (Certain
  543.          sound management software cheerfully ignores the
  544.          headers.)  Similarly, most Mac sound  files  are
  545.          in  unsigned  byte  format with a sample rate of
  546.          11025 or 22050 hz.
  547.  
  548.        .auto     This is a ``meta-type'':  specifying  this  type
  549.          for  an input file triggers some code that tries
  550.          to guess the real  type  by  looking  for  magic
  551.          words    in  the     header.   If  the  type can't be
  552.          guessed, the program exits with  an  error  mes¡
  553.          sage.     The  input  must  be a plain file, not a
  554.          pipe.    This type can't be used for output files.
  555.  
  556. EFFECTS
  557.        Multiple effects may be applied to the audio data by spec¡
  558.        ifying them one after another at the end     of  the  command
  559.        line.
  560.  
  561.        avg [ -l | -r | -f | -b | n,n,...,n ]
  562.          Reduce     the  number of channels by averaging the
  563.          samples, or duplicate channels to  increase  the
  564.          number     of  channels.     This effect is automati¡
  565.          cally used when the  number  of  input     channels
  566.          differ from the number of output channels.  When
  567.          reducing the number of channels it  is     possible
  568.          to  manually  specify the avg effect and use the
  569.          -l, -r, -f, or -b options  to    select    only  the
  570.          left,    right,    front, or back channel(s) for the
  571.          output instead of averaging the  channels.   The
  572.          -f  and  -b  options  maintain left/right stereo
  573.          separation; use the avg effect twice to select a
  574.          single channel.
  575.  
  576.          The avg effect can also be invoked with up to 16
  577.          double-precision numbers, which specify the pro¡
  578.          portion  of  each  input  channel  that is to be
  579.          mixed into each output channel.  In  two-channel
  580.          mode, 4 numbers are given: l->l, l->r, r->l, and
  581.          r->r, respectively.  In four-channel  mode,  the
  582.          first    4  numbers  give  the proportions for the
  583.          left-front output channel, as    follows:  lf->lf,
  584.          rf->lf, lb->lf, and rb->rf.  The next 4 give the
  585.          right-front output in the same order, then left-
  586.          back and right-back.
  587.  
  588.          It  is     also  possible     to use the 16 numbers to
  589.          expand or reduce the channel count; just specify
  590.          0 for unused channels.     Finally, if fewer than 4
  591.          numbers are given, certain special abbreviations
  592.          may be invoked; see the source code for details.
  593.  
  594.        band [ -n ] center [ width ]
  595.          Apply    a  band-pass   filter.      The    frequency
  596.          response drops logarithmically around the center
  597.          frequency.  The width gives  the  slope  of  the
  598.          drop.     The  frequencies  at  center + width and
  599.          center - width will be half  of  their     original
  600.          amplitudes.  Band defaults to a mode oriented to
  601.          pitched signals, i.e. voice, singing, or instru¡
  602.          mental     music.      The  -n (for noise) option uses
  603.          the  alternate     mode  for  un-pitched     signals.
  604.          Warning:  -n  introduces  a  power-gain of about
  605.          11dB in the filter, so beware    of  output  clip¡
  606.          ping.    Band introduces noise in the shape of the
  607.          filter, i.e. peaking at the center frequency and
  608.          settling  around  it.    See filter for a bandpass
  609.          effect with steeper shoulders.
  610.  
  611.        bandpass frequency bandwidth
  612.          Butterworth bandpass filter. Description  coming
  613.          soon!
  614.  
  615.        bandreject frequency bandwidth
  616.          Butterworth bandreject filter.     Description com¡
  617.          ing soon!
  618.  
  619.        chorus gain-in gain-out delay decay speed depth
  620.  
  621.           -s | -t [ delay decay speed depth -s | -t ... ]
  622.          Add a chorus to a sound sample.  Each    quadtuple
  623.          delay/decay/speed/depth  gives the delay in mil¡
  624.          liseconds and the decay  (relative  to     gain-in)
  625.          with  a  modulation  speed  in Hz using depth in
  626.          milliseconds.    The modulation    is  either  sinu¡
  627.          soidal (-s) or triangular (-t).  Gain-out is the
  628.          volume of the output.
  629.  
  630.        compand attack1,decay1[,attack2,decay2...]
  631.  
  632.            in-dB1,out-dB1[,in-dB2,out-dB2...]
  633.  
  634.            [gain [initial-volume [delay ] ] ]
  635.          Compand (compress or expand) the  dynamic  range
  636.          of  a sample.    The attack and decay time specify
  637.          the integration time  over  which  the     absolute
  638.          value    of  the     input    signal    is  integrated to
  639.          determine its volume; attacks refer to increases
  640.          in  volume and decays refer to decreases.  Where
  641.          more than one pair  of     attack/decay  parameters
  642.          are  specified,  each    channel     is treated sepa¡
  643.          rately and the number of pairs must  agree  with
  644.          the number of input channels.    The second param¡
  645.          eter is a list     of  points  on     the  compander's
  646.          transfer  function  specified    in dB relative to
  647.          the  maximum  possible     signal     amplitude.   The
  648.          input    values    must  be in a strictly increasing
  649.          order but the transfer function does not have to
  650.          be monotonically rising.  The special value -inf
  651.          may be used to indicate that  the  input  volume
  652.          should     be associated output volume.  The points
  653.          -inf,-inf and 0,0 are assumed; the latter may be
  654.          overridden, but the former may not.
  655.  
  656.          The  third  (optional)     parameter is a post-pro¡
  657.          cessing gain in dB which is  applied  after  the
  658.          compression   has   taken   place;   the  fourth
  659.          (optional) parameter is an initial volume to  be
  660.          assumed for each channel when the effect starts.
  661.          This permits the user to supply a nominal  level
  662.          initially,  so     that,    for example, a very large
  663.          gain is not applied  to  initial  signal  levels
  664.          before     the companding action has begun to oper¡
  665.          ate: it is quite probable that in such an event,
  666.          the  output  would be severely clipped while the
  667.          compander gain properly adjusts itself.
  668.  
  669.          The fifth (optional) parameter     is  a    delay  in
  670.          seconds.   The     input signal is analyzed immedi¡
  671.          ately    to  control  the  compander,  but  it  is
  672.          delayed before being fed to the volume adjuster.
  673.          Specifying a delay approximately  equal  to  the
  674.          attack/decay    times  allows  the  compander  to
  675.          effectively operate  in  a  "predictive"  rather
  676.          than a reactive mode.
  677.  
  678.        copy     Copy the input file to the output file.  This is
  679.          the default effect if both files have    the  same
  680.          sampling rate.
  681.  
  682.        dcshift shift [ limitergain ]
  683.          DC  Shift  the     audio    data,  with  basic linear
  684.          amplitude formula.  This is most useful if  your
  685.          audio    data  tends  to     not be centered around a
  686.          value of 0.  Shifting it back will allow you  to
  687.          get the most volume adjustments without clipping
  688.          audio data.
  689.          The first option is the dcshift value.     It is    a
  690.          floating  point number that indicates the amount
  691.          to shift.
  692.          An option limtergain value can be  specified  as
  693.          well.    It should have a value much less then 1.0
  694.          and is used only on peaks to prevent clipping.
  695.  
  696.        deemph     Apply a treble attenuation  shelving  filter  to
  697.          samples  in  audio  cd     format.   The    frequency
  698.          response of pre-emphasized recordings is  recti¡
  699.          fied.     The filtering is defined in the standard
  700.          document ISO 908.
  701.  
  702.        earwax     Makes sound easier to listen to  on  headphones.
  703.          Adds audio-cues to samples in audio cd format so
  704.          that when listened to on headphones  the  stereo
  705.          image    is  moved from inside your head (standard
  706.          for headphones) to outside and in front  of  the
  707.          listener (standard for speakers). See
  708.          www.geocities.com/beinges  for     a  full explana¡
  709.          tion.
  710.  
  711.        echo gain-in gain-out delay decay [ delay decay ... ]
  712.          Add echoing to a sound sample.     Each delay/decay
  713.          part  gives  the  delay  in milliseconds and the
  714.          decay (relative to gain-in) of that echo.  Gain-
  715.          out is the volume of the output.
  716.  
  717.        echos gain-in gain-out delay decay [ delay decay ... ]
  718.          Add a sequence of echos to a sound sample.  Each
  719.          delay/decay part gives the delay in milliseconds
  720.          and  the  decay  (relative  to     gain-in) of that
  721.          echo.    Gain-out is the volume of the output.
  722.  
  723.        fade [ type ] fade-in-length
  724.  
  725.         [ stop-time [ fade-out-length ] ]
  726.          Add a fade effect to the beginning, end, or both
  727.          of the audio data.
  728.  
  729.          For  fade-ins, this starts from the first sample
  730.          and ramps the volume of the audio from 0 to full
  731.          volume     over  fade-in-length seconds.    Specify 0
  732.          seconds if no fade-in is wanted.
  733.  
  734.          For fade-outs, the audio data will be    truncated
  735.          at  the  stop-time and the volume will be ramped
  736.          from full volume down to 0 starting at fade-out-
  737.          length     seconds  before the stop-time.     No fade-
  738.          out is performed if these options are not speci¡
  739.          fied.
  740.          All  times can be specified in either periods of
  741.          time or sample counts.     To specify time  periods
  742.          use the format hh:mm:ss.frac format.  To specify
  743.          using sample counts, specify the number of  sam¡
  744.          ples  and  append  the     letter 's' to the sample
  745.          count (for example 8000s).
  746.          An optional type can be specified to change  the
  747.          type  of envelope.  Choices are q for quarter of
  748.          a sinewave, h for half a sinewave, t for  linear
  749.          slope,     l  for     logarithmic,  and p for inverted
  750.          parabola.  The default is a linear slope.
  751.  
  752.        filter [ low ]-[ high ] [ window-len [ beta ] ]
  753.          Apply    a  Sinc-windowed  lowpass,  highpass,  or
  754.          bandpass  filter  of  given window length to the
  755.          signal.  low refers  to  the  frequency  of  the
  756.          lower    6dB corner of the filter.  high refers to
  757.          the frequency of the upper  6dB  corner  of  the
  758.          filter.
  759.  
  760.          A  lowpass  filter  is     obtained  by leaving low
  761.          unspecified,  or  0.    A  highpass   filter   is
  762.          obtained  by  leaving high unspecified, or 0, or
  763.          greater than or equal to the Nyquist  frequency.
  764.  
  765.          The window-len, if unspecified, defaults to 128.
  766.          Longer windows give a    sharper     cutoff,  smaller
  767.          windows a more gradual cutoff.
  768.  
  769.          The  beta, if unspecified, defaults to 16.  This
  770.          selects a Kaiser window.  You can select a  Nut¡
  771.          tall  window by specifying anything <= 2.0 here.
  772.          For more discussion  of  beta,     look  under  the
  773.          resample effect.
  774.  
  775.  
  776.        flanger gain-in gain-out delay decay speed < -s | -t >
  777.          Add  a     flanger  to a sound sample.  Each triple
  778.          delay/decay/speed gives the delay  in    millisec¡
  779.          onds  and the decay (relative to gain-in) with a
  780.          modulation  speed  in    Hz.   The  modulation  is
  781.          either     sinodial (-s) or triangular (-t).  Gain-
  782.          out is the volume of the output.
  783.  
  784.        highp frequency
  785.          Apply a single pole recursive high-pass  filter.
  786.          The  frequency     response  drops  logarithmically
  787.          with I frequency in the middle of the drop.  The
  788.          slope of the filter is quite gentle.  See filter
  789.          for a highpass effect with sharper cutoff.
  790.  
  791.        highpass frequency
  792.          Butterworth highpass filter.  Description coming
  793.          soon!
  794.  
  795.        lowp frequency
  796.          Apply    a  single pole recursive low-pass filter.
  797.          The  frequency     response  drops  logarithmically
  798.          with  frequency  in the middle of the drop.  The
  799.          slope of the filter is quite gentle.  See filter
  800.          for a lowpass effect with sharper cutoff.
  801.  
  802.        lowpass frequency
  803.          Butterworth  lowpass filter.  Description coming
  804.          soon!
  805.  
  806.        map     Display a list of loops in a sample, and miscel¡
  807.          laneous loop info.
  808.  
  809.        mask     Add  "masking    noise"    to  signal.   This effect
  810.          deliberately adds white  noise     to  a    sound  in
  811.          order    to  mask quantization effects, created by
  812.          the process of playing a  sound  digitally.   It
  813.          tends    to  mask buzzing voices, for example.  It
  814.          adds 1/2 bit of noise to the sound file  at  the
  815.          output bit depth.
  816.  
  817.        pan direction
  818.          Pan  the sound of an audio file from one channel
  819.          to another.  This is done by changing the volume
  820.          of  the  input     channels so that it fades out on
  821.          one channel and fades-in  on  another.      If  the
  822.          number     of  input channels is different then the
  823.          number of output channels then this effect tries
  824.          to  intelligently handle this.     For instance, if
  825.          the input contains 1 channel and the output con¡
  826.          tains    2 channels, then it will create the miss¡
  827.          ing channel itself.  The direction  is     a  value
  828.          from  -1.0 to 1.0.  -1.0 represents far left and
  829.          1.0 represents far right.   Numbers  in  between
  830.          will start the pan effect without totally muting
  831.          the opposite channel.
  832.  
  833.        phaser gain-in gain-out delay decay speed < -s | -t >
  834.          Add a phaser to a  sound  sample.   Each  triple
  835.          delay/decay/speed  gives  the delay in millisec¡
  836.          onds and the decay (relative to gain-in) with    a
  837.          modulation  speed  in    Hz.   The  modulation  is
  838.          either sinodial (-s) or  triangular  (-t).   The
  839.          decay should be less than 0.5 to avoid feedback.
  840.          Gain-out is the volume of the output.
  841.  
  842.        pick [ -1 | -2 | -3 | -4 | -l | -r ]
  843.          Select the left or right  channel  of    a  stereo
  844.          sample,  or  one  of  four channels in a quadra¡
  845.          phonic sample. The -l and -r  options    represent
  846.          either      the  left  or     right    channel.   It  is
  847.          required that you use    the  -c     1  command  line
  848.          option in order to force the output file to con¡
  849.          tain only 1 channel.
  850.  
  851.        pitch shift [ width interpole fade ]
  852.          Change the pitch of file without  affecting  its
  853.          duration by cross-fading shifted samples.  shift
  854.          is given in cents. Use a positive value to shift
  855.          to  treble,  negative    value  to  shift to bass.
  856.          Default shift is 0.  width of window is  in  ms.
  857.          Default  width is 20ms. Try 30ms to lower pitch,
  858.          and 10ms to raise pitch.  interpole option,  can
  859.          be "cubic" or "linear". Default is "cubic".  The
  860.          fade option, can be "cos",  "hamming",     "linear"
  861.          or "trapezoid".  Default is "cos".
  862.  
  863.        polyphase [ -w < nut / ham > ]
  864.  
  865.          [  -width <  long  / short  / # > ]
  866.  
  867.          [ -cutoff #  ]
  868.          Translate input sampling rate to output sampling
  869.          rate via polyphase interpolation,  a  DSP  algo¡
  870.          rithm.      This    method    is  slow and uses lots of
  871.          RAM, but gives much better results than rate.
  872.  
  873.          -w < nut / ham > : select either a  Nuttal  (~90
  874.          dB  stopband)    or Hamming (~43 dB stopband) win¡
  875.          dow.  Default is nut.
  876.  
  877.          -width long / short / # : specify the    (approxi¡
  878.          mate)    width  of  the filter.    long is 1024 sam¡
  879.          ples; short is 128 samples.   Alternatively,  an
  880.          exact number can be used.  Default is long.  The
  881.          short option is not recommended, as it     produces
  882.          poor quality results.
  883.  
  884.          -cutoff  # : specify the filter cutoff frequency
  885.          in terms of  fraction    of  frequency  bandwidth,
  886.          also  know as the Nyquist frequency.  Please see
  887.          the resample effect for further  information  on
  888.          Nyquist  frequency.  If upsampling, then this is
  889.          the fraction of the original signal that  should
  890.          go  through.  If downsampling, this is the frac¡
  891.          tion of  the  signal  left  after  downsampling.
  892.          Default is 0.95.  Remember that this is a float.
  893.  
  894.  
  895.        rate     Translate input sampling rate to output sampling
  896.          rate  via linear interpolation to the Least Com¡
  897.          mon Multiple of the two sampling rates.  This is
  898.          the default effect if the two files have differ¡
  899.          ent sampling rates and the preview  options  was
  900.          specified.  This is fast but noisy: the spectrum
  901.          of the original sound will  be     shifted  upwards
  902.          and  duplicated faintly when up-translating by a
  903.          multiple.
  904.  
  905.          Lerp-ing is acceptable     for  cheap  8-bit  sound
  906.          hardware,  but     for  CD-quality sound you should
  907.          instead use either resample  or  polyphase.   If
  908.          you are wondering which rate changing effects to
  909.          use, you will want to read a  detailed     analysis
  910.          of  all  of  them  at    http://eakaw2.et.tu-dres¡
  911.          den.de/~wilde/resample/resample.html
  912.  
  913.        resample [ -qs | -q | -ql ] [ rolloff [ beta ] ]
  914.          Translate input sampling rate to output sampling
  915.          rate  via  simulated  analog  filtration.   This
  916.          method is slower than rate, but gives much  bet¡
  917.          ter results.
  918.  
  919.          By default, linear interpolation is used, with a
  920.          window width about 45 samples at  the    lower  of
  921.          the  two  rate.  This gives an accuracy of about
  922.          16 bits, but insufficient stopband rejection  in
  923.          the  case  that you want to have rolloff greater
  924.          than about 0.80 of the Nyquist frequency.
  925.  
  926.          The -q* options will change the  default  values
  927.          for  rolloff  and  beta as well as use quadratic
  928.          interpolation of filter coefficients,    resulting
  929.          in about 24 bits precision.  The -qs, -q, or -ql
  930.          options specify increased accuracy at    the  cost
  931.          of  lower  execution  speed.    It is optional to
  932.          specify rolloff and beta parameters  when  using
  933.          the -q* options.
  934.  
  935.          Following  is a table of the reasonable defaults
  936.          which are built-in to SoX:
  937.  
  938.             Option  Window rolloff beta interpolation
  939.             ------  ------ ------- ---- -------------
  940.             (none)    45    0.80    16       linear
  941.               -qs     45    0.80    16      quadratic
  942.               -q      75    0.875   16      quadratic
  943.               -ql    149    0.94    16      quadratic
  944.             ------  ------ ------- ---- -------------
  945.  
  946.          -qs, -q, or -ql use window lengths of 45, 75, or
  947.          149  samples, respectively, at the lower sample-
  948.          rate of the two files.     This means progressively
  949.          sharper  stop-band  rejection, at proportionally
  950.          slower execution times.
  951.  
  952.          rolloff refers to the cut-off frequency  of  the
  953.          low  pass  filter  and     is given in terms of the
  954.          Nyquist frequency for    the  lower  sample  rate.
  955.          rolloff  therefore  should  be something between
  956.          0.0 and 1.0, in practice 0.8-0.95.  The defaults
  957.          are indicated above.
  958.  
  959.          The Nyquist frequency is equal to (sample rate /
  960.          2).  Logically, this is  because  the    A/D  con¡
  961.          verter     needs    at  least  2  samples to detect 1
  962.          cycle at  the    Nyquist     frequency.   Frequencies
  963.          higher     then the Nyquist will actually appear as
  964.          lower frequencies to the A/D  converter  and  is
  965.          called aliasing.  Normally, A/D converts run the
  966.          signal through a highpass filter first to  avoid
  967.          these problems.
  968.  
  969.          Similar  problems  will  happen in software when
  970.          reducing the sample rate of an audio file  (fre¡
  971.          quencies  above the new Nyquist frequency can be
  972.          aliased to  lower  frequencies).   Therefore,    a
  973.          good  resample     effect will remove all frequency
  974.          information above the new Nyquist frequency.
  975.  
  976.          The rolloff refers to how close to  the  Nyquist
  977.          frequency this cutoff is, with closer being bet¡
  978.          ter.  When increasing    the  sample  rate  of  an
  979.          audio file you would not expect to have any fre¡
  980.          quencies  exist  that    are  past  the     original
  981.          Nyquist  frequency.  Because of resampling prop¡
  982.          erties, it is common to have alaising data  cre¡
  983.          ated  that  is     above the old Nyquist frequency.
  984.          In that case the rolloff refers to how close  to
  985.          the original Nyquist frequency to use a highpass
  986.          filter to remove this false  data,  with  closer
  987.          also being better.
  988.  
  989.          The beta parameter determines the type of filter
  990.          window used.  Any value greater than 2.0 is  the
  991.          beta for a Kaiser window.  Beta <= 2.0 selects a
  992.          Nuttall window.  If unspecified, the default  is
  993.          a Kaiser window with beta 16.
  994.  
  995.          In the case of Kaiser window (beta > 2.0), lower
  996.          betas produce a somewhat faster transition  from
  997.          passband  to stopband, at the cost of noticeable
  998.          artifacts.  A beta of 16 is  the  default,  beta
  999.          less  than 10 is not recommended.  If you want a
  1000.          sharper cutoff, don't    use  low  beta's,  use    a
  1001.          longer     sample     window.   A  Nuttall  window  is
  1002.          selected by specifying any 'beta' <= 2, and  the
  1003.          Nuttall  window has somewhat steeper cutoff than
  1004.          the default Kaiser window.   You  will     probably
  1005.          not  need  to    use  the  beta    parameter at all,
  1006.          unless you are just curious about comparing  the
  1007.          effects of Nuttall vs. Kaiser windows.
  1008.  
  1009.          This is the default effect if the two files have
  1010.          different sampling  rates.   Default  parameters
  1011.          are, as indicated above, Kaiser window of length
  1012.          45, rolloff 0.80, beta 16, linear interpolation.
  1013.  
  1014.          NOTE:    -qs  is     only  slightly     slower, but more
  1015.          accurate for 16-bit or higher precision.
  1016.  
  1017.          NOTE: In many cases of up-sampling, no     interpo¡
  1018.          lation     is  needed, as exact filter coefficients
  1019.          can be computed in a reasonable amount of space.
  1020.          To be precise, this is done when
  1021.  
  1022.                 input_rate < output_rate
  1023.                        &&
  1024.            output_rate/gcd(input_rate,output_rate) <= 511
  1025.  
  1026.        reverb gain-out delay [ delay ... ]
  1027.          Add reverberation to a sound sample.  Each delay
  1028.          is  given  in    milliseconds  and its feedback is
  1029.          depending on the  reverb-time    in  milliseconds.
  1030.          Each  delay  should  be  in the range of half to
  1031.          quarter of reverb-time to get a realistic rever¡
  1032.          beration.  Gain-out is the volume of the output.
  1033.  
  1034.        reverse     Reverse the sound sample  completely.     Included
  1035.          for finding Satanic subliminals.
  1036.  
  1037.        silence above_periods [ duration threshold[ d | % ]
  1038.  
  1039.            [ below_periods duration
  1040.  
  1041.          threshold[ d | % ]]
  1042.          Removes  silence  from the beginning or end of a
  1043.          sound file.  Silence is anything below a  speci¡
  1044.          fied threshold.
  1045.          When  trimming     silence  from the beginning of a
  1046.          sound file, you specify a duration of audio that
  1047.          is  above a given silence threshold before audio
  1048.          data is processed.  You  can  also  specify  the
  1049.          count    of  periods  of     none silence you want to
  1050.          detect before processing audio data.  Specify    a
  1051.          period of 0 if you do not want to trim data from
  1052.          the front of the sound file.
  1053.          When optionally trimming silence form the end of
  1054.          a  sound file, you specify the duration of audio
  1055.          that must be  below  a     given    threshold  before
  1056.          stopping  to  process    audio  data.   A count of
  1057.          periods that occur below the threshold may  also
  1058.          be specified.    If this options are not specified
  1059.          then data is not trimmed from    the  end  of  the
  1060.          audio file.
  1061.          Duration  counts  may    be in the format of time,
  1062.          hh:mm:ss.frac, or in the exact count of samples.
  1063.          Threshold  may be suffixed with d, or % to indi¡
  1064.          cated the value is in decibels or  a  percentage
  1065.          of  max  value     of the sample value.  A value of
  1066.          '0%' will look for total silence.
  1067.  
  1068.        speed [ -c ] factor
  1069.          Speed up or down the sound, as a  magnetic  tape
  1070.          with a speed control.    It affects both pitch and
  1071.          time. A factor of 1.0 means no     change,  and  is
  1072.          the  default.     2.0  doubles  speed,  thus  time
  1073.          length is cut by a half and pitch is one  octave
  1074.          higher.   0.5 halves speed thus time length dou¡
  1075.          bles and pitch is  one     octave     lower.      If  the
  1076.          optional -c parameter is used then the factor is
  1077.          specified in "cents".
  1078.  
  1079.        split     Turn a mono sample into a stereo sample by copy¡
  1080.          ing  the  input  channel  to  the left and right
  1081.          channels.
  1082.  
  1083.        stat [ -s n ] [-rms ] [ -v ] [ -d ]
  1084.          Do a statistical check on the    input  file,  and
  1085.          print results on the standard error file.  Audio
  1086.          data is passed unmodified from input  to  output
  1087.          file unless used along with the -e option.
  1088.  
  1089.          The "Volume Adjustment:" field in the statistics
  1090.          gives you the argument to the    -v  number  which
  1091.          will make the sample as loud as possible without
  1092.          clipping.
  1093.  
  1094.          The option -v will print out the "Volume Adjust¡
  1095.          ment:"     field's  value     only  and  return.  This
  1096.          could be of use in scripts to auto  convert  the
  1097.          volume.
  1098.  
  1099.          The  -s n option is used to scale the input data
  1100.          by a given factor.  The default value    of  n  is
  1101.          the   max   value  of    a  signed  long     variable
  1102.          (0x7fffffff).    Internal effects always work with
  1103.          signed     long  PCM  data  and so the value should
  1104.          relate to this fact.
  1105.  
  1106.          The -rms option will convert all output  average
  1107.          values to root mean square format.
  1108.  
  1109.          There is also an optional parameter -d that will
  1110.          print out a hex dump of the sound file from  the
  1111.          internal  buffer  that     is  in 32-bit signed PCM
  1112.          data.    This is mainly only of    use  in     tracking
  1113.          down  endian  problems     that  creep in to SoX on
  1114.          cross-platform versions.
  1115.  
  1116.  
  1117.        stretch factor [window fade shift fading]
  1118.          Time stretch file  by    a  given  factor.  Change
  1119.          duration without affecting the pitch.    factor of
  1120.          stretching: >1.0 lengthen,  <1.0  shorten  dura¡
  1121.          tion.     window     size  is in ms. Default is 20ms.
  1122.          The fade option, can be "lin".     shift ratio,  in
  1123.          [0.0  1.0].  Default  depends on stretch factor.
  1124.          1.0 to shorten, 0.8  to  lengthen.   The  fading
  1125.          ratio,     in  [0.0  0.5].  The  amount of a fade's
  1126.          default depends on factor and shift.
  1127.  
  1128.        swap [ 1 2 | 1 2 3 4 ]
  1129.          Swap  channels     in  multi-channel  sound  files.
  1130.          Optionally,  you  may    specify the channel order
  1131.          you would like the output in.    This defaults  to
  1132.          output channel 2 and then 1 for stereo and 2, 1,
  1133.          4, 3 for quad-channels.  An interesting  feature
  1134.          is  that  you    may  duplicate a given channel by
  1135.          overwriting another.  This is done by    repeating
  1136.          an  output  channel  on  the  command line.  For
  1137.          example, swap 2 2 will overwrite channel 1  with
  1138.          channel  2's  data;  creating a stereo file with
  1139.          both channels containing the same audio data.
  1140.  
  1141.        synth [ length ] type mix [ freq [ -freq2 ]
  1142.  
  1143.          [ off ] [ ph ] [ p1 ] [ p2 ] [ p3 ]
  1144.          The synth effect will generate various types  of
  1145.          audio    data.    Although  this    effect is used to
  1146.          generate audio data, an input file must be spec¡
  1147.          ified.      The  length  of  the    input  audio file
  1148.          determines the length of the output audio  file.
  1149.          <length>   length   in      sec  or  hh:mm:ss.frac,
  1150.          0=inputlength, default=0
  1151.          <type>     is  sine,  square,  triangle,    sawtooth,
  1152.          trapetz, exp, whitenoise, pinknoise, brownnoise,
  1153.          default=sine
  1154.          <mix> is create, mix, amod, default=create
  1155.          <freq> frequency at beginning in  Hz,    not  used
  1156.          for noise..
  1157.          <freq2>  frequency  at     end  in Hz, not used for
  1158.          noise..  <freq/2> can be given as %%n, where 'n'
  1159.          is  the  number  of  half  notes in respect to A
  1160.          (440Hz)
  1161.          <off> Bias (DC-offset)     of  signal  in     percent,
  1162.          default=0
  1163.          <ph> phase shift 0..100 shift phase 0..2*Pi, not
  1164.          used for noise..
  1165.          <p1> square: Ton/Toff, triangle+trapetz:  rising
  1166.          slope time (0..100)
  1167.          <p2> trapetz: ON time (0..100)
  1168.          <p3> trapetz: falling slope position (0..100)
  1169.  
  1170.        trim start [ length ]
  1171.          Trim  can  trim off unwanted audio data from the
  1172.          beginning and end of the audio file.  Audio sam¡
  1173.          ples are not sent to the output stream until the
  1174.          start location is reached.
  1175.          The optional length parameter tells  the  number
  1176.          of  samples to output after the start sample and
  1177.          is used to trim off the back side of  the  audio
  1178.          data.     Using a value of 0 for the start parame¡
  1179.          ter will allow trimming off the back side  only.
  1180.          Both  options    can  be specified using either an
  1181.          amount of time and an exact  count  of     samples.
  1182.          The  format  for  specifying  lengths in time is
  1183.          hh:mm:ss.frac.     A start value of 1:30.5 will not
  1184.          start    until  1  minute,  thirty and 1/2 seconds
  1185.          into the audio data.  The format for  specifying
  1186.          sample     counts is the number of samples with the
  1187.          letter 's' appended to it.   A     value    of  8000s
  1188.          will  wait  until  8000  samples are read before
  1189.          starting to process audio data.
  1190.  
  1191.        vibro speed  [ depth ]
  1192.          Add the world-famous  Fender  Vibro-Champ  sound
  1193.          effect to a sound sample by using a sine wave as
  1194.          the volume knob.  Speed gives the Hertz value of
  1195.          the  wave.   This must be under 30.  Depth gives
  1196.          the amount the volume is cut into  by    the  sine
  1197.          wave,    ranging 0.0 to 1.0 and defaulting to 0.5.
  1198.  
  1199.        vol gain [ type [ limitergain ] ]
  1200.          The vol effect is much     like  the  command  line
  1201.          option     -v.   It allows you to adjust the volume
  1202.          of an input file and allows you to  specify  the
  1203.          adjustment  in     relation to amplitude, power, or
  1204.          dB.  If type is not specified then  it     defaults
  1205.          to amplitude.
  1206.          When  type  is amplitude then a linear change of
  1207.          the amplitude is performed based  on  the  gain.
  1208.          Therefore,  a    value of 1.0 will keep the volume
  1209.          the same, 0.0 to < 1.0 will cause the volume  to
  1210.          decrease and values of > 1.0 will cause the vol¡
  1211.          ume to increase.  Beware of clipping audio  data
  1212.          when  the  gain is greater then 1.0.  A negative
  1213.          value performs the same  adjustment  while  also
  1214.          changing the phase.
  1215.          When  type  is     power    then  a value of 1.0 also
  1216.          means no change in volume.
  1217.          When type is dB the amplitude is  changed  loga¡
  1218.          rithmically.    0.0  is constant while +6 doubles
  1219.          the amplitude.
  1220.          An optional limitergain value can  be    specified
  1221.          and  should  be  a  value much less then 1.0 (ie
  1222.          0.05 or 0.02) and is used only on peaks to  pre¡
  1223.          vent  clipping.   Not    specifying this parameter
  1224.          will cause no limiter to be  used.   In  verbose
  1225.          mode, this effect will display the percentage of
  1226.          audio data that needed to be limited.
  1227.  
  1228. BUGS
  1229.        The syntax is horrific.    Thats the breaks when  trying  to
  1230.        handle all things from the command line.
  1231.  
  1232.        Please  report  any  bugs  found in this version of SoX to
  1233.        Chris Bagwell (cbagwell@sprynet.com)
  1234.  
  1235. FILES
  1236. SEE ALSO
  1237.        play(1), rec(1), soxexam(1)
  1238.  
  1239. NOTICES
  1240.        The version of SoX that accompanies this     manual     page  is
  1241.        support by Chris Bagwell (cbagwell@users.sourceforge.net).
  1242.        Please refer any questions regarding it to  this     address.
  1243.        You  may     obtain     the  latest  version at the the web site
  1244.        http://sox.sourceforge.net/
  1245.  
  1246. AUTHOR
  1247.        Chris Bagwell (cbagwell@users.sourceforge.net).
  1248.  
  1249.        Updates by Anonymous
  1250.  
  1251.  
  1252.  
  1253.             December 11, 2001           SoX(1)
  1254.