home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sound Sensations!
/
sound_sensations.iso
/
miscprog
/
albumdb
/
readme.cd
< prev
next >
Wrap
Text File
|
1991-07-23
|
6KB
|
153 lines
SUMMARY:
This package implements a database for musical collections consisting of
major items called albums and minor items called cuts. An album
consists of zero or more cuts. A cut belongs to one and only one album.
A database is defined by a master file, which contains a list of data
files. Data files contain information about albums and optionally cuts
within albums. Cut information, if present, must immediately follow the
information on albums. For each database two key files are built: an
Artist key file and a Title key file. These are sorted alphabetically
by key and contain the key string, the data file number (as defined by the
master file), the album number (a sequential counter within the data
file), and the location within the datafile of the beginning of the
album record.
The package consists of two main programs: BLD_KEY, which builds the key
files, and ALBUMS, which allows the user to retreive album information
and assemble cuts for recording.
OBJECTIVES:
The objectives of the package were:
Use ASCII files for ease of editting and other processings
Avoid sequential searches of large text files.
DESIGN:
The database consists of the following files:
master file One per database.
Contains a list of the album files and their format
album files At least one for each medium type (CD, cassette, record)
Contains a list of all albums and optionally cuts.
index file One per album file.
Contains seek locations to each album line (not cut)
key files Two per database (artist and title).
Contains key strings used for searching for each album,
its file and album number, and the seek location of
the album record.
The master file contains a list of all the files in the database. You
can have any number of databases. A data file may be in any number of
databases. A master record is of the format:
file-name|file-type
where file-name is the name of the file containing information on the albums,
and file-type may be 'cd', 'record', or 'cassette'. All albums within
the file must be of the same type (because the format may be different).
The only album file format defined is CD:
artist|title|date(s)|label|number
<white space>cut-title|time|artist
...
where:
artist & title are obvious
date is the date(s) of the recording
label is the label name (MCA, CBS, etc.)
number is the label manufacture's CD catalog number
cut-title and time are obvious
artist in cut line is only needed if different than album artist
(e.g. Various)
Actually, the cut-title lines are optional. If they are included, the
time is optional.
The absolute requirements at this point for the data are:
Album lines must be flush left.
Cut lines must begin with white space.
Empty lines may be used to signal sides within albums or tapes.
Right now, find_cassette and find_record simply call find_cd, but that
could be changed. Each of these routines are to return a vertical bar
separated list of fields. The only assumtion so far is that the first
field is the artist and the second field is the album title. This would
allow each type of file to have a different format relatively transparent
to the programs.
For example, to add support for a file in the cassette program format, a
subroutine find_cassette would be written to:
Read the necessary header lines, depending on studio or concert
type.
Leave the file positioned to the first cut line (which will start
with white space)
Return to the caller a vertical bar separated string with artist and
title in that order.
Searches are done using key strings, which are built by translating all
letters to lower case, removing everything except consonants, the letter
U, and digits. Double letters are eliminated.
For each database, two key files are created. Each album will contain
at least one record in each of the files. Multiple artists (separated
by a tilde (~) will cause an artist record to be created for each
artist.) The key files contains the keys for artist and title and the
seek location of the album record.
key-string|file-number|album-number|seek location
where:
key-string is the key string used for searching
file-number is the number of the album file entry in the master file
album-number is a sequential number (starting w/ 1) for the album file
seek location is the location of the first line of the album record
CURRENT STATUS:
The following programs are working:
bld_key reads the master file and produces key and index files
albums Retreives albums by artist and/or title. Assembles cuts
for recording sides of tape.
To use the system, the following steps are required:
To print the database:
run bld_tbl to create a list of album titles.
To search for albums:
run bld_key to build index and key files.
sort key files using standard sort program
run albums to query the database and compile new tapes
Things not implemented yet:
When an album is retreived, the concept of a side is not retained. This
means that if you build a tape, the program will tell you what album to
find the cut on, but not what side.
The routine to edit the albums selected for taping is not implemented.
This feature will allow you to make tapes of albums not in your
database, as well as to change or supply times that are not in your
database. This means that you don't have to have all the cuts defined
for an album before you use it to make a tape.
Additional album formats are not implemented. The record and cassette
formats have been defined, but are equivalent to CD format.
I don't build a key for cuts, nor do I support artist lookup for cut
artists (e.g. you can look for various, but not for an artist on that
album). If support for cuts were implemented, searching for the cut
artist would be a natural thing to do at the same time.
Lots of other things, I am sure. I just haven't thought of them yet.
(c) Copyright 1991 by William R. Pringle