germnan version -> Home

CDDB support for OS/2 CD-Player

preface usage download history todo internals details contact

Preface

This application is a quick and dirty hack. It is neither very comfortable nor full of features. But it may be extended simply.


Usage

Reqirements
You need in addition to this Programm presently a local copy of the CDDB database. You can download it for instance at www.freedb.org. A local CDDB server is not required.
Unfortunately this database is very bulky. That means: it consists of several tenthousends of files with a total size of some 100 MB (60 MB compressed). This is not really amusing with a modem link and even drives the PC file systems to their limits. FAT is definitly not capable of keeping so much file per directory. HPFS does it, but as soon as the next (hopefully unfrequent) CHKDSK it shows that this is a challenge, too.
A CDDB server query is planned. (see todo)
Usage
Simply drop the CMD skript in directory of the local CDDB database (where the folders misc, rock etc. resides) and call it with a audio CD inside the CD-ROM. It is recommended to create a program object on the desktop or somwhere else.
If the OS/2 CD player is running, the information is updated on the next seek respectively the next media change. However, the information is stored in any case.
Unfortunately the internal data of the OS/2 player is insufficient for a automatic CDDB requests for each audio CD whitch had ever been inserted. So you have to call the program for every unrecognized CD once.


Download

This program is distributed under the terms of the
GNU GENERAL PUBLIC LICENSE.

Version 0.2.1
ZIP file with source code and this guide
only program source, uncompressed


History

Version 0.1 (first release)

Version 0.2 Version 0.2.1


ToDo

 · CDDB server query
To overcome the disadvantages of the local database a CDDB query is the solution. This is no problem in principal, but it was not my priority because I already had the local CDDB files.
 · Ambiguous CDDB IDs
The CDDB IDs are hashes an not necessarily unique. If somebody tells me how this is handeld by the CDDB, I will implement it. This might apply to the MMPM CD player, too. But this is somewhat more unlikely. However ther is no help in case of a name clash.
 · Automatic update for newly inserted CDs
It would be much more comfortable if the script need not to be invoked manually. However, my knowledge about SOM ends slightly afte the three letters. But if somebody would like to do it...
 · Upload feature
If information is available in the CDP.INI but not at the CDDB server a upload might be performed. Hot candidates are previously failed CDDB queries.

Internals

This program is completely written in REXX and may be modified easyly.

  1. It opens the CDAUDIO device fethes the TOC of the currently loaded CD. A possibly running playback is unfortunately temporarily suspended.
  2. It calculates the CDDB disk ID.
  3. Now all direct subfolders of the current directory are searched for a matching file.
    The location of the script is relevant only in this context. If the working direktory is in the CDDBs root, it is sufficient.
  4. If no match is found, a second search algorithem starts: fuzzy search. All files with logically similar CD IDs are inspected (hash ±10, length ±1). The TOC of each file is compared with a precision of 40 frames. Different lead ins are ignored.
    This only works with CDs that have at least 2 tracks.
  5. If the search was successful, the MMCD key is calculated and the Information ist stored to the CDP.INI. This file is located automatically in the current MMOS2 folder.


Further details

Format of the MMPM CD info file

The MMPM CD player stores the information about CDs in the file CDP.INI in the MMOS2 folder.
This file is in binary OS/2 profile format and should be accessed by the suitable profile functions.

The applications are the CD keys, calculated as follows:

MMSSmmss.ff     Example: 46043612.40
MM
total length of the CD, minutes [00..99]
SS
total length of the CD, seconds, truncated [00..59]
mm
difference from the first track to the last track, minutes [00..99]
ss
difference from the first track to the last track, seconds [00..59]
ff
difference from the first track to the last track, frames (1/75 s) [00..74]
CDs with only one track have mmss.ff = 0000.00.
Within this application the following values ae defined:
IMMCDDiscTitle  CD title, ASCII
1 title track 1, ASCII
2 title track 2, ASCII
...


Contact

Suggestions, help, complaints (but not too much:-): mueller@fulda.net

Original homepage: http://www.fulda.net/~mueller/source/cddbmmcd_e.html