home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: Multimed / Multimed.zip / lame384.zip / sox.txt < prev    next >
Text File  |  1999-09-29  |  26KB  |  793 lines

  1.  
  2.  
  3.  
  4. SoX(1)                             SoX(1)
  5.  
  6.  
  7. NAME
  8.        sox - Sound eXchange : universal sound sample translator
  9.  
  10. SYNOPSIS
  11.        sox infile outfile
  12.        sox infile outfile [ effect [ effect options ... ] ]
  13.        sox infile -e effect [ effect options ... ]
  14.        sox  [ general options  ] [ format options  ] ifile [ for-
  15.        mat options  ] ofile [ effect [ effect options ... ] ]
  16.  
  17.        General options: [ -e ] [ -h ] [ -p ] [ -v volume ] [ -V ]
  18.  
  19.        Format    options:   [   -t  filetype  ]    [  -r  rate  ]    [
  20.        -s/-u/-U/-A/-a/-g ] [ -b/-w/-l/-f/-d/-D ] [ -c channels    ]
  21.        [ -x ]
  22.  
  23.        Effects:
  24.         avg [ -l | -r ]
  25.         band [ -n ] center [ width ]
  26.         check
  27.         chorus  gain-in  gain  out    delay  decay  speed depth
  28.          -s | -t [ delay decay speed depth -s | -fI-t ]
  29.         copy
  30.         cut
  31.         deemph
  32.         echo gain-in gain-out delay decay [ delay decay  ...]
  33.         echos gain-in gain-out delay decay [ delay decay ...]
  34.         flanger gain-in gain-out delay decay speed -s | -fI-t
  35.         highp center
  36.         lowp center
  37.         map
  38.         mask
  39.         phaser gain-in gain-out delay decay speed -s | -t
  40.         pick
  41.         polyphase [ -w < num / ham > ]
  42.               [     -width <  long     / short  / # > ]
  43.               [ -cutoff #  ]
  44.         rate
  45.         resample
  46.         reverb gain-out reverb-time delay [ delay ... ]
  47.         reverse
  48.         split
  49.         stat [ debug | -v ]
  50.         swap [ 1 2 3 4 ]
  51.         vibro speed [ depth ]
  52.  
  53. DESCRIPTION
  54.        Sox  translates    sound  files  from one format to another,
  55.        possibly doing a sound effect.
  56.  
  57. OPTIONS
  58.        The option syntax is a little grotty, but in essence:
  59.         sox file.au file.voc
  60.        translates a sound sample in SUN Sparc .AU format  into    a
  61.  
  62.  
  63.  
  64.               June 28, 1999                1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. SoX(1)                               SoX(1)
  71.  
  72.  
  73.        SoundBlaster .VOC file, while
  74.         sox -v 0.5 file.au -r 12000 file.voc rate
  75.        does  the  same    format    translation  but  also lowers the
  76.        amplitude by 1/2 and changes the sampling rate  from  8000
  77.        hertz to 12000 hertz via the rate sound effect loop.
  78.  
  79.        File type options:
  80.  
  81.        -t filetype
  82.          gives the type of the sound sample file.
  83.  
  84.        -r rate     Give sample rate in Hertz of file.
  85.  
  86.        -s/-u/-U/-A/-a/-g
  87.          The  sample  data  is signed linear (2's comple-
  88.          ment), unsigned linear, U-law (logarithmic),  A-
  89.          law  (logarithmic), ADPCM, or GSM.  U-law and A-
  90.          law are the U.S. and international standards for
  91.          logarithmic  telephone sound compression.  ADPCM
  92.          is form of sound compression  that  has  a  good
  93.          compromise  between  good sound quality and fast
  94.          encoding/decoding time.  GSM is a standard  used
  95.          for  telephone     sound    compression  in     European
  96.          countries and its gaining popularity because  of
  97.          its quality.
  98.  
  99.        -b/-w/-l/-f/-d/-D
  100.          The  sample  data  is    in  bytes,  16-bit words,
  101.          32-bit longwords, 32-bit floats,  64-bit  double
  102.          floats,  or 80-bit IEEE floats.  Floats and dou-
  103.          ble floats are in native machine format.
  104.  
  105.        -x     The sample data is in XINU format; that  is,  it
  106.          comes    from  a     machine  with    the opposite word
  107.          order than yours and must be  swapped    according
  108.          to  the  word-size given above.  Only 16-bit and
  109.          32-bit integer data may  be  swapped.     Machine-
  110.          format     floating-point     data  is  not    portable.
  111.          IEEE floats are a fixed, portable format. ???
  112.  
  113.        -c channels
  114.          The number of sound channels in the  data  file.
  115.          This  may  be    1,  2, or 4; for mono, stereo, or
  116.          quad sound data.
  117.  
  118.        General options:
  119.  
  120.        -e     after the input file allows you to avoid  giving
  121.          an output file and just name an effect.  This is
  122.          mainly useful with the stat effect  but  can  be
  123.          used with others.
  124.  
  125.        -h     Print version number and usage information.
  126.  
  127.  
  128.  
  129.  
  130.               June 28, 1999                2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. SoX(1)                               SoX(1)
  137.  
  138.  
  139.        -p     Run  in  preview  mode     and run fast.    This will
  140.          somewhat speed up sox when the output format has
  141.          a  different  number of channels and a different
  142.          rate then the input file.  The     order    that  the
  143.          effects  are run in will be arranged for maximum
  144.          speed and not quality.
  145.  
  146.        -v volume Change amplitude (floating point); less than 1.0
  147.          decreases, greater than 1.0 increases.     Note: we
  148.          perceive volume logarithmically,  not    linearly.
  149.          Note: see the stat effect.
  150.  
  151.        -V     Print    a description of processing phases.  Use-
  152.          ful for figuring out exactly how sox is mangling
  153.          your sound samples.
  154.  
  155.        The  input and output files may be standard input and out-
  156.        put.  This is specified by '-'.    The -t type  option  must
  157.        be  given  in this case, else sox will not know the format
  158.        of   the      given      file.       The     -t,   -r,   -s/-u/-U/-A,
  159.        -b/-w/-l/-f/-d/-D  and  -x options refer to the input data
  160.        when given before the input file name.  After, they  refer
  161.        to the output data.
  162.  
  163.        If  you don't give an output file name, sox will just read
  164.        the input file.    This is useful for validating  structured
  165.        file  formats; the stat effect may also be used via the -e
  166.        option.
  167.  
  168. FILE TYPES
  169.        Sox needs to know the formats  of  the  input  and  output
  170.        files.    File  formats  which have headers are checked, if
  171.        that header doesn't seem right, the program exits with  an
  172.        appropriate  message.   Currently,  raw (no header) binary
  173.        and textual data, Amiga 8SVX, Apple/SGI    AIFF,  SPARC  .AU
  174.        (w/header),  NeXT  .SND,     CD-R, CVSD, GSM 06.10, Mac HCOM,
  175.        Sound Tools MAUD, OSS device drivers, Turtle  Beach  .SMP,
  176.        Sound  Blaster,    Sndtool,  and  Sounder,     Sun Audio device
  177.        driver, Yamaha TX-16W Sampler, IRCAM  Sound  Files,   Cre-
  178.        ative  Labs  VOC,  Psion     .WVE, and Microsoft RIFF/WAV are
  179.        supported.
  180.  
  181.  
  182.        .8svx     Amiga 8SVX musical instrument    description  for-
  183.          mat.
  184.  
  185.        .aiff     AIFF  files  used  on    Apple  IIc/IIgs     and SGI.
  186.          Note: the AIFF format    supports  only    one  SSND
  187.          chunk.      It  does  not     support  multiple  sound
  188.          chunks, or the 8SVX musical instrument     descrip-
  189.          tion format.  AIFF files are multimedia archives
  190.          and and can  have  multiple  audio  and  picture
  191.          chunks.   You    may  need  a separate archiver to
  192.          work with them.
  193.  
  194.  
  195.  
  196.               June 28, 1999                3
  197.  
  198.  
  199.  
  200.  
  201.  
  202. SoX(1)                               SoX(1)
  203.  
  204.  
  205.        .au     SUN Microsystems AU files.  There are apparently
  206.          many  types  of  .au files; DEC has invented its
  207.          own with  a  different     magic    number    and  word
  208.          order.     The .au handler can read these files but
  209.          will not write them.  Some .au files have  valid
  210.          AU  headers  and  some     do  not.  The latter are
  211.          probably original SUN    u-law  8000  hz     samples.
  212.          These    can  be     dealt    with using the .ul format
  213.          (see below).
  214.  
  215.        .cdr     CD-R
  216.          CD-R files are used in mastering  music  Compact
  217.          Disks.     The file format is, as you might expect,
  218.          raw stereo raw unsigned samples at 44khz.   But,
  219.          there's some blocking/padding oddity in the for-
  220.          mat, so it needs its own handler.
  221.  
  222.        .cvs     Continuously Variable Slope Delta modulation
  223.          Used to compress speech audio    for  applications
  224.          such as voice mail.
  225.  
  226.        .dat     Text Data files
  227.          These    files contain a textual representation of
  228.          the sample data.   There  is  one  line  at  the
  229.          beginning that contains the sample rate.  Subse-
  230.          quent lines contain two numeric data items:  the
  231.          time  since  the beginning of the sample and the
  232.          sample value.    Values are normalized so that the
  233.          maximum  and  minimum    are 1.00 and -1.00.  This
  234.          file format can be used to create data files for
  235.          external programs such as FFT analyzers or graph
  236.          routines.  SoX can also convert a file     in  this
  237.          format     back into one of the other file formats.
  238.  
  239.        .gsm     GSM 06.10 Lossy Speech Compression
  240.          A standard for compressing speech which is  used
  241.          in  the Global Standard for Mobil telecommunica-
  242.          tions (GSM).  Its good for its purpose,  shrink-
  243.          ing  audio data size, but it will introduce lots
  244.          of noise when a given sound  sample  is  encoded
  245.          and decoded multiple times.  This format is used
  246.          by some voice mail applications.  It  is  rather
  247.          CPU  intensive.   GSM    in  sox     is  optional and
  248.          requires access to an external GSM library.   To
  249.          see  if  there is support for gsm run sox -h and
  250.          look for it under the    list  of  supported  file
  251.          formats.
  252.  
  253.        .hcom     Macintosh  HCOM  files.   These are (apparently)
  254.          Mac FSSD files with some variant of Huffman com-
  255.          pression.   The Macintosh has wacky file formats
  256.          and this format handler apparently doesn't  han-
  257.          dle all the ones it should.  Mac users will need
  258.          your usual arsenal of file  converters     to  deal
  259.  
  260.  
  261.  
  262.               June 28, 1999                4
  263.  
  264.  
  265.  
  266.  
  267.  
  268. SoX(1)                               SoX(1)
  269.  
  270.  
  271.          with an HCOM file under Unix or DOS.
  272.  
  273.        .maud     An Amiga format
  274.          An IFF-conform sound file type, registered by MS
  275.          MacroSystem Computer GmbH, published along  with
  276.          the  "Toccata"     sound-card on the Amiga.  Allows
  277.          8bit linear, 16bit linear, A-Law, u-law in  mono
  278.          and stereo.
  279.  
  280.        ossdsp     OSS /dev/dsp device driver
  281.          This is a psuedo-file type and can be optionally
  282.          compiled into Sox.  Run sox -h     to  see  if  you
  283.          have  support    for  this  file     type.    When this
  284.          driver is used it allows you to open up the  OSS
  285.          /dev/dsp  file     and configure it to use the same
  286.          data type as passed in to  Sox.   It  works  for
  287.          both  playing and recording sound samples.  When
  288.          playing sound files it attempts to  set  up  the
  289.          OSS  driver  to use the same format as the input
  290.          file.    It is suggested to  always  override  the
  291.          output values to use the highest quality samples
  292.          your sound card can handle.  Example: -t  ossdsp
  293.          -w -s /dev/dsp
  294.  
  295.        .sf     IRCAM Sound Files.
  296.          SoundFiles  are  used by academic music software
  297.          such as the  CSound  package,    and  the  MixView
  298.          sound sample editor.
  299.  
  300.        .smp     Turtle Beach SampleVision files.
  301.          SMP  files  are  for use with the PC-DOS package
  302.          SampleVision by  Turtle  Beach     Softworks.  This
  303.          package  is  for  communication  to several MIDI
  304.          samplers. All sample rates are supported by  the
  305.          package,  although  not all are supported by the
  306.          samplers themselves. Currently loop  points  are
  307.          ignored.
  308.  
  309.        sunau     Sun /dev/audio device driver
  310.          This is a psuedo-file type and can be optionally
  311.          compiled into Sox.  Run sox -h     to  see  if  you
  312.          have  support    for  this  file     type.    When this
  313.          driver is used it allows you to open  up  a  Sun
  314.          /dev/audio file and configure it to use the same
  315.          data type as passed in to  Sox.   It  works  for
  316.          both  playing and recording sound samples.  When
  317.          playing sound files it attempts to  set  up  the
  318.          audio driver to use the same format as the input
  319.          file.    It is suggested to  always  override  the
  320.          output values to use the highest quality samples
  321.          your hardware can handle.  Example: -t sunau  -w
  322.          -s /dev/audio or -t sunau -U -c 1 /dev/audio for
  323.          older sun equipment.
  324.  
  325.  
  326.  
  327.  
  328.               June 28, 1999                5
  329.  
  330.  
  331.  
  332.  
  333.  
  334. SoX(1)                               SoX(1)
  335.  
  336.  
  337.        .txw     Yamaha TX-16W sampler.
  338.          A file format from a  Yamaha  sampling     keyboard
  339.          which    wrote  IBM-PC format 3.5" floppies.  Han-
  340.          dles reading of files which do not have the sam-
  341.          ple  rate  field  set    to one of the expected by
  342.          looking at some other bytes in     the  attack/loop
  343.          length     fields,  and  defaulting to 33kHz if the
  344.          sample rate is still unknown.
  345.  
  346.        .vms     More info to come.
  347.          Used to compress speech audio    for  applications
  348.          such as voice mail.
  349.  
  350.        .voc     Sound Blaster VOC files.
  351.          VOC  files  are  multi-part  and contain silence
  352.          parts, looping, and different sample  rates  for
  353.          different  chunks.   On input, the silence parts
  354.          are filled out, loops are rejected,  and  sample
  355.          data    with  a     new  sample  rate  is    rejected.
  356.          Silence with a different sample rate  is  gener-
  357.          ated  appropriately.    On output, silence is not
  358.          detected, nor are impossible sample rates.
  359.  
  360.        .wav     Microsoft .WAV RIFF files.
  361.          These appear to be very similar  to  IFF  files,
  362.          but  not  the    same.    They are the native sound
  363.          file format of Windows.  (Obviously, Windows was
  364.          of  such  incredible  importance to the computer
  365.          industry that it just had to have its own  sound
  366.          file format.)    Normally .wav files have all for-
  367.          matting information in their headers, and so  do
  368.          not  need  any     format     options specified for an
  369.          input file. If any are, they will  override  the
  370.          file  header,    and  you  will    be warned to this
  371.          effect.  You had better know what you are doing!
  372.          Output     format     options will cause a format con-
  373.          version, and the  .wav     will  written    appropri-
  374.          ately.      Note    that it is possible to write data
  375.          of a type that cannot be specified by    the  .wav
  376.          header,  and you will be warned that you a writ-
  377.          ing a bad file !  Sox currently  can  read  PCM,
  378.          ULAW,    ALAW,  MS  ADPCM, and IMA (or DVI) ADPCM.
  379.          It can output all of these  formats  except  the
  380.          ADPCM styles.
  381.  
  382.        .wve     Psion 8-bit alaw
  383.          These    are  8-bit a-law 8khz sound files used on
  384.          the Psion palmtop portable computer.
  385.  
  386.        .raw     Raw files (no header).
  387.          The sample rate, size    (byte,    word,  etc),  and
  388.          style    (signed,  unsigned,  etc.)  of the sample
  389.          file must be  given.    The  number  of     channels
  390.          defaults to 1.
  391.  
  392.  
  393.  
  394.               June 28, 1999                6
  395.  
  396.  
  397.  
  398.  
  399.  
  400. SoX(1)                               SoX(1)
  401.  
  402.  
  403.        .ub, .sb, .uw, .sw, .ul
  404.          These    are  several  suffices    which  serve as a
  405.          shorthand for raw files with a     given    size  and
  406.          style.      Thus, ub, sb, uw, sw, and ul correspond
  407.          to "unsigned  byte",  "signed    byte",    "unsigned
  408.          word",     "signed  word",  and "ulaw" (byte).  The
  409.          sample rate defaults to 8000 hz if  not  explic-
  410.          itly set, and the number of channels (as always)
  411.          defaults to 1.     There are lots of Sparc  samples
  412.          floating  around  in u-law format with no header
  413.          and fixed at a sample rate of 8000 hz.     (Certain
  414.          sound management software cheerfully ignores the
  415.          headers.)  Similarly, most Mac sound  files  are
  416.          in  unsigned  byte  format with a sample rate of
  417.          11025 or 22050 hz.
  418.  
  419.        .auto     This is a ``meta-type'':  specifying  this  type
  420.          for  an input file triggers some code that tries
  421.          to guess the real  type  by  looking  for  magic
  422.          words    in  the     header.   If  the  type can't be
  423.          guessed, the program exits with  an  error  mes-
  424.          sage.     The  input  must  be a plain file, not a
  425.          pipe.    This type can't be used for output files.
  426.  
  427. EFFECTS
  428.        Only one effect from the palette may be applied to a sound
  429.        sample.    To do multiple effects you'll need to run sox  in
  430.        a pipeline.
  431.  
  432.        avg [ -l | -r ]
  433.          Reduce     the  number of channels by averaging the
  434.          samples, or duplicate channels to  increase  the
  435.          number     of channels.  Valid combinations are 1 -
  436.          2, 1 - 4, 2 - 4, 4 - 2, 4 - 1, 2 - 1. The -l  or
  437.          -r  option  is     not  really averaging but either
  438.          duplicates or leaves  just  the  left    or  right
  439.          channel,  depending  on  if  your  increasing or
  440.          decreasing the number of output channels.
  441.  
  442.        band [ -n ] center [ width ]
  443.          Apply    a  band-pass   filter.      The    frequency
  444.          response drops logarithmically around the center
  445.          frequency.  The width gives  the  slope  of  the
  446.          drop.     The  frequencies  at  center + width and
  447.          center - width will be half  of  their     original
  448.          amplitudes.  Band defaults to a mode oriented to
  449.          pitched signals, i.e. voice, singing, or instru-
  450.          mental     music.      The  -n (for noise) option uses
  451.          the alternate mode for un-pitched signals.  Band
  452.          introduces  noise  in    the  shape of the filter,
  453.          i.e. peaking at the center  frequency    and  set-
  454.          tling around it.
  455.  
  456.  
  457.  
  458.  
  459.  
  460.               June 28, 1999                7
  461.  
  462.  
  463.  
  464.  
  465.  
  466. SoX(1)                               SoX(1)
  467.  
  468.  
  469.        chorus gain-in gain-out delay decay speed deptch
  470.  
  471.           -s | -t [ delay decay speed depth -s | -t ... ]
  472.          Add  a chorus to a sound sample.  Each quadtuple
  473.          delay/decay/speed/depth gives the delay in  mil-
  474.          liseconds  and     the  decay (relative to gain-in)
  475.          with a modulation speed in  Hz     using    depth  in
  476.          milliseconds.    The modulation is either sinodial
  477.          (-s) or triangular (-t).  Gain-out is the volume
  478.          of the output.
  479.  
  480.        copy     Copy the input file to the output file.  This is
  481.          the default effect if both files have    the  same
  482.          sampling rate.
  483.  
  484.        cut loopnumber
  485.          Extract loop #N from a sample.
  486.  
  487.        deemph     Apply    a  treble  attenuation shelving filter to
  488.          samples  in  audio  cd     format.   The    frequency
  489.          response  of pre-emphasized recordings is recti-
  490.          fied.    The filtering is defined in the     standard
  491.          document ISO 908.
  492.  
  493.        echo gain-in gain-out delay decay [ delay decay ... ]
  494.          Add echoing to a sound sample.     Each delay/decay
  495.          part gives the delay  in  milliseconds     and  the
  496.          decay (relative to gain-in) of that echo.  Gain-
  497.          out is the volume of the output.
  498.  
  499.        echos gain-in gain-out delay decay [ delay decay ... ]
  500.          Add a sequence of echos to a sound sample.  Each
  501.          delay/decay part gives the delay in milliseconds
  502.          and the decay    (relative  to  gain-in)     of  that
  503.          echo.    Gain-out is the volume of the output.
  504.  
  505.        flanger gain-in gain-out delay decay speed -s | -t
  506.          Add  a     flanger  to a sound sample.  Each triple
  507.          delay/decay/speed gives the delay  in    millisec-
  508.          onds  and the decay (relative to gain-in) with a
  509.          modulation  speed  in    Hz.   The  modulation  is
  510.          either     sinodial (-s) or triangular (-t).  Gain-
  511.          out is the volume of the output.
  512.  
  513.        highp center
  514.          Apply    a  high-pass   filter.      The    frequency
  515.          response  drops logarithmically with center fre-
  516.          quency in the middle of the drop.  The slope  of
  517.          the filter is quite gentle.
  518.  
  519.        lowp center
  520.          Apply a low-pass filter.  The frequency response
  521.          drops logarithmically with center  frequency  in
  522.          the middle of the drop.  The slope of the filter
  523.  
  524.  
  525.  
  526.               June 28, 1999                8
  527.  
  528.  
  529.  
  530.  
  531.  
  532. SoX(1)                               SoX(1)
  533.  
  534.  
  535.          is quite gentle.
  536.  
  537.        map     Display a list of loops in a sample, and miscel-
  538.          laneous loop info.
  539.  
  540.        mask     Add  "masking    noise"    to  signal.   This effect
  541.          deliberately adds white  noise     to  a    sound  in
  542.          order    to  mask quantization effects, created by
  543.          the process of playing a  sound  digitally.   It
  544.          tends    to  mask buzzing voices, for example.  It
  545.          adds 1/2 bit of noise to the sound file  at  the
  546.          output bit depth.
  547.  
  548.        phaser gain-in gain-out delay decay speed -s | -t
  549.          Add  a     phaser     to  a sound sample.  Each triple
  550.          delay/decay/speed gives the delay  in    millisec-
  551.          onds  and the decay (relative to gain-in) with a
  552.          modulation  speed  in    Hz.   The  modulation  is
  553.          either     sinodial  (-s)     or triangular (-t).  The
  554.          decay should be less than 0.5 to avoid feedback.
  555.          Gain-out is the volume of the output.
  556.  
  557.        pick     Select     the  left  or    right channel of a stereo
  558.          sample, or one of four     channels  in  a  quadro-
  559.          phonic sample.
  560.  
  561.        polyphase [ -w < num / ham > ]
  562.  
  563.          [  -width <  long  / short  / # > ]
  564.  
  565.          [ -cutoff #  ]
  566.          Translate input sampling rate to output sampling
  567.          rate via polyphase interpolation,  a  DSP  algo-
  568.          rithm.      This    method    is  slow and uses lots of
  569.          RAM, but gives much better results then rate.
  570.          -w < nut / ham > : select either a  Nuttal  (~90
  571.          dB  stopband)    or Hamming (~43 dB stopband) win-
  572.          dow.  Warning: Nuttall windows require 2x length
  573.          than Hamming windows.    Default is nut.
  574.          -width     long  / short / # : specify the width of
  575.          the filter.  long is 1024 samples; short is  128
  576.          samples.   Alternatively, an exact number can be
  577.          used.    Default is long.
  578.          -cutoff # : specify the filter cutoff    frequency
  579.          in  terms  of    fraction of bandwidth.    If upsam-
  580.          pling, then this is the fraction of the  orignal
  581.          signal that should go through.     If downsampling,
  582.          this is the fraction of the  signal  left  after
  583.          downsampling.     Default  is 0.95.  Remember that
  584.          this is a float.
  585.  
  586.  
  587.        rate     Translate input sampling rate to output sampling
  588.          rate  via  linear  interpolation  to  the  Least
  589.  
  590.  
  591.  
  592.               June 28, 1999                9
  593.  
  594.  
  595.  
  596.  
  597.  
  598. SoX(1)                               SoX(1)
  599.  
  600.  
  601.          Common Multiple of the two sampling rates.  This
  602.          is the default effect if the two files have dif-
  603.          ferent sampling rates and  the     preview  options
  604.          was  specified.   This     is  fast  but noisy: the
  605.          spectrum of the original sound will  be  shifted
  606.          upwards and duplicated faintly when up-translat-
  607.          ing by a multiple.  Lerp-ing is  acceptable  for
  608.          cheap    8-bit  sound hardware, but for CD-quality
  609.          sound you should instead use either resample  or
  610.          polyphase.   If you are wondering which of Sox's
  611.          rate changing effects to ues, you will     want  to
  612.          read  a  detailed  analysis  of  all  of them at
  613.          http://eakaw2.et.tu-dresden.de/~andreas/resam-
  614.          ple/resample.html
  615.  
  616.        resample [ rolloff [ beta ] ]
  617.          Translate input sampling rate to output sampling
  618.          rate  via  simulated  analog  filtration.   This
  619.          method     is slower than rate, but gives much bet-
  620.          ter results.  rolloff refers to the cut-off fre-
  621.          quency     of  the  low pass filter and is given in
  622.          terms of the Nyquist  frequency  for  the  lower
  623.          sample     rate.     rolloff therefor should be some-
  624.          thing between 0. and 1., in  practice    0.8-0.95.
  625.          beta  trades stop band rejection against transi-
  626.          tion width from passband to stop  band.   Larger
  627.          beta means a slower transition and greater stop-
  628.          band rejection.  beta should be at least greater
  629.          than  2.   The default is rollof 0.8, beta 17.5,
  630.          which is rather  conservative    with  respect  to
  631.          aliasing.   Lower beta and higher rolloff values
  632.          preserve more high frequency signal energy,  but
  633.          introduce  measurable    artifacts.   This  is the
  634.          default effect if the two files  have    different
  635.          sampling rates.
  636.  
  637.        reverb gain-out delay [ delay ... ]
  638.          Add  reverbation  to a sound sample.  Each delay
  639.          is given in milliseconds  and    its  feedback  is
  640.          depending  on    the  reverb-time in milliseconds.
  641.          Each delay should be in the  range  of     half  to
  642.          quarter of reverb-time to get a realistic rever-
  643.          bation.  Gain-out is the volume of the output.
  644.  
  645.        reverse     Reverse the sound sample  completely.     Included
  646.          for finding Satanic subliminals.
  647.  
  648.        split     Turn a mono sample into a stereo sample by copy-
  649.          ing the input channel    to  the     left  and  right
  650.          channels.
  651.  
  652.        stat [ debug | -v ]
  653.          Do  a    statistical  check on the input file, and
  654.          print results on the standard error file.   stat
  655.  
  656.  
  657.  
  658.               June 28, 1999                   10
  659.  
  660.  
  661.  
  662.  
  663.  
  664. SoX(1)                               SoX(1)
  665.  
  666.  
  667.          may  copy  the file untouched from input to out-
  668.          put, if you select an output file.  The  "Volume
  669.          Adjustment:"  field  in the statistics gives you
  670.          the argument to the -v number    which  will  make
  671.          the sample as loud as possible without clipping.
  672.          There is an  optional    parameter  -v  that  will
  673.          print out the "Volume Adjustment:" field's value
  674.          and return.  This could be of use in scripts  to
  675.          auto  convert    the  volume.  There is an also an
  676.          optional parameter debug  that     will  place  sox
  677.          into  debug mode and print out a hex dump of the
  678.          sound file from the internal buffer that  is  in
  679.          32-bit     signed PCM data.  This is mainly only of
  680.          use in tracking down endian problems that  creep
  681.          in to sox on cross-platform versions.
  682.  
  683.        swap [ 1 2 3 4 ]
  684.          Swap  channels in multi-channel sound files.  In
  685.          files with more than 2 channels you may  specify
  686.          the order that the channels should be rearranged
  687.          in.
  688.  
  689.        vibro speed  [ depth ]
  690.          Add the world-famous  Fender  Vibro-Champ  sound
  691.          effect to a sound sample by using a sine wave as
  692.          the volume knob.  Speed gives the Hertz value of
  693.          the  wave.   This must be under 30.  Depth gives
  694.          the amount the volume is cut into  by    the  sine
  695.          wave,    ranging 0.0 to 1.0 and defaulting to 0.5.
  696.  
  697.        Sox enforces certain effects.  If the two files have  dif-
  698.        ferent sampling rates, the requested effect must be one of
  699.        copy, or rate, If the two files have different numbers  of
  700.        channels, the avg effect must be requested.
  701.  
  702. BUGS
  703.        The  syntax  is horrific.  It's very tempting to include a
  704.        default system that allows an effect name as  the  program
  705.        name  and just pipes a sound sample from standard input to
  706.        standard output, but the problem of inputting  the  sample
  707.        rates makes this unworkable.
  708.  
  709.        Please  report  any  bugs  found in this version of sox to
  710.        Chris Bagwell (cbagwell@sprynet.com)
  711.  
  712. FILES
  713. SEE ALSO
  714.        play(1), rec(1)
  715.  
  716. NOTICES
  717.        The  echoplex  effect  is:  Copyright  (C)  1989     by   Jef
  718.        Poskanzer.
  719.  
  720.        Permission  to  use,  copy,  modify,  and  distribute this
  721.  
  722.  
  723.  
  724.               June 28, 1999                   11
  725.  
  726.  
  727.  
  728.  
  729.  
  730. SoX(1)                               SoX(1)
  731.  
  732.  
  733.        software and its documentation for any purpose and without
  734.        fee  is    hereby granted, provided that the above copyright
  735.        notice appear in all copies and that both  that    copyright
  736.        notice  and  this  permission  notice appear in supporting
  737.        documentation.  This software is provided "as is"  without
  738.        express or implied warranty.
  739.  
  740.        The  version  of     Sox that accompanies this manual page is
  741.        support by Chris Bagwell     (cbagwell@sprynet.com).   Please
  742.        refer any questions regarding it to this address.  You may
  743.        obtain  the  latest  version   at   the     the   web   site
  744.        http://home.sprynet.com/~cbagwell/sox.html
  745.  
  746.  
  747.  
  748.  
  749.  
  750.  
  751.  
  752.  
  753.  
  754.  
  755.  
  756.  
  757.  
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767.  
  768.  
  769.  
  770.  
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.  
  790.               June 28, 1999                   12
  791.  
  792.  
  793.