Usage Hints

Introduction

Apart from the obvious features that you would expect from a CD player and ripper application, xmcd and cda have a number of unique capabilities that you may not be aware of. Here are some usage hints that would hopefully help you get the most enjoyment out of this software. If you have other good ideas, please send them to the author for inclusion here.

Remote Control Capability

A running xmcd instance can be "remote controlled" from the shell command line. This lets you use xmcd in new and interesting ways. Xmcd's -remote command line option is used for this purpose. Please see the xmcd man page for all the supported commands and arguments that you can send using this feature. Here are some examples.

Xmcd as an Alarm Clock

You can start an xmcd program instance on your desktop, load a CD, and then use the UNIX at(1) command to make it start playing at a specified time. For example, the following shell command will cause xmcd to start playing at 7:30AM in the next morning:

    xmcd &
    echo "xmcd -display snoopy:0 -remote play" | at 7:30AM

Refer to the at(1) man page for usage details, and substitute the appropriate -display option for your X display. This is necessary because the shell that at spawns to run your command at the trigger time may not have the appropriate DISPLAY environment variable set.

You can also use the -device option to specify a different CD drive, and/or the -rmthost option to remote control an xmcd instance running on another computer of your network.

Note that for cda, due to its daemon/client design, is also suitable for use as an alarm clock. Instead of using the -remote option, simply start the cda daemon, and then have the at command invoke a cda client command at the desired time to start playback:

    cda on
    echo "cda play" | at 7:30AM

Using a Wireless Remote Control

On Linux systems, you can interface an handheld infrared remote control to your computer and have it invoke a variety of functions. Using special shell script wrappers utilizing the -remote option of xmcd, you can adapt it to make this a convenient remote control for xmcd. For information please visit the Linux Infrared Remote Control project web site.

The cda player can also be remote controlled in a similar way. Since it is command-line oriented, there is no -remote option to use. ust have the scripts invoke cda directly.

CDDA Pipe-to-program

Xmcd and cda lets you rip your CDs into a data format that you choose (for example, WAV), and simultaneously pipe that data to the standard input of another program for additional processing. Here are some examples of its use. Just enter the external program's command line into xmcd's "Pipe to program path" text box, and enable the CDDA pipe-to-program mode.

Playback on a Remote Host

You can play a CD, but have the audio piped to the speakers on another computer of your network. In the following example, xmcd sends an MP3 format data stream to the host venus and invokes a player there. Set the file format to "MP3" and then use this command line:

    rsh venus mpg123 -
This assumes you have the mpg123 program installed on the remote host to play the MP3 data stream. Similarly, you can set the file format on xmcd to "WAV" and use a WAV player on the remote system to play the data:
    rsh venus vplay -
Note that the remote player application must support reading the audio stream from its standard input (which is designated in both of the above examples with the hyphen '-' character).

Note that the remote player is run under a remote shell spawned by the rsh(1) command. On some platforms (e.g., SCO UNIX and HP-UX) you must use the rcmd(1) command instead. Also, if the remote player program is installed in a directory that is not in the remote shell's PATH environment, then you must specify its full path name. The remote host must allow rsh connections and you have rsh access privilege to that host.

Depending on your CD drive's speed, you may need to turn off jitter correction on xmcd to get acceptable performance. Also, your network must have sufficient bandwidth to allow for glitch-free playback. Usually a 10Base-T (10Mb/s) Ethernet should be good enough.

If you enable the CDDA playback mode simultaneously with the CDDA pipe-to-program mode in these examples, the music will be played on your local speakers as well as on the remote host.

Format Conversion

Using sox, an external format convertor program, you can convert the digital audio stream from xmcd to a format not natively supported by xmcd. In this example, set your file format to "WAV" on xmcd, and sox will convert it to an Amiga IFF sound file.

    sox -t wav - -t maud audio.mau
Sox supports a number of formats, and can be used to increase/decrease the audio volume of the digital stream, as well as add a number of other effects. See the sox software man page for details.

Note that the CDDA pipe-to-program text box does not do file name token substitution (such as the %A for artist, %T for track title, etc.) as in the CDDA save-to-file mode. In order for the file name substitution to take place on a per-track basis, the pipe to the external program would have to be closed and reopened for each track. This has the side effect of terminating the external program and restarting it. In some cases this may be undesirable. For example, if xmcd is to be used to pipe data to a audio streaming daemon that opens a remote network connection. Restarting the daemon will cause the network connection to be dropped. Since xmcd does not know what the program it's piping the audio stream to does, xmcd was designed not to restart the pipe. All names you enter in the Pipe-to-program path text box are interpreted literally.

Customizing the Xmcd wwwWarp Menu

The wwwWarp pull-down menu is invoked when you click on the "world symbol" button on xmcd's main window. This lets you access a variety of features, such as the xmcd help system and online documentation, man page, Local Discography, and related content search on the internet. Most of these are done by remote controlling an external web browser.

By default, the contents of the wwwWarp menu is configured by the scripting language in the /usr/lib/X11/xmcd/config/wwwwarp.cfg file (substitute /usr/lib/X11/xmcd with the actual xmcd library directory that you chose when you installed xmcd). It is not recommended that you change the contents of that file. However, if you would like to override the menu configuration, you can make a copy of the file and place it in your $HOME/.xmcdcfg directory, and edit it. The file format is documented in the comments in that file. You may add, change or delete entries to the menu.

Specifying the wwwWarp Web Browser

Xmcd supports remote controlling the Mozilla, Galeon, Opera and Netscape web browsers for use with its wwwWarp feature. By default, xmcd will search the system's standard directories for a supported web browser and use the first one it finds. However, if you have multiple browsers installed on your system, and wish xmcd to use a specific one, you may set the BROWSER_PATH environment variable to the full path of the browser executable file. See the xmcd man page for details.

Xmcd Local Discography via an HTTP Server

If you run a HTTP server on your system (such as the popular Apache web server), you can host the xmcd Local Discography directory hierarchy on the server. The directory root is located at /usr/lib/X11/xmcd/discog (substitute /usr/lib/X11/xmcd with the actual xmcd library directory that you chose when you installed xmcd). You can configure your Apache server to look there for files, or simply add a symbolic link under the Apache htdocs directory to point to the top level Local Discography directory.

The benefit of accessing the Local Discography through an HTTP server rather than directly via local files is as follows:

If you serve your Local Discography directory via an HTTP server, set the discogURLPrefix parameter in your xmcd common.cfg configuration file. This is so that xmcd could generate the correct URLs in the .m3u and .pls playlist files of your Local Discography directory if you keep digital audio files there.

Note that if you invoke the Local Discography using xmcd's WWWwarp pull-down menu, it will always drive your web browser to access the files directly. You can, however, bookmark the server-hosted HTTP URL (something like http://www.yourdomain.com/discog) and browse from there.


Main News & Features Platforms & Drives Screen shots Downloads GPL FAQ Config Links CDDB Contact