home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / opus / v5 / player3_0opus5 / c / sox.doc < prev    next >
Text File  |  1977-12-31  |  19KB  |  463 lines

  1.  
  2.  
  3.  
  4. SOX(1)                   USER COMMANDS                     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
  16.      _o_p_t_i_o_n_s  ] _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  ]
  19.      [ -b/-w/-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.           highp _c_e_n_t_e_r
  29.           band [ -_n ] _c_e_n_t_e_r [ _w_i_d_t_h ]
  30.  
  31. DESCRIPTION
  32.      _S_o_x translates sound files from one format to another,  pos-
  33.      sibly doing a sound effect.
  34.  
  35. OPTIONS
  36.      The option syntax is a little grotty, but in essence:
  37.           sox file.au file.voc
  38.      translates a sound sample in SUN Sparc  .AU  format  into  a
  39.      SoundBlaster .VOC file, while
  40.           sox -v 0.5 file.au -rate 12000 file.voc rate
  41.      does the same format translation but also lowers the  ampli-
  42.      tude by 1/2 and changes the sampling rate from 8000 hertz to
  43.      12000 hertz via the rate _s_o_u_n_d _e_f_f_e_c_t loop.
  44.  
  45.      File type options:
  46.  
  47.      -t _f_i_l_e_t_y_p_e
  48.                gives the type of the sound sample file.
  49.  
  50.      -r _r_a_t_e   Give sample rate in Hertz of file.
  51.  
  52.      -s/-u/-U/-A
  53.                The sample data is signed linear (2's complement),
  54.                unsigned  linear,  U-law  (logarithmic),  or A-law
  55.                (logarithmic).  U-law and A-law are the  U.S.  and
  56.                international  standards for logarithmic telephone
  57.                sound compression.
  58.  
  59.      -b/-w/-l/-f/-d/-D
  60.  
  61.  
  62.  
  63. Sun Release 4.1           Last change:                          1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. SOX(1)                   USER COMMANDS                     SOX(1)
  71.  
  72.  
  73.  
  74.                The sample data is in bytes, 16-bit words,  32-bit
  75.                longwords, 32-bit floats, 64-bit double floats, or
  76.                80-bit IEEE floats.  Floats and double floats  are
  77.                in native machine format.
  78.  
  79.      -x        The sample data is in XINU  format;  that  is,  it
  80.                comes  from a machine with the opposite word order
  81.                than yours and must be swapped  according  to  the
  82.                word-size  given  above.   Only  16-bit and 32-bit
  83.                integer  data  may  be  swapped.    Machine-format
  84.                floating-point  data is not portable.  IEEE floats
  85.                are a fixed, portable format. ???
  86.  
  87.      -c _c_h_a_n_n_e_l_s
  88.                The number of sound channels  in  the  data  file.
  89.                This  may be 1, 2, or 4; for mono, stereo, or quad
  90.                sound data.
  91.  
  92.      General options:
  93.  
  94.      -e        after the input file allows you to avoid giving an
  95.                output file and just name an effect.  This is only
  96.                useful with the stat effect.
  97.  
  98.      -v _v_o_l_u_m_e Change amplitude (floating point); less  than  1.0
  99.                decreases,  greater  than 1.0 increases.  Note: we
  100.                perceive  volume  logarithmically,  not  linearly.
  101.                Note: see the stat effect.
  102.  
  103.      -V        Print a description of processing phases.   Useful
  104.                for  figuring out exactly how _s_o_x is mangling your
  105.                sound samples.
  106.  
  107.      The input and output files may be standard input and output.
  108.      This  is specified by '-'.  The -t _t_y_p_e option must be given
  109.      in this case, else _s_o_x will not know the format of the given
  110.      file.   The  -t,  -r,  -s/-u/-U/-A, -b/-w/-l/-f/-d/-D and -x
  111.      options refer to the input data when given before the  input
  112.      file name.  After, they refer to the output data.
  113.  
  114.      If you don't give an output file name, _s_o_x  will  just  read
  115.      the  input  file.   This is useful for validating structured
  116.      file formats; the stat effect may also be used  via  the  -e
  117.      option.
  118.  
  119. FILE TYPES
  120.      _S_o_x needs to know the formats of the input and output files.
  121.      File  formats which have headers are checked, if that header
  122.      doesn't seem right, the program exits  with  an  appropriate
  123.      message.   Currently,  raw  (no  header)  binary and textual
  124.      data,  IRCAM  Sound  Files,   Sound   Blaster,   SPARC   .AU
  125.      (w/header),  Mac  HCOM,  PC/DOS  .SOU, Sndtool, and Sounder,
  126.  
  127.  
  128.  
  129. Sun Release 4.1           Last change:                          2
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. SOX(1)                   USER COMMANDS                     SOX(1)
  137.  
  138.  
  139.  
  140.      NeXT .SND, Windows 3.1 RIFF/WAV, Turtle  Beach  .SMP,  CD-R,
  141.      and Apple/SGI AIFF and 8SVX formats are supported.
  142.  
  143.      .aiff     AIFF files used on Apple IIc/IIgs and SGI.   Note:
  144.                the  AIFF format supports only one SSND chunk.  It
  145.                does not support multiple  sound  chunks,  or  the
  146.                8SVX  musical instrument description format.  AIFF
  147.                files are multimedia archives  and  and  can  have
  148.                multiple audio and picture chunks.  You may need a
  149.                separate archiver to work with them.
  150.  
  151.      .au       SUN Microsystems AU files.  There  are  apparently
  152.                many  types of .au files; DEC has invented its own
  153.                with a different magic number and word order.  The
  154.                .au  handler  can  read  these  files but will not
  155.                write them.  Some .au files have valid AU  headers
  156.                and some do not.  The latter are probably original
  157.                SUN u-law 8000 hz samples.   These  can  be  dealt
  158.                with using the .ul format (see below).
  159.  
  160.      .hcom     Macintosh HCOM files.  These are (apparently)  Mac
  161.                FSSD  files  with some variant of Huffman compres-
  162.                sion.  The Macintosh has wacky  file  formats  and
  163.                this  format handler apparently doesn't handle all
  164.                the ones it should.   Mac  users  will  need  your
  165.                usual  arsenal  of file converters to deal with an
  166.                HCOM file under Unix or DOS.
  167.  
  168.      .raw      Raw files (no header).
  169.                The sample rate, size (byte, word, etc), and style
  170.                (signed,  unsigned,  etc.) of the sample file must
  171.                be given.  The number of channels defaults to 1.
  172.  
  173.      .ub, .sb, .uw, .sw, .ul
  174.                These are several suffices which serve as a short-
  175.                hand  for  raw  files with a given size and style.
  176.                Thus,  ub,  sb,  uw,  sw,  and  ul  correspond  to
  177.                "unsigned  byte",  "signed byte", "unsigned word",
  178.                "signed word", and "ulaw" (byte).  The sample rate
  179.                defaults to 8000 hz if not explicitly set, and the
  180.                number of channels  (as  always)  defaults  to  1.
  181.                There are lots of Sparc samples floating around in
  182.                u-law format with no header and fixed at a  sample
  183.                rate   of  8000  hz.   (Certain  sound  management
  184.                software cheerfully ignores  the  headers.)  Simi-
  185.                larly,  most  Mac sound files are in unsigned byte
  186.                format with a sample rate of 11025 or 22050 hz.
  187.  
  188.      .sf       IRCAM Sound Files.
  189.                SoundFiles are used  by  academic  music  software
  190.                such  as the CSound package, and the MixView sound
  191.                sample editor.
  192.  
  193.  
  194.  
  195. Sun Release 4.1           Last change:                          3
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. SOX(1)                   USER COMMANDS                     SOX(1)
  203.  
  204.  
  205.  
  206.      .voc      Sound Blaster VOC files.
  207.                VOC  files  are  multi-part  and  contain  silence
  208.                parts,  looping,  and  different  sample rates for
  209.                different chunks.  On input, the silence parts are
  210.                filled  out,  loops  are rejected, and sample data
  211.                with a new sample rate is rejected.  Silence  with
  212.                a  different  sample  rate  is generated appropri-
  213.                ately.  On output, silence is  not  detected,  nor
  214.                are impossible sample rates.
  215.  
  216.      .auto     This is a ``meta-type'': specifying this type  for
  217.                an  input  file  triggers  some code that tries to
  218.                guess the real type by looking for magic words  in
  219.                the  header.   If  the  type can't be guessed, the
  220.                program exits with an error  message.   The  input
  221.                must be a plain file, not a pipe.  This type can't
  222.                be used for output files.
  223.  
  224.      .cdr      CD-R
  225.                CD-R files are used  in  mastering  music  Compact
  226.                Disks.   The  file format is, as you might expect,
  227.                raw stereo raw unsigned samples  at  44khz.   But,
  228.                there's  some  blocking/padding oddity in the for-
  229.                mat, so it needs its own handler.
  230.  
  231.      .dat      Text Data files
  232.                These files contain a  textual  representation  of
  233.                the  sample data.  There is one line at the begin-
  234.                ning that contains the  sample  rate.   Subsequent
  235.                lines  contain  two  numeric  data items: the time
  236.                since the beginning of the sample and  the  sample
  237.                value.   Values are normalized so that the maximum
  238.                and minimum are 1.00 and -1.00.  This file  format
  239.                can be used to create data files for external pro-
  240.                grams such as FFT  analyzers  or  graph  routines.
  241.                SOX  can  also  convert a file in this format back
  242.                into one of the other file formats.
  243.  
  244.      .smp      Turtle Beach SampleVision files.
  245.                SMP files are for use with the PC-DOS package Sam-
  246.                pleVision  by Turtle Beach Softworks. This package
  247.                is for communication to several MIDI samplers. All
  248.                sample   rates   are  supported  by  the  package,
  249.                although not all are  supported  by  the  samplers
  250.                themselves. Currently loop points are ignored.
  251.  
  252.      .wav      Windows 3.1 .WAV RIFF files.
  253.                These appear to be very similar to IFF files,  but
  254.                not  the same. They are the native sound file for-
  255.                mat of Windows 3.1.  Obviously, Windows 3.1 is  of
  256.                such  incredible importance to the computer indus-
  257.                try that it just had to have its  own  sound  file
  258.  
  259.  
  260.  
  261. Sun Release 4.1           Last change:                          4
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. SOX(1)                   USER COMMANDS                     SOX(1)
  269.  
  270.  
  271.  
  272.                format.
  273.  
  274. EFFECTS
  275.      Only one effect from the palette may be applied to  a  sound
  276.      sample.   To do multiple effects you'll need to run _s_o_x in a
  277.      pipeline.
  278.  
  279.      copy                          Copy the  input  file  to  the
  280.                                    output   file.   This  is  the
  281.                                    default effect if  both  files
  282.                                    have  the  same sampling rate,
  283.                                    or the rates are "close".
  284.  
  285.      rate                          Translate input sampling  rate
  286.                                    to  output  sampling  rate via
  287.                                    linear  interpolation  to  the
  288.                                    Least  Common  Multiple of the
  289.                                    two sampling rates.   This  is
  290.                                    the  default effect if the two
  291.                                    files have different  sampling
  292.                                    rates.    This   is  fast  but
  293.                                    noisy:  the  spectrum  of  the
  294.                                    original sound will be shifted
  295.                                    upwards and duplicated faintly
  296.                                    when  up-translating by a mul-
  297.                                    tiple.
  298.  
  299.      avg                           Mix 4- or 2-channel sound file
  300.                                    into  2-  or 1-channel file by
  301.                                    averaging the samples for dif-
  302.                                    ferent speakers.
  303.  
  304.      stat                          Do a statistical check on  the
  305.                                    input  file, and print results
  306.                                    on the  standard  error  file.
  307.                                    stat   may   copy   the   file
  308.                                    untouched from input  to  out-
  309.                                    put,  if  you select an output
  310.                                    file. The "Volume Adjustment:"
  311.                                    field  in the statistics gives
  312.                                    you the  argument  to  the  -v
  313.                                    _n_u_m_b_e_r  which  will  make  the
  314.                                    sample as loud as possible.
  315.  
  316.      echo [ _d_e_l_a_y _v_o_l_u_m_e ...  ]    Add echoing to a sound sample.
  317.                                    Each  delay/volume  pair gives
  318.                                    the delay in seconds  and  the
  319.                                    volume  (relative  to  1.0) of
  320.                                    that echo.  If the volumes add
  321.                                    up to more than 1.0, the sound
  322.                                    will melt down instead of fad-
  323.                                    ing away.
  324.  
  325.  
  326.  
  327. Sun Release 4.1           Last change:                          5
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. SOX(1)                   USER COMMANDS                     SOX(1)
  335.  
  336.  
  337.  
  338.      vibro _s_p_e_e_d  [ _d_e_p_t_h ]        Add  the  world-famous  Fender
  339.                                    Vibro-Champ  sound effect to a
  340.                                    sound sample by using  a  sine
  341.                                    wave   as   the  volume  knob.
  342.                                    Speed gives the Hertz value of
  343.                                    the  wave.  This must be under
  344.                                    30.  Depth  gives  the  amount
  345.                                    the  volume is cut into by the
  346.                                    sine wave, ranging 0.0 to  1.0
  347.                                    and defaulting to 0.5.
  348.  
  349.      lowp _c_e_n_t_e_r                   Apply a low-pass filter.   The
  350.                                    frequency response drops loga-
  351.                                    rithmically with  _c_e_n_t_e_r  fre-
  352.                                    quency  in  the  middle of the
  353.                                    drop.  The slope of the filter
  354.                                    is quite gentle.
  355.  
  356.      highp _c_e_n_t_e_r                  Apply a high-pass filter.  The
  357.                                    frequency response drops loga-
  358.                                    rithmically with  _c_e_n_t_e_r  fre-
  359.                                    quency  in  the  middle of the
  360.                                    drop.  The slope of the filter
  361.                                    is quite gentle.
  362.  
  363.      band [ -_n ] _c_e_n_t_e_r [ _w_i_d_t_h ]  Apply a band-pass filter.  The
  364.                                    frequency response drops loga-
  365.                                    rithmically around the  _c_e_n_t_e_r
  366.                                    frequency.   The  _w_i_d_t_h  gives
  367.                                    the slope of  the  drop.   The
  368.                                    frequencies  at _c_e_n_t_e_r + _w_i_d_t_h
  369.                                    and _c_e_n_t_e_r  -  _w_i_d_t_h  will  be
  370.                                    half  of their original ampli-
  371.                                    tudes.   Band  defaults  to  a
  372.                                    mode  oriented to pitched sig-
  373.                                    nals, i.e. voice, singing,  or
  374.                                    instrumental  music.   The  -_n
  375.                                    (for noise)  option  uses  the
  376.                                    alternate  mode for un-pitched
  377.                                    signals.    Band    introduces
  378.                                    noise  in  the  shape  of  the
  379.                                    filter, i.e.  peaking  at  the
  380.                                    _c_e_n_t_e_r  frequency and settling
  381.                                    around it.  _S_o_x enforces  cer-
  382.                                    tain   effects.   If  the  two
  383.                                    files have different  sampling
  384.                                    rates,  the  requested  effect
  385.                                    must be one of copy, or  rate,
  386.                                    If  the  two  files  have dif-
  387.                                    ferent  numbers  of  channels,
  388.                                    the   avg   effect   must   be
  389.                                    requested.
  390.  
  391.  
  392.  
  393. Sun Release 4.1           Last change:                          6
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400. SOX(1)                   USER COMMANDS                     SOX(1)
  401.  
  402.  
  403.  
  404.      reverse                       Reverse the sound sample  com-
  405.                                    pletely.  Included for finding
  406.                                    Satanic subliminals.
  407.  
  408. BUGS
  409.      The syntax is horrific.  It's very  tempting  to  include  a
  410.      default  system  that  allows  an effect name as the program
  411.      name and just pipes a sound sample from  standard  input  to
  412.      standard  output,  but  the  problem of inputting the sample
  413.      rates makes this unworkable.
  414.  
  415. FILES
  416. SEE ALSO
  417. NOTICES
  418.      The echoplex effect is:
  419.          Copyright (C) 1989 by Jef Poskanzer.
  420.          Permission to use, copy,  modify,  and  distribute  this
  421.      software and its
  422.          documentation for any purpose and without fee is  hereby
  423.      granted, provided
  424.          that the above copyright notice appear in all copies and
  425.      that both that
  426.          copyright notice and this permission  notice  appear  in
  427.      supporting
  428.          documentation.   This  software  is  provided  "as   is"
  429.      without express or
  430.          implied warranty.
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459. Sun Release 4.1           Last change:                          7
  460.  
  461.  
  462.  
  463.