   Linux Sound Playing HOWTO
  Yoo C. Chung, wacko@laplace.snu.ac.kr
  v1.5b, 2  1998

        Linux    for-
  mats .

  ______________________________________________________________________

  Table of Contents


  1. 

     1.1    
     1.2 Copyright   
     1.3      
     1.4 Feedback
     1.5 

  2.   Format 

     2.1 MIDI
        2.1.1   adagio
        2.1.2 TiMidity
        2.1.3 playmidi
     2.2 Modules
        2.2.1 tracker
        2.2.2 gmod
        2.2.3 MikMod
        2.2.4 xmp
        2.2.5 s3mod
        2.2.6 mod
        2.2.7 nspmod
        2.2.8 yampmod
     2.3 MPEG audio streams
        2.3.1 mpg123
        2.3.2 maplay 1.2
        2.3.3 maplay 1.3b
        2.3.4 maplay3
        2.3.5 splay
        2.3.6 Sajber Jukebox
        2.3.7 amp
        2.3.8 XAudio
        2.3.9 Layer 3 Shareware Encoder/Decoder
     2.4 WAV
        2.4.1 wavplay
     2.5  
        2.5.1 sox
        2.5.2 bplay
        2.5.3 SIDPLAY
        2.5.4 RealAudio Player
        2.5.5 cat

  3.    

     3.1 volume
     3.2 Sound Studio
     3.3 Tickle Music

  4. 



  ______________________________________________________________________

  [1m1.  [0m

      Sound Playing HOWTO.    
  format          
    .         
       .   
       ,  
      .   ,    [4m[0m
          Linux system 
   .    Linux Sound HOWTO   Jeff
  Tranter         Linux  
   hardware .

          .
  ,          
        ,     
    ,     hardware  
   Sound HOWTO.


  [1m1.1.     [0m

           ( 
       ),     
   copyright .   ,       
    ,      
        .    
     .



  [1m1.2.  Copyright   [0m

       ,    
     GNU General Public License.



  [1m1.3.       [0m

            
    Linux Documentation Project <http://sunsite.unc.edu/LDP/>.  
           
     <http://laplace.snu.ac.kr/~wacko/howto/>.

        ( ) 
     <http://laplace.snu.ac.kr/~wacko/howto/Sound-Playing-
  HOWTO.ks>.

           
  <http://jf.gee.kyoto-u.ac.jp/JF/JF-ftp/euc/Sound-Playing-HOWTO.euc>.



  [1m1.4.  Feedback[0m


   , , ,    
     HOWTO,  email    :
  voulariba@rocketmail.com     :
  epapakostas@ametro.gr   : ep@rocketmail.com


    ,       
   (      ),   
   . ,     ,
       . ' ,   
  ,    , .   
     , .



  [1m1.5.  [0m

          HOWTO.  , 
  Hannu Savolainen        Linus Torvalds
        .

       Raymond Nijssen
  (raymond@es.ele.tue.nl), Jeroen Rutten (jeroen@es.ele.tue.nl), Antonio
  Perez (aperez@arrakis.es), Ian Jackson (ijackson@gnu.org),  
  Peter Amstutz (amstpi@freenet.tlh.fl.us)     
    .



  [1m2.    Format [0m

     formats  (WAV, MIDI, MPEG etc.).  ,
     formats      
      .



  [1m2.1.  MIDI[0m

  MIDI      Musical Instrument Device Interface.
    MIDI     .mid.   
   (sequencing information), ,     
  ,  ,   , .     hardware 
  (        ),    
   ,   .



  [1m2.1.1.    adagio[0m

       mp ( command-line player 
  MIDI)  xmp ( player MIDI    Xview,  
       module player    xmp).  
     SlingShot extensions     xmp.
           Adagio scores.


     GUS, o mp     MOD ( 
  ``Modules''     modules).

     bug (   0.5   hardware)
         .  ,    
       MIDI,   
        .   
        mp,    
       `' .   
   .

      copyright (      
  ),        
  .  (       
  ,           
  ,           
   .)

      CMU MIDI Toolkit  Linux (  
           ) 
   Greg Lee (lee@uhunix.uhcc.hawaii.edu).

      anonymous FTP    tsx-11.mit.edu at
  /pub/linux/packages/sound/adagio05.tar.gz.     
      a.out format (linked   ),
    xmp  -       X11R6
  (XFree86 3.1.1, libc 4.7.2).    mp    
   a.out.

     hacking    . , 
     hacking.         
    -lfl switch    SHROBJ  XMPOBJ 
  Makefile.       link    flex, 
    linked  default.     
  .         XView  
  SlingShot extensions      xmp.



  [1m2.1.2.  TiMidity[0m

      [4mexperimental[24m    
    (  ,       mp
    Sound Blaster 16,        
          GUS).  , 
     CPU.   MIDI    MIDI 
  WAV     WAV (     
  MIDI   WAV    ,  ).    
          CPU.

      interface  ncurses, SLang, Tcl/Tk 
  Motif.

    patch  Gravis Ultrasound   
  .   FAQ     TiMidity
    .

       Tuukka Toivonen (tt@cgs.fi).

      TiMidity     TiMidity home
  page <http://www.cgs.fi/~tt/timidity/>.      
   link      GUS patches.



  [1m2.1.3.  playmidi[0m

       MIDI player   FM, GUS, 
  external MIDI.       
     MIDI players.     
   Creative Music,  Microsoft RIFF,   MIDI 
      Ultima 7.

   X interface  SVGA interface.      
           
          (
     xplaymidi  splaymidi).

       





  $ splaymidi foo.mid; stty sane





       SVGA interface,    
     tty mode .  SVGA interface  
     .

     Nathan Laredo (laredo@gnu.org 
  laredo@ix.netcom.com).

       anonymous FTP   sunsite.unc.edu 
  /pub/Linux/apps/sound/players/playmidi-2.3.tar.gz.



  [1m2.2.  Modules[0m

   Modules (    )   
  ,        
  sequencing,    player      ()
    track    pitch,    , 
   vibrato  .

          MIDI    
       ( 
   ).         
   ,      module.  
         
     MIDI.       
   format (  `'   ProTracker,   
   modules     ).     Amiga.

     format   extension .mod.    
  extensions       format  .



  [1m2.2.1.  tracker[0m


       (   
  )   modules  Soundtracker  Protracker.
    16 bit stereo,       
  .             CPU
     -mono .

       (giftware) (   ).
     Marc Espie (Marc.Espie@ens.fr).

           
  Makefile    Linux   anonymous FTP  
  sunsite.unc.edu 
  /pub/Linux/apps/sound/players/tracker-4.3-linux.tar.gz.



  [1m2.2.2.  gmod[0m

     music module player    Gravis Ultrasound.
  4/6/8  MOD, 8  669, MultiTracker (MTM), UltraTracker
  (ULT), FastTracker (XM),  ScreamTracker III (S3M)  
   formats.

     driver  3.0  .    GUS.
            
          .

   X interface.    QT toolkit (  
  0.99  ).    QT toolkit homepage
  <http://www.troll.no/>       QT.

     .      Hannu
  Savolainen,      Andrew J. Robinson
  (robinson@cnj.digex.net).

       anonymous FTP   sunsite.unc.edu 
  /pub/Linux/apps/sound/players/gmod-3.1.tar.gz.



  [1m2.2.3.  MikMod[0m

     module player  XM, ULT, STM, S3M, MTM, MOD
   UNI formats.  ( UNI format    format 
     MikMod.)    module.
   16 bit stereo   .    
  -m (  mono)         
   CPU.

     Unix     interface  ncurses
   Tcl/Tk.       ,   
   .

      Jean-Paul Mikkers (mikmak@via.nl).  
     Stine (dracoirs@epix.net).   shareware
        (registered)    
   .       
    (-   
   ).

      MikMod home page
  <http://www.aics.net/~amstutz/mikmod.html>.



  [1m2.2.4.  xmp[0m

    module player (     Adagio xmp) 
     MOD, S3M, MTM, PTR, STM, 669,  XM modules
  (    formats,     
  ).         (GUS 
  SoundBlaster 32AWE),      
            CPU.

      X frontend  xmp .

     Claudio Matsuoka (claudio@lobo.inf.ufpr.br)  
  H. Carraro Jr.

       xmp home page
  <http://www.merdre.net/~claudio/xmp/>.



  [1m2.2.5.  s3mod[0m

   4/6/8 track MOD modules  Scream Tracker 3 modules.
       8 bit   
   22000 Hz  default.       -s
      stereo,  -b    16 bit,  
  -f      .   ,  
       tracker (  ),  
      tracker   s3mod    
   MOD (       ).  
      CPU     tracker.

       Daniel Marks  David Jeske
  (jeske@uiuc.edu), but        
  (        ).

      anonymous FTP    sunsite.unc.edu 
  /pub/Linux/apps/sound/players/s3mod-v1.09.tar.gz.



  [1m2.2.6.  mod[0m

    [4mbeta[24m   MODs (15/31-instrument,  32 ),
  MTMs, ULTs  S3Ms   Gravis Ultrasound.   
    packed modules    gzip, lharc, unzip, 
  unarj .       Powerpacked modules 
  modules    composers  Amiga(  "PACK"
  ).

      3.0   .  [4m[24m  
     2.90-2      .   text
  interface  ncurses.     X interface, 
   Tcl/Tk.

     Mikael Nordqvist (mech@df.lth.se  d91mn@efd.lth.se).

      anonymous FTP    sunsite.unc.edu 
  /pub/Linux/apps/sound/players/mod-v0.81.tgz.



  [1m2.2.7.  nspmod[0m

    [4malpha[24m module player     MTM, S3M,  MOD
  modules.      module player   
   DSP (       Creative Labs  DSP).
        CPU   tracker.


        modules  
  (loop)  .        
     -l.       8 bit( 
   0.1).

     Toru Egashira (toru@jms.jeton.or.jp).

      anonymous FTP   sunsite.unc.edu 
  /pub/Linux/apps/sound/players/nspmod-0.1.tar.gz.



  [1m2.2.8.  yampmod[0m

   [4malpha[24m      4 modules
    CPU resources.  [4m[24m   
    .  ,       
     22 kHz.  ,      
    ,      alpha  
  .

     David Groves (djg@djghome.demon.co.uk).

      anonymous FTP   sunsite.unc.edu 
  /pub/Linux/apps/sound/players/yampmod-0.1.tar.gz.



  [1m2.3.  MPEG audio streams[0m

   MPEG         video
        .  MPEG 
     video,         
   .        
  ,  I, II,  III.   players   
        
  .  (.. players   III    
    II).     MPG  I   
   .mpg (          
     MPEG video player,    stream
  ),   II     .mp2,  
   III   .mp3.        .
     MPEG II  2    25 megabytes 
   PCM   .



  [1m2.3.1.  mpg123[0m

    [4mbeta[24m     MPEG audio stream player, 
     layers I, II,  III.     
   .     streams    
    HTTP (..       MPEG stream
      World Wide Web).

        Michael Hipp
  (Michael.Hipp@student.uni-tuebingen.de).     
     ,     .
          ( CD-ROM images
   FTP servers)  .

          Oliver Fromme's mpg123
  page <http://www.heim3.tu-clausthal.de/~olli/mpg123/>.



  [1m2.3.2.  maplay 1.2[0m

   MPEG stream player      layer I 
  layer II streams,     layer III streams.
     bit  Linux.

     ,    55%  
   CPU   60MHz Pentium.        66MHz
  486   CPU       .    
   ,         stream 
  (   -l or -r option),       
  .

            ,   
   compile.  ,      
        configuration.sh.





  #! /bin/sh





      Tobias Bading (bading@cs.tu-berlin.de).  
  maplay 1.2     anonymous FTP    ftp.cs.tu-
  berlin.de  /pub/multimedia/maplay1.2/maplay1_2.tar.



  [1m2.3.3.  maplay 1.3b[0m

       (.    
  )  maplay 1.2,        
    CPU.        u-law 
         SPARC.   
   u-law output  default,      
   .

       Orlando Andico
  (orly@gibson.eee.upd.edu.ph).      anonymous FTP
     sunsite.unc.edu  /pub/Linux/apps/sound/players/maplay-1.3b-
  Linux.tar.gz.



  [1m2.3.4.  maplay3[0m

        maplay 1.2.   
  MPEG Layer 3 streams .        bugs
   playback (     ).  
              .

       by Timo Jantunen (timo.jantunen@hut.fi
   jeti@cc.hut.fi).       , 
     .  ,    
        ,   
   maplay     GNU General Public License,  
         
   .

      anonymous FTP    sunsite.unc.edu 
  /pub/Linux/apps/sound/players/maplay3.tar.gz.



  [1m2.3.5.  splay[0m

    [4mbeta[24m player      maplay 1.2
  (,    maplay 1.2+,    
    maplay 1.2      MS Windows).
     MPEG Layer 3 streams .   
      WAV.    streams  
     HTTP .

      splay     
    (   LGPL),     
     .      
   threading ( pthread    
    )   inline assembly.

   splay   command line interface    X
  interface (  QT).

     compile   (..  segmentation fault),
         threading.

    Jung Woo-jae (jwj95@eve.kaist.ac.kr).

      splay's home page
  <http://adam.kaist.ac.kr/~jwj95/>.



  [1m2.3.6.  Sajber Jukebox[0m

       MPEG player     user
  interface.    splay,     
  MPEG ,    III.       MPEG
  streams    ,   stream   
  HTTP.       ..

    QT toolkit (   1.2 ).
      LinuxThreads ( 
       0.5).

      Joel Lindholm (wizball@kewl.campus.luth.se).

         anonymous FTP  
  kewl.campus.luth.se  /pub/jukebox.



  [1m2.3.7.  amp[0m

     [4mbeta[24m MPEG player      MPEG Layer 3
  streams .         , 
        PCM  WAV.    
    CPU ( 60%   133MHz Pentium).

     Tomislav Uzelac (tuzelac@rasip.fer.hr).   
     ,    ,
    (    CD-ROMs   
    ,  ).

      anonymous FTP   ftp.rasip.fer.hr 
  /pub/mpeg/amp-0.7.3.tgz.



  [1m2.3.8.  XAudio[0m

     [4malpha[24m       
      MPEG ,  
      front-ends.   MPEG 
   layers I, II,  III.       
  bitstreams.   interface - .  
    Motif (Lesstif) front-end   
    Linux.

     Gilles Boccon-Gibod, Alain Jobart  .   front-
  ends      .    
      (licensed)   
  (       ).

   front-ends        XAudio
  home page <http://www.mpeg.org/xaudio/>.



  [1m2.3.9.  Layer 3 Shareware Encoder/Decoder[0m

        MPEG Layer 3 streams 
   WAV, AIFF, SND, AIFC,    PCM .    
  The Linux       .   
       format.

   ,        ,
    sox,       
     (words    PCM   
  (  Intel ).       sox 
   -x      .    
  players          
   ,          .
       / (  100Mhz Pentium),

        MPEG Layer 3 streams 
          format,  
    (      
  sox       44.1 kHz).



       $ l3dec foo.mp3 -sto | play -t raw -x -u -w -c 2 -r 44100 -





      -r      stream ,
       -c       
   (   ).     
  ,      script- (shell
  script)    (alias).


        shareware  
  Fraunhofer-IIS.      Linux   x86
      anonymous FTP   ftp.fhg.de 
  /pub/layer3.     (demo version)  
  streams  layer III.



  [1m2.4.  WAV[0m

       (man page)  sox:


              IFF,   
       .     format    Windows
       3.1.  ,  Windows 3.1    
           /       
       format  .


      .wav.

      ``sox''    ``bplay''   players WAV
       .






  [1m2.4.1.  wavplay[0m

          WAV format.
    (locking)       
    .        
          .

    interface -,    Motif interface, 
       Lesstif.

      Andre Fuechsel (af1@irz.inf.tu-dresden.de),
             
  Warren W. Gay (bx249@freenet.toronto.on.ca  wwg@ica.net).

      anonymous FTP    sunsite.unc.edu 
  /pub/Linux/apps/sound/players/wavplay-1.0.tar.gz.



  [1m2.5.   [0m

          formats   
    (.. formats     player),
   players       format.



  [1m2.5.1.  sox[0m

       ,   
  format     .   ,   
  sox,     play,     (  play
   Sound HOWTO probably   ).    (raw -
  no header)     ,  
  IRCAM, Sound Blaster .voc, SPARC .au ( header), Mac HCOM, PC/DOS
  .sou, Sndtool,  Sounder, NeXT .snd, Windows 3.1 RIFF/WAV, Turtle
  Beach .smp, CD-R,  Apple/SGI AIFF  8SVX formats


      1.3.6x,      
             
  .  ,       179  sbdsp.c
  from



       if (abuf_size < 4096 || abuf_size > 65536) {





  



       if (abuf_size < 1 || abuf_size > 65536) {





         .    ,  
   .


    ,    ,  
  ,       .

      anonymous FTP   sunsite.unc.edu 
  /pub/Linux/apps/sound/convert/Lsox-linux.tar.gz.

        Chris Bagwell (cbagwell@sprynet.com)
  (    gamma    sox (
     ) fix)     
  anonymous FTP   sunsite.unc.edu 
  /pub/Linux/apps/sound/convert/sox-11gamma-cb3.tar.gz.



  [1m2.5.2.  bplay[0m

    [4mbeta[24m      , WAV, 
  VOC files.         .
          
   ,         .
           
   setuid root.        ,
         Debian  Ian Jackson
  (ijackson@gnu.org,      , 
    setuid bit.

      David Monro (davidm@gh.cs.usyd.edu.au).

      anonymous FTP   sunsite.unc.edu 
  /pub/Linux/apps/sound/players/bplay-0.96.tar.gz.



  [1m2.5.3.  SIDPLAY[0m

       Sound Interface Device chip (MOS
  6581,   SID)   Micro Processor Unit (MOS 6510)
   Commodore 64.  '       
      C64     .  ,
  fragments         
          C64.
     interface -.
    Tk  QT interfaces     
  .

     Michael Schwendt (sidplay@geocities.com).

       SIDPLAY's home page
  <http://www.geocities.com/SiliconValley/Lakes/5147/>.



  [1m2.5.4.  RealAudio Player[0m

       ,     
  (proprietary) format,      Internet  
       .   
    ,       
  web browser (  Mosaic  Netscape).    
     (        
   ).

    Progressive Networks, Inc.     ,
   .        
      .       
    RealAudio home        page <http://www.realaudio.com/>.
  [1m2.5.5.  cat[0m

   ,      
   cat,       .     
      



       $ cat sample.voc > /dev/dsp
       $ cat sample.wav > /dev/dsp
       $ cat sample.au > /dev/audio





   cat    .au  /dev/audio   , 
              
  byte (   ) .,  cat    
    PCM ( .wav  .voc)  /dev/dsp  
    .

          cat.    
   , ,         
     ,     PCM ,
     ,    ,     
   (  ).



  [1m3.     [0m

             .
  ,          
  .


  [1m3.1.  volume[0m

    interface       ( 
  ';).      interface  Tcl/Tk interface 
    ,      
  .au.     Tcl/Tk CD  .

   Freeware     Sam Lantinga
  (slouken@cs.ucdavis.edu).

       anonymous FTP  sunsite.unc.edu 
  /pub/Linux/apps/sound/soundcard/volume-2.1.tar.gz.



  [1m3.2.  Sound Studio[0m

      Tcl/Tk   ,  
      sox.    sox 
        .

     Paul Sharpe   N. J. Bailey
  (N.J.Bailey@leeds.ac.uk).      
  ,      -.


      Sound Studio's home page <http://www.elec-
  eng.leeds.ac.uk/staff/een6njb/Software/Studio/screens.html>.

  [1m3.3.  Tickle Music[0m

    [4mbeta[24m Tcl/Tk    browser   
      format ,     
        .     gmod
       MOD    mp   MIDI
  (        ).

        Shannon Hendrix
  (shendrix@pcs.cnu.edu  shendrix@escape.widomaker.com).

      anonymous FTP   sunsite.unc.edu 
  /pub/Linux/apps/sound/players/tmusic-1.0.tar.gz.



  [1m4.  [0m


  1.        
        .

  2.  Linux Sound HOWTO.      Linux Documentation
     Project <http://sunsite.unc.edu/LDP/>.

  3. Linux MIDI and Sound Pages <http://www.digiserve.com/ar/linux-snd/>

  4. MPEG Audio Layer 3 FAQ
     <http://www.iis.fhg.de/departs/amm/layer3/sw/>

  5. Programmer's Guide to OSS <http://www.4front-tech.com/pguide/>

  6. SoX home page <http://www.spies.com/Sox/>

































