The scripts in this distribution are Copyright (C) 2005 by Steffen Beyer. All rights reserved. The scripts in this distribution are free software; you can redistribute them and/or modify them under the same terms as Perl itself. The scripts in this distribution are intended for use under Windows; but they should also work under Unix - in that case you may want to strip the "Janus" code at the top of the scripts, though, which is needed to make them executable both under Perl and as a batch script under Windows. This means that you need to have Perl installed on your machine. The scripts "wav2mp3.bat" and "wav2mp3bat.bat" also need an executable "lame" in your PATH; see e.g. http://mitiok.free.fr/ for a version for Windows, or see the "lame" project homepage at http://lame.sourceforge.net/. "lame" parameters are hard-coded into the scripts; currently they are set to a constant bit rate of 320 kbps, stereo, and high quality. Change them as you like. The scripts "lc.bat", "uc.bat" and "ucfirst.bat" will also need the Perl module "Date::Calc" to be installed in your Perl tree. wav2mp3.bat: In order to work, the script "wav2mp3.bat" needs two parameters: a directory path where the WAV files to be converted are located, and a metafile, either in the directory given (takes precedence) or the current directory (if no absolute path is given). This metafile must contain, on separate lines: Artist Album Name Year Genre Track Title #1 Track Title #2 Track Title #3 Track Title #4 ... ... An emtpy line will leave the corresponding tag in the resulting MP3 file empty. The "Genre" may be a name or a number, see the "lame" documentation in "html/id3.html" for possible values. The track titles may be the list of WAV files, for example, e.g. from a "dir" command (you need to remove the date, time and file length in that case, though). Some standard transformations (e.g. "_" to blank and stripping of extraneous blanks) are provided; others (like capitalizing the first letter of each word) could easily be added; e.g.: $Title = join('', map { ucfirst(lc($_)) } split(/([^a-zA-Z0-9'\x80-\xFF]+)/, $Title)); as a first approach (but see the scripts "lc.bat", "uc.bat" and "ucfirst.bat" described further below). The track titles exported by "Exact Audio Copy" (see http://www.exactaudiocopy.de/), which are downloaded by "Exact Audio Copy" from www.freedb.org, can also be used directly (you only need to adjust the Artist, Album Name, Year and Genre on separate lines). See the enclosed sample metafiles for examples. The resulting MP3 files are written to the same directory as the WAV files. The filenames are derived from the track number (i.e., the line number in the metafile minus 4) and the title (from the metafile, from the corresponding line). Standard transformations are provided, e.g. illegal characters and blanks to "_". This will lead to an automatic renumbering (!) of the output files in cases where the input files are not from a contiguous range of tracks (this is a feature, not a bug). The input WAV files are automatically sorted in numerical (!) order (i.e., _NOT_ in string order as in a directory listing!) in order to map the WAV files to the corresponding entries in the metafile. Therefore the WAV files are required to have a track number either at the beginning or at the end (just before the ".WAV" extension) of their name. wav2mp3bat.bat: The script "wav2mp3bat.bat" further automates the conversion of a multiplicity of directories containing WAV files. A top directory is required to contain all the subdirectories (= one per album) with the WAV files to be converted. This is the first parameter. The second parameter is the path of the base destination directory where all the converted MP3 files will be stored in subdirectories having the same name as their corresponding source subdirectories. Each source subdirectory (= one per album) is required to contain a metafile (as described above), which must have the file extension ".txt". There may be no other ".txt" files in the subdirectories or the corresponding subdirectory will be skipped with a warning message. The destination base directory and its subdirectories are created first if necessary. Optionally, more than one pair of top (source) directory and base destination directory may be given on the commandline. wav2mp3bat2.bat: Similar to wav2mp3bat.bat, but also renames the original .wav file to the same name as the resulting .mp3 file (exept for the different file extension, of course). wav2mp3bat3.bat: Same as wav2mp3bat2.bat, but codes with variable bit rate 192 kbps instead of the fixed 320 kbps. makemp3.bat: A shortcut to call wav2mp3bat2.bat with frequently needed parameters. mkstubs.bat: The skript "mkstubs.bat" is called before calling "wav2mp3bat.bat", with the same directory parameter as the latter, in order to write rudimentary metafiles into each subdirectory, which must then be edited by hand to add the artist, album title, year and genre. Alternatively, more than one top directory may be specified on the commandline. lc.bat, uc.bat, ucfirst.bat: These scripts allow you to lowercase, uppercase and lowercase with first letter of each word uppercased, respectively, the contents of any text files whose filenames are given as parameters. The scripts assume the ISO-Latin-1 (ISO-8859-1) character set and correctly convert all the additional characters with accents. Wildcards in filenames are allowed. ls.bat: This script allows you to pretty-print a recursive listing of the directories and files given as parameters on the commandline. Wildcards in filenames or directory names are allowed. move_mp3.bat: This script will only work under Windows; for Unix, some slight changes in the commands issued by the "system" statements must be provided. This script will move all MP3 files found in all subdirectories of the given first directory argument to equally named subdirectories (created first if necessary) of the second directory argument, by first copying them and then deleting the original MP3 files. Alternatively, more than one source directory may be specified on the commandline. The last parameter on the commandline is always the target directory (multiple target directories are not supported). disjoin.bat: This script allows to compare lists, e.g. listings of MP3 files, for example in order to find out which files have already been backuped to CD or DVD and which ones still need to be archived. See http://sb.fluomedia.org/download/disjoin/ for more details. flatten.bat: The script "flatten.bat" is called with the same directory argument(s) as "wav2mp3bat.bat" and "mkstubs.bat". It renames all the WAV files it finds in the subdirectories of the given directory (or list of directories) according to their numerical order, determinded by the track number which is part of their filenames, either at the beginning or at the end (just before the ".WAV" extension), to "NN_TrackNN.wav", where "NN" is the track number extracted from the original filename.