OS/2 eZine

16 April 2001
John Bijnens is a CAM/CAM engineer in the KHLim - Dep. IWT which is some kind of technical university in Belgium. He gives training in Pro/E and also writes CNC postprocessors (all development is done on OS/2.)

If you have a comment about the content of this article, please feel free to vent in the OS/2 eZine discussion forums.

Previous Article
Next Article

Visit CooLFM homepage now! http://os2.ru/projects/coolfm

How to automatically convert a CD to a series of MP3 files Part II

Last month I wrote about CD2MP3PM to convert your audio CD's to a bunch of MP3's. This month we'll look at CDMagic. This is a German software package that has a lot of features:
  • converts an audio CD to MP3 files (automatically entering MP3 tags by using CDDB servers)
  • creates playlists for WarpAmp or PM123
  • MP3 information is stored in a dBase compatible database
  • assigns CD-covers
The software is freeware for the moment. The current version is 2.0.

What software do you need?

cdmag_20.zip this file can be downloaded from the homepage of CDMagic http://www.cdmagic.de Besides cdmagic itself, it contains some third party software like WarpAmp, Z!, Leech, Alfons, BladeEnc.
emx runtime you need the emx runtime to run the MP3 encoder BladeEnc. You can download this from hobbes.
Warp 4 according to the manual you should install cdmagic on Warp 4 because of some differences between the TCP/IP implementation of Warp 3 and Warp 4.

Unzip the file into the directory where you want CDMagic to be installed.

Installation and Configuration

First of all create a directory to install the software in, e.g. f:\os2\cdmagic Now start install.exe.

[Click images to view full size.]

You have two options : update CONFIG.SYS automatically or update CONFIG.SYS manually. If you let CONFIG.SYS be updated automatically, only the installation directory of cdmagic will be added to LIBPATH and PATH. I advise you to make this alterations to your CONFIG.SYS even if you have . in your LIBPATH and even if you start cdmagic in its installation directory. Running install.exe will also install the manual and create a folder on your desktop containing two icons, one to open the manual and one to start cdmagic.

Now reboot your system to activate the changes to LIBPATH and PATH in your CONFIG.SYS. You can now start cdmagic by double clicking on the program icon. When the program is started for the first time, you're asked to fill in some settings.

You have several options you can configure :

player programs: here you can select the MP3 player you want to use to play the MP3 files that are in the database of cdmagic. You can choose between PM123, WarpAmp or Z!. WarpAmp and Z! are included with cdmagic. If you want to use PM123 the installation directory of PM123 must be added to the PATH in your CONFIG.SYS. For the moment it is not possible to add other players to this configuration list.
CD-grabbing: here you can select the grabber you want to use to convert the audio tracks on your CD to WAV files. You can choose between Alfons and Leech which are both included with cdmagic. For the moment it is not possible to change the command line options for Alfons or Leech or to add other grabbers to this configuration list.
path for WAV-files: this is the path where the grabbed WAV files are (temporarily) stored before conversion to MP3 files.
path for MP3-files: this is the path where the MP3 files are stored. This is not the place where the database files that contain the info of your MP3 files are stored. These are stored in the installation directory of cdmagic.
name stem: cdmagic allows you to store bitmaps of the CD covers. These bitmaps have a file name with the following format xxxxxxxxxn.bmp xxxxxxxxx is the name stem and n the number of the bitmap. If the name stem is e.g. 'cover' then the subsequent bitmaps will be named cover1.bmp, cover2.bmp, ... cdmagic allows you to store up to 9 bitmaps per CD. For the moment only the BMP format is supported, other formats are in development. scanner frontend program :here you can enter the name of the scanner frontend program you are going to use to create the cover bitmaps.
path for BMP-files: specifies the directory where the cover bitmaps must be stored.
CDDB servers: specifies the CDDB server that will be used to automatically enter the MP3 tag data.

CDDB was a free service, started in 1995, by and for music fans to identify the music they were playing on their computers. Every music CD of every artist that you can buy has a unique identification. This identification is used to search the database. There are more than 800,000 albums and 10 million songs in this database. In July 2000 the name of the company was changed from CDDB to Gracenote. Since March 1 2001 the CDDB server has withdrawn the access authority for cdmagic and other OS/2 packages like e.g. cd2mp3pm. Instead of the expected track data you get the message 'CD not found on this server'. The response of Gracenote to a question of the author of cdmagic was that the access protocol for the CD database had changed. Which was formerly an open http-based protocol that could be programmed in any language on any operating system is now embedded in a proprietary program module, i.e. a Windows DLL. The people at Gracenote have ported this DLL to a UNIX lib but they refuse to do a port to OS/2. They also refuse to keep the old access protocol still open. Please send a email to them to convince them to change their minds. The email address is : licensing@gracenote.com

As a reaction to this licensing policy an alternative group of CDDB has been started. So you can enter the Url of one these free CDDB servers e.g. http://www.freedb.org


track: an audio track on CD or a converted MP3 file.
volume: a whole CD (which contains the tracks.)
collection: a collection of several CD's (e.g. The Best of Queen.)


Now that we have everything configured, it's time to test it. Place the music CD you want to convert in your CD-ROM drive and click on the button Refresh CD. If you have an active Internet connection you can also press the button CDDB to have a CDDB server automatically fill in the track titles and other CD info.

On my system (an AMD K6-200MHz, 64 MB RAM, Warp 4 Fixpack 8) I may not press the buttons or menu options too fast or cdmagic crashes and can not be restarted unless I wait a long time or reboot my PC.

Before choosing the menu option Convert, you must first mark the tracks you want to convert. Select a track by clicking on it and then press the right mouse button (if you have not entered a track or CD title a dialog box will appear asking you if you are sure to convert a blank title.) A popup menu appears. Now select the option 'Rip and mark for convert'. If you want to convert all the audio tracks on the CD, select the option 'Select all'. Press the right mouse button again and select the option 'Rip and mark for convert'. The grabber software (Alfons or Leech) will be started and convert the audio tracks into wav files.

It is not possible to interrupt the grabbing. Don't kill the grabber as this leaves an incomplete wav file in the WAV directory. In some cases this confuses the software as it believes there is still a wav file that must be converted. Deleting the wav file doesn't solve the problem as the grabbing of the audio track has made an entry in the database. We'll discuss later how you can erase an entry in the database.

As you can see in the popup menu it also possible to play an audio track before you grab it in order to verify that is indeed the track you want to convert.

There is another popup menu that lets you control the layout of the main window of cdmagic. Place the mouse cursor on the fancy background image and press the right mouse button.

After you have grabbed the selected audio tracks, click on the menu option 'Convert'. A new dialog window appears.

You now get a list of the audio tracks you grabbed and stored as wav files in the WAV directory. The list is not just a list of the wav files that are inside the WAV directory, but is the list of the wav files that is stored in the database by the grabbing process as files marked to convert. You can now select the files you want to convert and press the button 'Start Conversion'. As soon as you have pressed this button, BladeEnc is launched to convert the wav files into MP3's. Two new checkboxes 'Halt' and 'Cancel' appear on the dialog window. I have not been able to use these to stop the encoding process. Don't just kill BladeEnc as this may lead to incomplete MP3 files and corrupt entries in the database.

When you already have MP3 files, e.g. you've converted audiotracks with the aid of CD2MP3PM, you can also add these to the database of cdmagic by importing them. You can do this by choosing the menu option File - Import.

The option 'Delete original MP3 file after copying into CDMagic-domain' means that the MP3 file will be copied to the directory you've specified in 'Path for MP3 files' and that the MP3 file in the original location will be deleted.

When you have converted a whole CD to MP3 files, you can attach cover bitmaps to it. To do this select the menu option 'Aggregates - Real Aggregates'.

A new dialog window appears. You can view the MP3 files by Collections or by Volumes.

Select the CD you want to scan a cover for and press the right mouse button. A popup menu appears.

When you scan or import a cover image, pay attention to the messages in the log window. E.g. when you are not able to assign a cover image to a converted audio CD (or volume) it may be possible that the directory you have entered in the settings window for 'Path for BMP-files (CD covers)' does not exist.

Take care that the filename of the image you want to import has the format xxxxxxxxxxxn.bmp where xxxxxxx is the name stem and n the number (1 : front page, 2 : back page, ...)

If you want an overview of the CD's you've converted, with the cover bitmaps used as thumbnails, select the menu option 'Cover images'.

If you want to correct an entry in the database (modify / delete) or you want to search for a particular song you must press the button 'DB Query'.

A very nice feature that's hidden in this dialog window is the ability to create a playlist containing the selected songs for PM123 or WarpAmp.

cdmagic also allows you to archive the converted MP3 files if you run out of disk space. You can archive the files (tracks, volumes) you want to removable media. If you use RSJWriter you can assign a driver letter to a CDRW and export the MP3's to this drive.

In case you were wondering what the button 'Click if CD is a sampler' means, this button is used to define the MP3 tags for a CD with a collection of artists on it (where e.g. the artist name is mentioned within the track title). The 'Sampler' button gives you access to a dialog window that lets you separate the track title and the name of the artist.

Additional information

On my system I wasn't able to start the Enhanced Editor (ee.exe and eee.exe) from PillarSoft while cdmagic was running. I suspect it has something to do with the fact that both are written in Rexx (cdmagic probably with Watcom Visual Rexx and the Enhanced Editor probably with Vispro Rexx) and there is probably a library conflict of some kind.

I also experienced some interference with the utility SmartBar.

Don't forget that this software is written by the authors in their spare time so if you like this software, please send a sign of life and your appreciation. This way they'll know their work is valued very much and it will stimulate them to develop new versions. If anything isn't working as expected, don't start to yell, instead try to provide the author with a full reproducible error report so he is able to correct the problem in case of a bug.


And now it is up to you. Give CDMagic a try.

CDMagic Version 2.0
Price: freeware at the moment but will probably evolve into shareware.
Email: luwag@gmx.net
Website: http://www.cdmagic.de
Support: On the website of the author there are special error pages to report bugs/errors.

WarpAmp Public Beta 4
Price: This software is freeware. Development seems to have stopped.
Website: http://www.sdg.os2.nu/

Z! March 28 2001 Alpha MP3 Player
Price: This software is freeware and is actively developed.
Website: http://dink.org

BladeEnc 0.92
Price: Freeware.
Author: Tord Jansson
Website: http://bladeenc.mp3.no

Alfons 0.99b
Description: A CD grabber which converts audio tracks into wav files.
Price: Freeware.
Author: Mikael Kjellstr÷m
Website: http://www.algonet.se/~mikkje/alfons.html

Previous Article
Next Article

Copyright (C) 2001. All Rights Reserved.