mmplay
Author: Michael Minn (see michaelminn.com for contact info)
January 1, 2009
Describes installation and operation of mmplay, a command-line CD, mp3 and wav file player

1. Installation
mmplay is a simple command-line audio player for CDs, .wav and .mp3 files. mmplay is invoked from the command line with files, directories of files, or a CD device as arguments. mmplay displays a list of files on the terminal using VT-100 display escape sequences. The list can be navigated through using the keyboard. No mouse is needed or supported.
mmplay exists because my favorite audio player has been deprecated and I don't feel like dealing with any of the more complicated playlist management programs which took its place. I just wanted something to play my audio files and an occasional CD.
mmplay must be compiled and installed from source:
make install
By default, it is assumed that libmad is installed for MP3 decoding and libasound is installed for ALSA audio device support. Both can be disabled by commenting out the USEMP3 and/or USEALSA defines, respectively, in the Makefile.
Libmad can be installed under Debian with the libmad0-dev package:
sudo apt-get install libmad0-dev
Other distributions require downloading and installing from source which can be obtained from http://www.underbit.com/products/mad/
2. Syntax
SYNTAX: mmplay [-i] [-d audio_device]... -i lists audio file information -d can be used to specify an alternative OSS or ALSA audio device (default /dev/dsp) -r causes each track to be repeated until user advances to next track -p pauses between tracks cd_device is /dev/cdrom on most distributions Function keys: 1-9/a-p go to track up previous track down next track right forward 15 seconds left back 15 seconds pgup back 10 tracks pgdn forward 10 tracks q quit ? view this help
Open Sound System (OSS) audio devices are usually named /dev/dsp, /dev/dsp1, etc.
Advanced Linux Sound Architecture (ALSA) audio devices are named hw:0,0 hw:1,0 etc. where the first number is the sound card and the second number is the port on that card. Available audio devices can be listed with the aplay -l command.
For playing CDs, invoke mmplay with the CD-ROM device. The exact name of the CD-ROM device can vary depending on distribution, but is usually /dev/cdrom, which may be softlinked to another device such as /dev/sr0. On some distributions that device may be created with protections that restricts user access. This can be overcome by:
- Changing the device permission manually: sudo chmod 0644 /dev/cdrom
- Changing your udev configuration (rules files in /etc/udev)
- Set the setuid bit on the mmplay executable: chown root:root mmplay; chmod 4755 mmplay
- Run as superuser (STRONGLY DISCOURAGED): sudo mmplay /dev/cdrom
3. mmcdrip
This package also includes mmcdrip, a CD-ROM .wav file ripper that is a bit faster (and more unreliable) than cdrecord.
SYNTAX: mmcdrip <cdrom_device> <start_track> <end_track | all>
Note that track numbers start with 1, not 0. To rip an entire CD to separate .wav files for each track:
mmcdrip /dev/cdrom 1 all
4. Version History
v2009.01.01: Add -r (repeat) and -p (pause) options. Keep track of frames read from .wav file so any additional chunks on the ends of the files are not read as audio.
v2008.12.02: Shift fixed-point output of MP3 synth by 13 rather than 12 to avoid clipping.
v2008.11.17: Correct bit-shift and peak clipping in fixed-point to 16-bit short conversion of output from libmad MP3 synthesizer.
v2008.11.14a: initial release of mmplay.
MMCDPLAY v2007.03.28: previous incarnation as a simple CD player.
Potatos are not for clever. Potatos are earthy. Potatos are for understanding. (Jim Leff)