The Linux Sound Playing HOWTO Yoo C. Chung, v1.6, 11 August 1998 This document lists applications for Linux that play various sound formats. Introduction

This is the Sound Playing HOWTO. It lists the many sound formats and the applications that can be used to play them. It also lists some hacks and advice on using these applications. There are also some other interesting applications related to sound not directly related to playback. However, this document does Copyright of this document

This document can be freely distributed and modified (I would appreciate it if I were notified of any modifications), as long as this copyright notice is preserved. However, it cannot be placed under any further restrictions, and a modified document must have the same copyright as this one. Also, credit must be given where due. Copyright of the listed applications

If there is no mention of any copyright, then the application is under the GNU General Public License. Where to get this document

The most recent official version of this document can be obtained from the . The most recent unofficial version of this document can be obtained from . A Korean version of this document (very outdated) is available at . A Japanese version of this document is available at . Feedback

I am not omniscient, and I don't use all the applications in here (a few I can't even try), so there are bound to be mistakes. Also, programs usually continuously evolve, so documentation tends to get out of date. Therefore, if you find anything wrong, please send me any corrections. Suggestions or additions to this document are welcome, too. Acknowledgments

All the authors of the applications in this HOWTO. Also, Hannu Savolainen for the great sound driver and Linus Torvalds for the great underlying OS. I'd also like to thank Raymond Nijssen (Playing Various Sound Formats

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.

MIDI stands for Musical Instrument Device Interface. MIDI files usually have the extension

This package includes If you have a GUS, for more information on modules). 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 . The binaries included here are in a.out format (linked with ancient libraries), and the

Some people recommend this . This page also contains a link to a small library of GUS patches.

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. 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 $ splaymidi foo.mid; stty sane 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. It was written by Nathan Laredo (.

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. 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. The most common format has the extension

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 .

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. 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. This has an X interface. It uses the QT toolkit (needs version 0.99 or greater). Check the for information on QT. This can be freely distributed. It was originally written by Hannu Savolainen, and now maintained by Andrew J. Robinson (.

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 .

This is a module player (not to be confused with Adagio's .

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 .

This .

This is an It has a feature which lets modules loop if they want to. The number of loops can be limited by the .

This .

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

This .

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. 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 #! /bin/sh The author is Tobias Bading (.

This is an unofficial modification (i.e. not by the original author) of .

This is another derivative of .

This .

This program is a MPEG audio player with a graphical user interface. It is based on .

This .

This . Layer 3 Shareware Encoder/Decoder

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. However, when you try to play a converted file using $ l3dec foo.mp3 -sto | play -t raw -x -u -w -c 2 -r 44100 - The number after . The demo version only converts layer III audio streams.

This similar to the one used by the Windows program . Only binaries for Intel Linux and FreeBSD are made available here.

Quote from the 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. These usually have the extension and for other WAV players besides the ones listed here.

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. In addition to a command-line interface, it also has a Motif interface, which can be used with Lesstif. It was originally written by Andre Fuechsel (. Other stuff

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.

This program is actually a converter, that is, it converts one sound format to another. However, some versions of 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 if (abuf_size < 4096 || abuf_size > 65536) { to if (abuf_size < 1 || abuf_size > 65536) { But then again, you may not have to do this. But doing this won't break anything. It is written and copyrighted by many people, and can be used for any purpose. It can be obtained from . A more recent version by Chris Bagwell (. In addition, this version supports MS ADPCM and IMA ADPCM WAV formats.

This .

This program emulates the .

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). 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 .. cat

One might think what $ cat sample.voc > /dev/dsp $ cat sample.wav > /dev/dsp $ cat sample.au > /dev/audio Doing a /dev/audio will usually work, and if you're lucky enough that the file has the correct byte order (for your platform) etc., a /dev/dsp might even sound right. This isn't a totally useless use of Other useful sound utilities

This section has nothing to do with the actual playing of sound files. Rather, it is a collection of some sound utilities that one might find useful.

This is a simple command line interface for controlling the volume (what else could it be?). It also has a separate program with a Tcl/Tk interface included in the package for controlling the volume and playing .

This is a Tcl/Tk application that supports playback, recording, and editing of digital sound using It can be found at .

This . References

The documentation included with the applications in this document. The Linux Sound HOWTO. It can be found at the .