home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / APPS / sox.man.Z / sox.man
Text File  |  2009-11-06  |  14KB  |  330 lines

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