696 lines
29 KiB
HTML
696 lines
29 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
|
|
<TITLE>The Linux Sound Playing HOWTO: Playing Various Sound Formats</TITLE>
|
|
<LINK HREF="Sound-Playing-HOWTO-3.html" REL=next>
|
|
<LINK HREF="Sound-Playing-HOWTO-1.html" REL=previous>
|
|
<LINK HREF="Sound-Playing-HOWTO.html#toc2" REL=contents>
|
|
</HEAD>
|
|
<BODY>
|
|
<A HREF="Sound-Playing-HOWTO-3.html">Next</A>
|
|
<A HREF="Sound-Playing-HOWTO-1.html">Previous</A>
|
|
<A HREF="Sound-Playing-HOWTO.html#toc2">Contents</A>
|
|
<HR>
|
|
<H2><A NAME="s2">2. Playing Various Sound Formats</A></H2>
|
|
|
|
<P>There are many kinds of sound formats (WAV, MIDI, MPEG etc.).
|
|
Below, we list the various formats and the applications that
|
|
can be used to play them.
|
|
<P>
|
|
<P>
|
|
<H2><A NAME="ss2.1">2.1 MIDI</A>
|
|
</H2>
|
|
|
|
<P>MIDI stands for Musical Instrument Device Interface. MIDI
|
|
files usually have the extension <CODE>.mid</CODE>. They contain
|
|
sequencing information, that is, information on when to play
|
|
what instrument in what way, etc. Depending on your
|
|
hardware (and maybe the software you use to play them), the
|
|
sound might be awesome, or it might be downright crappy.
|
|
<P>
|
|
<P>
|
|
<H3>adagio</H3>
|
|
|
|
<P>This package includes <CODE>mp</CODE> (a command-line MIDI file
|
|
player) and <CODE>xmp</CODE> (an XView based MIDI file player, not
|
|
to be confused with the module player also called
|
|
<CODE>xmp</CODE>). You will need the SlingShot extensions to use
|
|
<CODE>xmp</CODE>. It also contains other programs for playing
|
|
Adagio scores.
|
|
<P>
|
|
<P>If you have a GUS, <CODE>mp</CODE> can also play MOD files (see
|
|
section
|
|
<A HREF="#sec-modules">Modules</A> for more
|
|
information on modules).
|
|
<P>One little annoying bug (as of version 0.5 on some
|
|
hardware) is that the sound breaks at the end. Namely,
|
|
instead of ending the sound the way the MIDI file
|
|
specifies, it ends by playing the note right before the
|
|
last one in a long interval. It hasn't stopped me from
|
|
using <CODE>mp</CODE>, but it might prevent someone from using it
|
|
for `real' work. It also starts up relatively slowly.
|
|
<P>The package does not mention any copyright (at least none
|
|
that I can find), so I assume it can be freely
|
|
redistributed and modified. (By a strict interpretation
|
|
of copyright law, nothing gives one the right to do these
|
|
things, but I somehow doubt that this was the intention of
|
|
the author.)
|
|
<P>It is a port of the CMU MIDI Toolkit to Linux (though
|
|
there was enough added to make this questionable) by Greg
|
|
Lee (<CODE>lee@uhunix.uhcc.hawaii.edu</CODE>).
|
|
<P>It can be obtained from
|
|
<A HREF="ftp://tsx-11.mit.edu/pub/linux/packages/sound/adagio05.tar.gz">ftp://tsx-11.mit.edu/pub/linux/packages/sound/adagio05.tar.gz</A>.
|
|
The binaries included here are in a.out format (linked
|
|
with ancient libraries), and the <CODE>xmp</CODE> binary segfaults
|
|
in a X11R6 environment (XFree86 3.1.1, libc 4.7.2). The
|
|
<CODE>mp</CODE> binary works fine in an <CODE>a.out</CODE> environment.
|
|
<P>You will need a bit of hackery to compile it. Actually,
|
|
it's not much of a hackery. All you have to do is to
|
|
include the <CODE>-lfl</CODE> switch at the end of <CODE>SHROBJ</CODE> and
|
|
<CODE>XMPOBJ</CODE> in the Makefile. This is to link in the
|
|
<CODE>flex</CODE> library, which is not linked in by default.
|
|
Then follow the installation instructions. And don't
|
|
forget to have XView and the SlingShot extensions
|
|
installed if you want to compile <CODE>xmp</CODE>.
|
|
<P>
|
|
<P>
|
|
<H3>TiMidity</H3>
|
|
|
|
<P>Some people recommend this <EM>experimental</EM> program
|
|
because of good sound quality (which is very true, it's
|
|
much better than <CODE>mp</CODE> on a Sound Blaster 16, though it
|
|
probably won't be much different on soundcards with
|
|
wavetable synthesis like the GUS). However, it suffers
|
|
from high CPU loads. It plays MIDI by first converting
|
|
MIDI to WAV and then plays the WAV (you can also convert a
|
|
MIDI file to a WAV file without playing if you want).
|
|
This is the reason for its CPU intensive nature.
|
|
<P>It also has an optional ncurses, SLang, Tcl/Tk or Motif
|
|
interface.
|
|
<P>You need Gravis Ultrasound patch files to use this. Look
|
|
into the FAQ included with TiMidity for more information.
|
|
<P>The author is Tuukka Toivonen (<CODE>tt@cgs.fi</CODE>).
|
|
<P>The latest version of TiMidity can be found at the
|
|
<A HREF="http://www.cgs.fi/~tt/timidity/">TiMidity home page</A>. This page
|
|
also contains a link to a small library of GUS patches.
|
|
<P>
|
|
<P>
|
|
<H3>playmidi</H3>
|
|
|
|
<P>This is a MIDI player that plays to FM, GUS, and external
|
|
MIDI. It is supposed to have a faster startup time
|
|
compared to other MIDI players. It is also able to play
|
|
Creative Music Files, Microsoft RIFF files, and large MIDI
|
|
archives from games such as Ultima 7.
|
|
<P>It has an X interface and a SVGA interface. It also has
|
|
an option for real time playback with tracking all the
|
|
notes on each channel and the current playback clock
|
|
(included automatically with <CODE>xplaymidi</CODE> and
|
|
<CODE>splaymidi</CODE>).
|
|
<P>You should do something like
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<PRE>
|
|
$ splaymidi foo.mid; stty sane
|
|
|
|
</PRE>
|
|
</CODE></BLOCKQUOTE>
|
|
<P>if you are going to use the SVGA interface, since it
|
|
doesn't reset the terminal tty mode properly. The SVGA
|
|
interface may be removed in the near future.
|
|
<P>It was written by Nathan Laredo
|
|
(<CODE>laredo@gnu.org</CODE> or <CODE>laredo@ix.netcom.com</CODE>).
|
|
<P>It can be obtained from
|
|
<A HREF="ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/playmidi-2.3.tar.gz">ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/playmidi-2.3.tar.gz</A>.
|
|
<P>
|
|
<P>
|
|
<H2><A NAME="sec-modules"></A> <A NAME="ss2.2">2.2 Modules</A>
|
|
</H2>
|
|
|
|
<P>Modules (in computer music) are digital music files, made up
|
|
of a set of samples and sequencing information, telling the
|
|
player when to play which sample (instrument) on which track
|
|
at what pitch, optionally performing an effect, like vibrato
|
|
for example.
|
|
<P>An advantage it has over MIDI is that it can include almost
|
|
any kind of sound (including human voices). Another is that
|
|
it sounds just about the same on any platform, because the
|
|
samples are in the module. A disadvantage it has is that it
|
|
has a much larger file size compared to MIDI. Another one
|
|
is that it has no real standard format (the only `real' one
|
|
is the ProTracker, which many modules aren't quite
|
|
compatible with). It originated on the Amiga.
|
|
<P>The most common format has the extension <CODE>.mod</CODE>. There
|
|
are many other extensions depending on what format they are
|
|
in.
|
|
<P>
|
|
<P>
|
|
<H3>tracker</H3>
|
|
|
|
<P>This very portable program (it has been ported to many
|
|
platforms) plays Soundtracker and Protracker music
|
|
modules. It uses 16 bit stereo output, and I consider the
|
|
quality to be very good. If you need a simple way to
|
|
reduce CPU load use the <CODE>-mono</CODE> option.
|
|
<P>This is a giftware program (quoting the author). It is by
|
|
Marc Espie (<CODE>Marc.Espie@ens.fr</CODE>).
|
|
<P>A version of this with the Makefile already tweaked for
|
|
Linux can be obtained from
|
|
<A HREF="ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/tracker-4.3-linux.tar.gz">ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/tracker-4.3-linux.tar.gz</A>.
|
|
<P>
|
|
<P>
|
|
<H3>gmod</H3>
|
|
|
|
<P>This is a music module player for the Gravis Ultrasound
|
|
card. 4/6/8 channel MOD, 8 channel 669, MultiTracker
|
|
(MTM), UltraTracker (ULT), FastTracker (XM), and
|
|
ScreamTracker III (S3M) are the supported formats.
|
|
<P>It requires a version 3.0 or later sound driver. And a
|
|
GUS, of course. You may need to modify the kernel to make
|
|
volume control work the way you want.
|
|
<P>This has an X interface. It uses the QT toolkit (needs
|
|
version 0.99 or greater). Check the
|
|
<A HREF="http://www.troll.no/">QT toolkit homepage</A> for information on
|
|
QT.
|
|
<P>This can be freely distributed. It was originally written
|
|
by Hannu Savolainen, and now maintained by Andrew
|
|
J. Robinson (<CODE>robinson@cnj.digex.net</CODE>).
|
|
<P>It can be obtained from
|
|
<A HREF="ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/gmod-3.1.tar.gz">ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/gmod-3.1.tar.gz</A>.
|
|
<P>
|
|
<P>
|
|
<H3>MikMod</H3>
|
|
|
|
<P>This portable module player plays XM, ULT, STM, S3M, MTM,
|
|
MOD and UNI formats. (The UNI format is an internal
|
|
format used by MikMod.) It has support for zipped module
|
|
files. It uses 16 bit stereo for the sound output. Use
|
|
the <CODE>-m</CODE> option (for mono output) if you need a simple
|
|
way to lower the CPU load.
|
|
<P>The Unix version can either use ncurses or Tcl/Tk for its
|
|
interface. It can also be used as a library, not just an
|
|
independent program.
|
|
<P>It was originally written by Jean-Paul Mikkers
|
|
(<CODE>mikmak@via.nl</CODE>). It is now maintained by Jake Stine
|
|
(<CODE>dracoirs@epix.net</CODE>). This is shareware that has to
|
|
be registered if you want to use it commercially. You
|
|
also need permission to redistribute it commercially
|
|
(non-commercial redistribution does not need such
|
|
permission).
|
|
<P>This can be found at the
|
|
<A HREF="http://www.freenet.tlh.fl.us/~amstpi/mikmod.html">MikMod home page</A>.
|
|
<P>
|
|
<P>
|
|
<H3>xmp</H3>
|
|
|
|
<P>This is a module player (not to be confused with Adagio's
|
|
<CODE>xmp</CODE>) which can play MOD, S3M, MTM, PTM, PTR, STM,
|
|
669, and XM modules (other formats are also supported, but
|
|
still experimental or incomplete). If you have soundcards
|
|
with wavetable synthesis (GUS or SoundBlaster 32AWE), then
|
|
you can use this feature of the soundcard to lower the
|
|
load on the CPU. It also supports compressed modules.
|
|
<P>An X frontend to <CODE>xmp</CODE> is also available.
|
|
<P>This was written by Claudio Matsuoka
|
|
(<CODE>claudio@pos.inf.ufpr.br</CODE>) and Hipolito Carraro Jr.
|
|
<P>This can found at the
|
|
<A HREF="http://xmp.home.ml.org/">xmp home page</A>.
|
|
<P>
|
|
<P>
|
|
<H3>s3mod</H3>
|
|
|
|
<P>This plays 4/6/8 track MOD modules and Scream Tracker 3
|
|
modules. It uses 8 bit mono output with a sampling rate
|
|
of 22000 Hz by default. You can use the option <CODE>-s</CODE> to
|
|
enable stereo, <CODE>-b</CODE> to enable 16 bit output, and
|
|
<CODE>-f</CODE> to set the sampling frequency. However, the sound
|
|
output is worse than tracker (some noise), so I recommend
|
|
using <CODE>tracker</CODE> instead of <CODE>s3mod</CODE> for playing
|
|
ordinary MOD files (unless you have an underpowered
|
|
machine). It has a much smaller CPU load compared to
|
|
tracker.
|
|
<P>It is copyrighted by Daniel Marks and David Jeske
|
|
(<CODE>jeske@uiuc.edu</CODE>), but you can do anything you want
|
|
with it (except that you can't claim you wrote it).
|
|
<P>It can be obtained from
|
|
<A HREF="ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/s3mod-v1.09.tar.gz">ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/s3mod-v1.09.tar.gz</A>.
|
|
<P>
|
|
<P>
|
|
<H3>mod</H3>
|
|
|
|
<P>This <EM>beta</EM> program plays MODs (15/31-instrument, up to
|
|
32 voices), MTMs, ULTs and S3Ms on the Gravis Ultrasound
|
|
card. It can also use packed modules if you have
|
|
<CODE>gzip</CODE>, <CODE>lharc</CODE>, <CODE>unzip</CODE>, and <CODE>unarj</CODE>
|
|
installed. It cannot play Powerpacked modules or modules
|
|
packed with some Amiga composers ("PACK" signature).
|
|
<P>This requires at least version 3.0 of the sound driver.
|
|
It <EM>won't</EM> work with the 2.90-2 or earlier version of
|
|
the sound driver. The text interface requires ncurses.
|
|
There is also an X interface included, which uses Tcl/Tk.
|
|
<P>It was written by Mikael Nordqvist (<CODE>mech@df.lth.se</CODE> or
|
|
<CODE>d91mn@efd.lth.se</CODE>).
|
|
<P>It can be obtained from
|
|
<A HREF="ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/mod-v0.81.tgz">ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/mod-v0.81.tgz</A>.
|
|
<P>
|
|
<P>
|
|
<H3>nspmod</H3>
|
|
|
|
<P>This is an <EM>alpha</EM> module player which can play MTM,
|
|
S3M, and MOD modules. It is intended to be a module
|
|
player for soundcards without a DSP (not to be confused
|
|
with what Creative Labs calls a DSP). It has a CPU load
|
|
somewhat similar compared to <CODE>tracker</CODE>.
|
|
<P>
|
|
<P>It has a feature which lets modules loop if they want to.
|
|
The number of loops can be limited by the <CODE>-l</CODE> option.
|
|
It uses only 8 bit sound output (as of version 0.1).
|
|
<P>This was written by Toru Egashira
|
|
(<CODE>toru@jms.jeton.or.jp</CODE>).
|
|
<P>It can be obtained from
|
|
<A HREF="ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/nspmod-0.1.tar.gz">ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/nspmod-0.1.tar.gz</A>.
|
|
<P>
|
|
<P>
|
|
<H3>yampmod</H3>
|
|
|
|
<P>This <EM>alpha</EM> program was designed to play 4-channel
|
|
modules using the minimum of CPU resources. It was
|
|
<EM>not</EM> designed to produce high quality sound. So the
|
|
only sound output it produces is 22 kHz mono output.
|
|
Also, the output isn't as clean as it should be,
|
|
reflecting its alpha status.
|
|
<P>It was written by David Groves
|
|
(<CODE>djg@djghome.demon.co.uk</CODE>).
|
|
<P>It can be obtained from
|
|
<A HREF="ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/yampmod-0.1.tar.gz">ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/yampmod-0.1.tar.gz</A>.
|
|
<P>
|
|
<P>
|
|
<H2><A NAME="ss2.3">2.3 MPEG audio streams</A>
|
|
</H2>
|
|
|
|
<P>MPEG is a standard specifying the coding of video and the
|
|
associated audio for digital storage. MPEG is usually
|
|
associated with video, but the audio part of the standard
|
|
can be used separately. The audio part of the MPEG standard
|
|
defines three layers, layer I, II, and III. Players that
|
|
can decode higher layers can also decode lower layers
|
|
(e.g. layer III players can play layer II files). Layer I
|
|
MPEG audio files usually have the extension <CODE>.mpg</CODE> (so if
|
|
there is a file with this extension that can't be played by
|
|
a MPEG video player, it's probably an audio stream), layer
|
|
II usually have the extension <CODE>.mp2</CODE>, and layer III
|
|
usually have the extension <CODE>.mp3</CODE>. The audio compression
|
|
is pretty good. A two megabyte layer II MPEG audio file
|
|
will probably take up 25 megabytes for a raw PCM sample file
|
|
with the same quality.
|
|
<P>
|
|
<P>
|
|
<H3>mpg123</H3>
|
|
|
|
<P>This <EM>beta</EM> program is an efficient MPEG audio stream
|
|
player, which has support for layers I, II, and III. It
|
|
is based on code from many sources. It is able to play in
|
|
real time streams that are read by HTTP (i.e. one can play
|
|
an MPEG audio stream directly over the World Wide Web).
|
|
<P>The main author is Michael Hipp
|
|
(<CODE>Michael.Hipp@student.uni-tuebingen.de</CODE>). It may be
|
|
used and distributed in unmodified form freely for
|
|
non-commercial purposes. Inclusion in a collection of
|
|
free software (such as CD-ROM images of FTP servers) is
|
|
explicitly allowed.
|
|
<P>The latest version can be obtained from the
|
|
<A HREF="http://mpg.123.org/">mpg123 homepage</A>.
|
|
<P>
|
|
<P>
|
|
<H3>maplay 1.2</H3>
|
|
|
|
<P>This MPEG audio stream player only has support for layer I
|
|
and layer II streams, and lacks support for layer III
|
|
streams. It supports 16 bit sound cards on Linux.
|
|
<P>It is pretty CPU intensive, taking up to about 55% CPU
|
|
time on a 60MHz Pentium. The output is intolerable on a
|
|
66MHz 486 because the CPU just can't catch up with the
|
|
sound. If this happens to you, try playing only one side
|
|
of the audio stream (with the <CODE>-l</CODE> or <CODE>-r</CODE> option),
|
|
instead of the default stereo.
|
|
<P>A slight change in one of the files may be necessary in
|
|
order to compile it. Namely, you may need to add the
|
|
following line to the beginning of the file
|
|
<CODE>configuration.sh</CODE>.
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<PRE>
|
|
#! /bin/sh
|
|
|
|
</PRE>
|
|
</CODE></BLOCKQUOTE>
|
|
<P>The author is Tobias Bading (<CODE>bading@cs.tu-berlin.de</CODE>).
|
|
<CODE>maplay</CODE> 1.2 can be obtained from
|
|
<A HREF="ftp://ftp.cs.tu-berlin.de/pub/misc/maplay1.2/maplay1_2.tar">ftp://ftp.cs.tu-berlin.de/pub/misc/maplay1.2/maplay1_2.tar</A>.
|
|
<P>
|
|
<P>
|
|
<H3>maplay 1.3b</H3>
|
|
|
|
<P>This is an unofficial modification (i.e. not by the
|
|
original author) of <CODE>maplay</CODE> 1.2, so that it can run
|
|
with a much lower load on the CPU. It accomplishes this
|
|
mainly by making u-law output actually work on other
|
|
platforms besides the SPARC. Note that it uses u-law
|
|
output by default, so the sound quality is lower.
|
|
<P>The modifications were made by Orlando Andico
|
|
(<CODE>orly@gibson.eee.upd.edu.ph</CODE>).
|
|
<P>This can be obtained from
|
|
<A HREF="ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/maplay-1.3b-Linux.tar.gz">ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/maplay-1.3b-Linux.tar.gz</A>.
|
|
<P>
|
|
<P>
|
|
<H3>maplay3</H3>
|
|
|
|
<P>This is another derivative of <CODE>maplay</CODE> 1.2. It adds
|
|
support for MPEG Layer 3 audio streams. Currently it
|
|
seems to have some bugs in its playback (you may hear some
|
|
screeching noises). You may have to twiddle with the
|
|
options to solve this.
|
|
<P>The modifications were made by Timo Jantunen
|
|
(<CODE>timo.jantunen@hut.fi</CODE> or <CODE>jeti@cc.hut.fi</CODE>). It
|
|
says that it can be used freely, but making money off of
|
|
it is not allowed. However, I'm not entirely sure about
|
|
the validity of this copyright, since the original
|
|
<CODE>maplay</CODE> is under the GNU General Public License, which
|
|
does not allow derivative works to have a different
|
|
copyright.
|
|
<P>This can be obtained from
|
|
<A HREF="ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/maplay3.tar.gz">ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/maplay3.tar.gz</A>.
|
|
<P>
|
|
<P>
|
|
<H3>splay</H3>
|
|
|
|
<P>This <EM>beta</EM> player is another derivative of <CODE>maplay</CODE>
|
|
1.2 (actually, it is a derivative of <CODE>maplay</CODE> 1.2+,
|
|
which is a MS Windows only derivative of <CODE>maplay</CODE> 1.2).
|
|
It adds support for MPEG Layer 3 audio streams. It is
|
|
also able to play WAV files. It can also play audio
|
|
streams received over an HTTP connection.
|
|
<P>Another feature of <CODE>splay</CODE> is that it can be used as a
|
|
library (under the LGPL), so that it can be used in other
|
|
programs. It also tries to improve performance by using
|
|
threading (you need <CODE>pthread</CODE> to use this feature) and
|
|
a little inline assembly.
|
|
<P><CODE>splay</CODE> uses a command line interface and an optional X
|
|
interface (which uses QT).
|
|
<P>If after compiling it doesn't work (e.g. it segmentation
|
|
faults), try compiling it again without threading.
|
|
<P>This is by Jung Woo-jae (<CODE>jwj95@eve.kaist.ac.kr</CODE>).
|
|
<P>It can be obtained from
|
|
<A HREF="http://adam.kaist.ac.kr/~jwj95/">splay's home page</A>.
|
|
<P>
|
|
<P>
|
|
<H3>Sajber Jukebox</H3>
|
|
|
|
<P>This program is a MPEG audio player with a graphical user
|
|
interface. It is based on <CODE>splay</CODE>, so it includes
|
|
support for MPEG audio layers up to III. It is also able
|
|
to play MPEG audio streams in real time with the stream
|
|
being fed by HTTP. It is also easy to configure.
|
|
<P>It uses the QT toolkit (at least version 1.2 is required).
|
|
It also uses the LinuxThreads library (the included binary
|
|
only works with version 0.5).
|
|
<P>The author is Joel Lindholm
|
|
(<CODE>wizball@kewl.campus.luth.se</CODE>).
|
|
<P>The latest version can be obtained from
|
|
<A HREF="ftp://kewl.campus.luth.se/pub/jukebox">ftp://kewl.campus.luth.se/pub/jukebox</A>.
|
|
<P>
|
|
<P>
|
|
<H3>amp</H3>
|
|
|
|
<P>This <EM>beta</EM> MPEG audio player only has support for MPEG
|
|
Layer 3 audio streams. It is able to play directly to the
|
|
soundcard, and it can output to raw PCM or WAV files.
|
|
This also gives quite a load on the CPU (about 60% on a
|
|
133MHz Pentium).
|
|
<P>This was written by Tomislav Uzelac
|
|
(<CODE>tuzelac@rasip.fer.hr</CODE>). It can be freely used and
|
|
distributed, as long as it is not sold commercially
|
|
without permission (including it in CD-ROMs that contain
|
|
free software is explicitly permitted, though).
|
|
<P>It can be obtained from
|
|
<A HREF="ftp://ftp.rasip.fer.hr/pub/mpeg/amp-0.7.3.tgz">ftp://ftp.rasip.fer.hr/pub/mpeg/amp-0.7.3.tgz</A>.
|
|
<P>
|
|
<P>
|
|
<H3>XAudio</H3>
|
|
|
|
<P>This <EM>alpha</EM> library was written to be a fast
|
|
implementation of an MPEG audio decoding library to be
|
|
used by various GUI front-ends. It supports MPEG audio
|
|
layers I, II, and III. It is capable of random access to
|
|
bitstreams. A command-line interface is included. A
|
|
Motif (Lesstif) front-end is also included in the Linux
|
|
version.
|
|
<P>This is by Gilles Boccon-Gibod, Alain Jobart and others.
|
|
The front-ends to the libary can be freely downloaded.
|
|
The library itself must be licensed to be used (a source
|
|
and binary license is available).
|
|
<P>The front-ends to the library can be obtained from the
|
|
<A HREF="http://www.xaudio.com/">XAudio home page</A>.
|
|
<P>
|
|
<P>
|
|
<H3>Layer 3 Shareware Encoder/Decoder</H3>
|
|
|
|
<P>This is actually a converter that converts MPEG Layer 3
|
|
audio streams to WAV, AIFF, SND, AIFC, or just raw PCM
|
|
sample files. The Linux version does not directly output
|
|
the sound to the soundcard. One has to first convert it
|
|
to some other format.
|
|
<P>However, when you try to play a converted file using
|
|
<CODE>sox</CODE>, you'll probably just get noise because the word
|
|
order in the PCM samples is not right (at least on Intel
|
|
platforms). You need to give <CODE>sox</CODE> the option <CODE>-x</CODE>
|
|
to solve this problem. But there are some players that
|
|
don't have to be told that the word order is wrong, so you
|
|
might not have to worry about this.
|
|
<P>If you have a really fast computer (probably at least a
|
|
100Mhz Pentium), then you can try to play MPEG Layer 3
|
|
streams directly without having to first convert the audio
|
|
file to another format like in the following example (this
|
|
example assumes that you're using <CODE>sox</CODE> and playing a
|
|
44.1 kHz stereo sample).
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<PRE>
|
|
$ l3dec foo.mp3 -sto | play -t raw -x -u -w -c 2 -r 44100 -
|
|
|
|
</PRE>
|
|
</CODE></BLOCKQUOTE>
|
|
<P>The number after <CODE>-r</CODE> is the sample rate of the audio
|
|
stream, and the number after <CODE>-c</CODE> depends on whether it
|
|
is mono or stereo (or even quad). If this looks too
|
|
complicated, you can use something like a shell script or
|
|
an alias.
|
|
<P>This is shareware copyrighted by Fraunhofer-IIS. A demo
|
|
version for Linux on x86 systems can be obtained from
|
|
<A HREF="ftp://ftp.fhg.de/pub/layer3">ftp://ftp.fhg.de/pub/layer3</A>. The demo version only
|
|
converts layer III audio streams.
|
|
<P>
|
|
<H3>X11Amp</H3>
|
|
|
|
<P>This <EM>beta</EM> software is an MPEG audio stream player
|
|
with a graphical interface, similar to
|
|
the one used by the Windows program <CODE>winamp</CODE>.
|
|
<P>There is no copyright mentioned anywhere (I assume that it
|
|
can be freely used for personal use). It is maintained by
|
|
Mikael Alm (<CODE>psy@x11amp.bz.nu</CODE>), Thomas Nilsson
|
|
(<CODE>fatal@x11amp.bz.nu</CODE>), and Olle Hallnas
|
|
(<CODE>crocodile@x11amp.bz.nu</CODE>).
|
|
<P>It can be obtained from
|
|
<A HREF="http://www.x11amp.bz.nu/">X11Amp's homepage</A>.
|
|
Only binaries for Intel Linux and FreeBSD are made
|
|
available here.
|
|
<P>
|
|
<H2><A NAME="ss2.4">2.4 WAV</A>
|
|
</H2>
|
|
|
|
<P>Quote from the <CODE>sox</CODE> man page:
|
|
<P>
|
|
<BLOCKQUOTE>
|
|
These appear to be very similar to IFF files, but not the
|
|
same. They are the native sound file format of Windows
|
|
3.1. Obviously, Windows 3.1 is of such incredible
|
|
importance to the computer industry that it just had to
|
|
have its own sound file format.
|
|
</BLOCKQUOTE>
|
|
<P>These usually have the extension <CODE>.wav</CODE>.
|
|
<P>Also see section
|
|
<A HREF="#sec-sox">sox</A> and
|
|
<A HREF="#sec-bplay">bplay</A> for other WAV players besides
|
|
the ones listed here.
|
|
<P>
|
|
<P>
|
|
<H3>wavplay</H3>
|
|
|
|
<P>This program supports playing and recording with the WAV
|
|
format. It uses locking so that only one sound may be
|
|
played at a time. Its locking capabilities can also be
|
|
used separately from its sound playing capabilities.
|
|
<P>In addition to a command-line interface, it also has a
|
|
Motif interface, which can be used with Lesstif.
|
|
<P>It was originally written by Andre Fuechsel
|
|
(<CODE>af1@irz.inf.tu-dresden.de</CODE>), but was evolved to the
|
|
point of being completely rewritten by Warren W. Gay
|
|
(<CODE>bx249@freenet.toronto.on.ca</CODE> or <CODE>wwg@ica.net</CODE>).
|
|
<P>It can be obtained from
|
|
<A HREF="ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/wavplay-1.0.tar.gz">ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/wavplay-1.0.tar.gz</A>.
|
|
<P>
|
|
<P>
|
|
<H2><A NAME="ss2.5">2.5 Other stuff</A>
|
|
</H2>
|
|
|
|
<P>This section lists stuff that play sound formats that don't
|
|
deserve a separate section (i.e. formats that have only one
|
|
player available), or players that play more than one
|
|
format.
|
|
<P>
|
|
<P>
|
|
<H3><A NAME="sec-sox"></A> sox</H3>
|
|
|
|
<P>This program is actually a converter, that is, it converts
|
|
one sound format to another. However, some versions of
|
|
<CODE>sox</CODE>, when invoked as <CODE>play</CODE>, plays the sound (the
|
|
<CODE>play</CODE> application in the Sound HOWTO probably refers
|
|
to this). It supports raw (no header) binary and textual
|
|
data, IRCAM Sound Files, Sound Blaster <CODE>.voc</CODE>,
|
|
SPARC <CODE>.au</CODE> (w/header), Mac HCOM, PC/DOS <CODE>.sou</CODE>, Sndtool,
|
|
and Sounder, NeXT <CODE>.snd</CODE>, Windows 3.1 RIFF/WAV, Turtle
|
|
Beach <CODE>.smp</CODE>, CD-R, and Apple/SGI AIFF and 8SVX formats
|
|
<P>
|
|
<P>Since somewhere in the 1.3.6x kernels, you might have to
|
|
make a small change in one file to make it play the sound
|
|
directly. Namely, you may have to change line 179 in
|
|
<CODE>sbdsp.c</CODE> from
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<PRE>
|
|
if (abuf_size < 4096 || abuf_size > 65536) {
|
|
|
|
</PRE>
|
|
</CODE></BLOCKQUOTE>
|
|
<P>to
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<PRE>
|
|
if (abuf_size < 1 || abuf_size > 65536) {
|
|
|
|
</PRE>
|
|
</CODE></BLOCKQUOTE>
|
|
<P>But then again, you may not have to do this. But doing
|
|
this won't break anything.
|
|
<P>
|
|
<P>It is written and copyrighted by many people, and can be
|
|
used for any purpose.
|
|
<P>It can be obtained from
|
|
<A HREF="ftp://sunsite.unc.edu/pub/Linux/apps/sound/convert/Lsox-linux.tar.gz">ftp://sunsite.unc.edu/pub/Linux/apps/sound/convert/Lsox-linux.tar.gz</A>.
|
|
<P>A more recent version by Chris Bagwell
|
|
(<CODE>cbagwell@sprynet.com</CODE>) (based on the latest gamma
|
|
version of the original <CODE>sox</CODE>, and includes the above
|
|
fix) can be obtained from
|
|
<A HREF="http://home.sprynet.com/sprynet/cbagwell/projects.html">http://home.sprynet.com/sprynet/cbagwell/projects.html</A>.
|
|
In addition, this version supports MS ADPCM and IMA ADPCM
|
|
WAV formats.
|
|
<!--
|
|
ADPCM
|
|
-->
|
|
<P>
|
|
<P>
|
|
<H3><A NAME="sec-bplay"></A> bplay</H3>
|
|
|
|
<P>This <EM>beta</EM> program plays raw audio, WAV, and VOC
|
|
files. It's also able to record to these files. It uses
|
|
a variety of techniques to get the highest speed possible
|
|
so that it can run acceptably even on slow machines. One
|
|
of these techniques require that the installed programs be
|
|
setuid root. The paranoid hoping to use this may want to
|
|
use the Debian package by Ian Jackson
|
|
(<CODE>ijackson@gnu.org</CODE>), which disables the feature
|
|
that needs the setuid bit.
|
|
<P>The author is David Monro (<CODE>davidm@gh.cs.usyd.edu.au</CODE>).
|
|
<P>It can be obtained from
|
|
<A HREF="ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/bplay-0.96.tar.gz">ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/bplay-0.96.tar.gz</A>.
|
|
<P>
|
|
<P>
|
|
<H3>SIDPLAY</H3>
|
|
|
|
<P>This program emulates the Sound Interface Device
|
|
chip (MOS 6581, commonly called SID) and the Micro
|
|
Processor Unit (MOS 6510) of the Commodore 64.
|
|
Therefore it is able to load and execute C64 machine code
|
|
programs which produce music or sound. In general these
|
|
are independent fragments of code and data which have been
|
|
ripped from games and demonstration programs and have been
|
|
transferred directly from the C64.
|
|
<P>It uses a command line interface by default. There are
|
|
also Tk and QT interfaces available separately from the
|
|
main package.
|
|
<P>It is maintained by Michael Schwendt
|
|
(<CODE>sidplay@geocities.com</CODE>).
|
|
<P>It can be obtained from
|
|
<A HREF="http://www.geocities.com/SiliconValley/Lakes/5147/">SIDPLAY's home page</A>.
|
|
<P>
|
|
<P>
|
|
<H3>RealAudio Player</H3>
|
|
|
|
<P>This lets you listen to sound, which is stored in a
|
|
proprietary format, in real time over the Internet without
|
|
downloading the whole sound file first. It could be used
|
|
stand alone, but it is really intended to be used along
|
|
with a web browser (the explicitly supported ones are
|
|
Mosaic and Netscape). It cannot be used without X (you
|
|
wouldn't be able to get it working with Lynx in a text
|
|
console).
|
|
<P>However, there exists a hack which allows one to run the
|
|
RealAudio player from the text console. It requires the X
|
|
virtual frame buffer (Xvfb) server to work. This hack can
|
|
be obtained from
|
|
<A HREF="ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/traplayer-0.5.tar.gz">ftp://sunsite.unc.edu/pub/Linux/apps/sound/players/traplayer-0.5.tar.gz</A>.
|
|
<!--
|
|
traplayer
|
|
-->
|
|
<P>This is by Progressive Networks, Inc. This cannot be
|
|
redistributed, modified etc. Look at the license for
|
|
exact details on what you can do. It can be obtained by
|
|
registering with no cost at the
|
|
<A HREF="http://www.realaudio.com/">RealAudio home page</A>.
|
|
<P>
|
|
<P>
|
|
<H3>cat</H3>
|
|
|
|
<P>One might think what <CODE>cat</CODE>, the sometimes overused
|
|
concatenating utility, has to do with playing sounds.
|
|
I'll show a use of it through an example.
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<PRE>
|
|
$ cat sample.voc > /dev/dsp
|
|
$ cat sample.wav > /dev/dsp
|
|
$ cat sample.au > /dev/audio
|
|
|
|
</PRE>
|
|
</CODE></BLOCKQUOTE>
|
|
<P>Doing a <CODE>cat</CODE> of an <CODE>.au</CODE> file to
|
|
<CODE>/dev/audio</CODE> will usually work, and if you're lucky
|
|
enough that the file has the correct byte order (for your
|
|
platform) etc., a <CODE>cat</CODE> of a sound file that uses PCM
|
|
samples (like <CODE>.wav</CODE> or <CODE>.voc</CODE>) to <CODE>/dev/dsp</CODE>
|
|
might even sound right.
|
|
<P>This isn't a totally useless use of <CODE>cat</CODE>. It might be
|
|
useful, for example, if you have a sound file that none of
|
|
your programs recognize, and you know that it uses PCM
|
|
samples, then you might be able to get a very approximate
|
|
idea on how it sounds like this way (if you're lucky).
|
|
<P>
|
|
<P>
|
|
<HR>
|
|
<A HREF="Sound-Playing-HOWTO-3.html">Next</A>
|
|
<A HREF="Sound-Playing-HOWTO-1.html">Previous</A>
|
|
<A HREF="Sound-Playing-HOWTO.html#toc2">Contents</A>
|
|
</BODY>
|
|
</HTML>
|