Man page - jampal(1)
Packages contas this manual
Manual
| JAMPAL(1) | jampal - mp3 library and jukebox | JAMPAL(1) |
NAME
jampal - mp3 library and jukebox
SYNOPSIS
jampal open [ library ] ...
jampal cleanup [ -reorder ] library-name [ moved-file-dir ]
jampal playlist condition [ options ] ...
jampal fieldcodes [ library ]
jampal playlistcd disknum [ output-dir ]
jampal envelope [--artist|--artistalbum|--none] [--nosort] library-name diskser description
jampal duplicates [ --NODUP ] [ --NEXTFILES ]
jampal tagbkup [ bak ]
jampal tagupdate options filename [ filename ] ...
jampal mp3lame [ -recode|-recode-even ]
DESCRIPTION
jampal is a cross platform mp3 song library management system. jampal stores and organizes a library of 60,000 songs or more. It can be used as a jukebox to play the songs. It performs extensive editing of song tags using ID3v2. The library is based on the IDV3V2 standard. The library is extensively customizable. Text to speech voice synthesis to announce song names is an option. The library is organized and customized by ID3V2 tags, including any number of custom tags you can set up. A utility is provided to back up the ID3V2 tags so that your customizations, such as song ratings, are not lost if you have a disk failure. There are utilities to rename and organize the song files by album, artist and song, and to generate playlists from criteria you choose. Generated play lists can be burned to CD or written to an mp3 player. Song announcements can also be added to songs written to CD or player.
CYGWIN UNDER WINDOWS
There are some things that have to be done if this is used with Cygwin under Windows. To install with cygwin, extract the tar file and run "make install". This installs all scripts and programs and adds Jampal to your Start menu in Windows.
Make sure that in the Jampal Customize dialog, under library, the option "Use Unix Style Paths" is checked.
All paths must be set up so that the path is compatible with Windows. This means creating links for example ln -s C:/Music /Music makes the /Music directory compatible. The setup will already handle "Program Files" and the user profile directories. If you store songs in a different directory you will need to set up links. All songs must be accessed from the same drive letter. This can be achieved in windows by creating links, junctions, mounting disks in a directory, or simply putting all files on one disk.
OPEN COMMAND
jampal open [ library ] ...
The open command launches the main jampal GUI application. Detailed documentation can be found by using the Help menu option from the main window.
OPEN COMMAND OPTIONS
library
If the command is run without any parameters, the last library that you had opened will be opened again. Alternatively you can specify the file name of one or more libraries on the command line to open those libraries. The library has a name ending with ".jampal". If no library has been opened before a default library called ~/Music/library/default.jampal is created. If you have changed the LIBDIR specified in your ~./jampal/jampal.conf file, the default library is created there instead. If the specified or last opened library cannot be opened, an error message is displayed and the default library is opened. Normally you will use a GUI based menu to launch this.
CLEANUP COMMAND
jampal cleanup [ -reorder ] library [ moved-file-dir ]
The cleanup command cleans up your library by moving files and renaming them. Make sure that all of your songs are loaded into one library, and that library is located in the directory specified by LIBDIR in ~/.jampal.jampal.conf. The default location is ~/Music/library.
The cleanup command makes sure that all files are named according to song and artist and are under a directory named as Album Name. See section "Setting up your song files" below for an explanation of the directory structure. Songs are moved to new directories as required. Songs are never moved to a different Disk Directory. Disk Directories are never renamed or moved. Songs are ordered within the album by track number. Albums are numbered according to the order they are found on the disk. The order of albums in a disk directory is not changed unless you use the -reorder option.
Songs that are marked for deletion in the jampal GUI application (by setting the value D in the Jampal frame) are moved to a rejected files directory. By default this is at ~/Music/reject. The directory name can be changed by updating the ~/.jampal/jampal.conf file.
When you run the command it will not rename any file or make any change without first giving you an opportunity to review it. It creates a text file report showing all files that will be moved. The report is displayed with "less" and you can use normal paging as used with vi or man pages. Press q when you are finished reviewing it. You are then prompted to run the renames, see the report again, or abort.
After running it reminds you to reload the library. If jampal is open you must use the "File, Reload Library" menu to reload the library. If you forget to do this no harm will result, but trying to access any files that were renamed will fail until you either reload or else close jampal and open it again.
Never run cleanup against a playlist, temporary library, or any library that does not have all of your songs. This would reorganize some files and leave others in their old place.
The cleanup command does many checks before running to make sure it will succeed. If your directory structure is wrong it will tell you and stop. If there are two songs with exactly the same name and artist in the same directory it may give an error message and you will have to rename one.
If cleanup fails or gives any error before you have responded yes to running the renames, nothing has been changed. You can rerun after making any changes you need.
If cleanup fails during the running of the renames, or is terminated for some reason, the library will be incorrect. No songs will have been lost or corrupted. Clear the library (Menu option Edit, Clear Library). Then reload the library by dragging the directory or directories containing the songs from the file explorer, or using the menu "File, Open" to open the directories. If all songs are under a master directory you only have to open that directory. Make sure your rejected items directory is not under the directory structure that you are opening. It will take some time to reload the songs (on a fast machine 15 minutes for 40,000 songs). Then you can run cleanup again.
Setting up your song files
Your library of mp3 files should be backed up on to CDs or DVDs. Name each CD or DVD with a serial number of the form YYMMDD_HHMM_X, using the date and time you created it and any character you please instead of X (e.g. you may want to identify the CDs with one character representing music type).
If you are starting out and they are not yet on CDs or DVDs, create a directory named as described, and put your files in subdirectories under that directory. Put up to 700 MB per CD directory or 4.2 GB per DVD directory. You can name the subdirectories anything you want, or just put them in one subdirectory.
If you have songs without an album name or you have only one or two songs from an album you may not want them put in a separate directory. You can update frame Directory with a directory name that overrides the album name when organizing files on disk. The Directory frame is a "user defined text information frame" with description "Directory". Make sure this frame is listed in "Library Fields" in the customize dialog. Also add this field to the tag editor, and select it in the Display Columns. Now you can enter values in the Directory field and those tracks will be placed in a directory named after that field instead of named after the album.
If you have two albums with the same name and different artists in the same Disk Directory, they will get merged into one. Please change the album names so that they are different. This happens with Album titles like "Greatest Hits". Call the album something like "Demis Roussos Greatest Hits" to prevent this problem.
In order to use cleanup successfully the files in your library must use the following directory structure.
Disk_dir_1
Album_dir_1
Song-file-1.mp3
Song-file-2.mp3
Other songs ...
Album_dir_2
Song-file-1.mp3
Song-file-2.mp3
Other songs ...
Other Albums ...
Similar structure to disk dir 1...
Each Disk Directory is typically a copy one CD or DVD where you have archived the songs. The design of the system expects that you save your mp3 files on CD or DVD and copy them as one directory per CD or DVD. It is optional to have multiple disk directories. You can have up to 999 albums in a single disk directory. Disk directories do not have to all reside under one directory, they can be anywhere on your file systems.
To get started if you have all of your songs under one directory, first move them under a second directory, as follows.
Disk_dir_1
Temp_Album_dir
Song-file-1.mp3
Song-file-2.mp3
Other songs ...
After running cleanup the temporary album directory will be deleted and all songs will be under their respective album directories.
If you have moved files around to get them in this directory structure, open the jampal GUI, clear the library, and reload the songs by dragging the disk directories from the file explorer, or using the menu option to open the disk directories.
CLEANUP COMMAND OPTIONS
-reorder
library
moved-file-dir
If you have moved one or more albums to a new directory you can list the directory here. Jampal will automatically find the files in the library and update the library with their new locations. This saves having to remove and re-add them to the library.
PLAYLIST COMMAND
jampal playlist criteria [ options ] ...
playlist generates a playlist based on a variety of selection and sort criteria. Once the playlist is generated the GUI is opened and the playlist can be viewed or played.
Each playlist is placed in a directory named for the current date and time and playlist name. These directories are stored in the location identified by the PLAYLISTCD parameter in ~/.jampal/jampal.conf. All prior playlists remain available in the directory until you delete them. You can clean up by deleting playlist directories.
A column in the playlist display identifies a disk, directory and song number sequence which is used if you are going to copy the playlist to CD or mp3 player.
After the list is created you are prompted whether you want to copy the songs to a staging directory. Depending on the size of your library and the criteria there may be enough songs for many disks or many player refills. The program prompts you to create as many as you need, one disk full at a time. The disks that can be created are identified by numbers within the playlist and you are prompted to enter a number to identify which set of files to copy. Each disk full is placed in its own directory, so creating more than one will not cause overwriting. If the songs are not copied immediately they can be copied from the playlist later using the playlistcd command. When you have finished burning to CD or copying to player you should delete the staging directories to release the disk space.
In the playlist options described below, many apply only to the files copied to a staging directory. All options apply equally whether you copy when prompted after running playlist or copy later using playlistcd.
There are some examples of playlist commands in the scripts/examples directory.
PLAYLIST COMMAND OPTIONS
criteria
Examples (Quotes as shown are required) :
If Country may sometimes be written in lowercase, uppercase or mixed case, use
Select all songs which contain classic in the Genre somewhere
Select all songs by John Denver that do not have country in the Genre
! match(tolower(GENRE),/country/)´
Select all songs
Select songs based on a table of preferences (see PLAYLIST ENVIRONMENT VARIABLES)
--sort sort-field
Example
--reverse
--announce
In order to use this option you must have lame installed. Lame may not be available with your installation. It is free software and can be downloaded and installed.
--tracksperdir nnn
--startdir nnn
--library library_name
--ann_separate
--speak text
--speak_sep
--dirchange condition
--appendseq
--cdsize nnn
--stagingdir directory_name
--filenumberstart nnn
--playlistname name
--tagupdate tag_setting
´"-ARTIST \"" ID3V2TAGTXXXPeter "/" ARTIST "\""´
--startdisknum nnn
PLAYLIST ENVIRONMENT VARIABLES
PLAYLIST_SEARCH_SETUP
export PLAYLIST_SEARCH_SETUP='
MySearch["Country"]=0.8
MySearch["Rock"]=0.5
MySearch["Pop"]=0.2
MySearch["R&B"]=1'
This sets a criterion so that 80% of Country songs, 50% of Rock songs, 20% of Pop songs, 100% of R&B songs, and nothing else are selected. The criterion that would be used with this in the playlist command is
'MySearch[GENRE] > rand()'
This assumes that Genre values match exactly those values. There is another example in the scripts/examples directory.
FIELDCODES COMMAND
jampal fieldcodes [ library_name ]
Displays a list of fieldcodes included in the specified library
FIELDCODES COMMAND OPTIONS
library_name
PLAYLISTCD COMMAND
jampal playlistcd disknum [ staging-dir ]
Copies a playlist disk to a staging directory. This uses an existing playlist created by the playlist command and does the same operation as is done by the last step of that command.
If the --announce option was used with the playlist command that created the playlist, you must have lame installed. Lame may not be available with your installation. It is free software and can be downloaded and installed.
When running this command you must first change directory to the directory where the playlist is stored. The directory will be named YYMMDD_HHMM or YYMMDD_HHMM_description and will be in the directory identified by the variable PLAYLISTCD in ~/.jampal/jampal.conf.
PLAYLISTCD COMMAND OPTIONS
disknum
staging-dir
ENVELOPE COMMAND
jampal envelope [ --artist | --artistalbum | --none | --album ] [ --nosort ] library-name diskser description
The envelope command prints CD or DVD envelopes for your mp3 disks. It also can prints a song list for songs on an mp3 player.
The envelope command uses OpenOffice.org Writer or LibreOffice Writer. If one of these is not installed an on the path you will see an error message. LibreOffice is available via a free download.
The program scans the library and creates an openoffice write document with the songs listed and the albums listed on a page configured as an envelope. It then opens the document in openoffice. YOu can make any changes you wish, such as typing in headers or your name, then print with openoffice. There are instructions in the jampal HTML help with illustrations on how to cut and fold the envelop page to make a CD envelope. If you are creating a list for an mp3 player just print the list and leave out the envelope page.
The first pages of the document are an insert listing of tracks. The last page is an envelope. If you are making a DVD cover you probably have so many albums that the last page does not hold all the names and actually produces several pages. In that case, use openoffice to insert columns in the last page, sufficient so that it all fits, as follows.
Select menu format, page, columns tab. Select 2 or 3 columns. Then use menu format, table. Reduce the column sizes and reduce the left spacing. After this you may still need to select the whole table and reduce the font size. You can use fractions, such as 6.6 to achieve the correct size so that it fits on one page.
ENVELOPE COMMAND OPTIONS
--artist | --artistalbum | --none | --album
--nosort
library-name
diskser
description
DUPLICATES COMMAND
jampal duplicates [ --NODUP ] [ --NEXTFILES ]
The duplicates command searched for potential duplicate songs in the main library. It scans your main library (specified in ~/.jampal/jampal.conf) and creates a new library called duplicate that contains all of the songs that it suspects are duplicates, sorted so that the potential duplicates are together.
The first column of the library contains a DUMMY column with two numbers. First is a numeric sequence of the song number identified as a possible duplicate. Second is a number identifying which duplicate it is. This makes up the sort sequence, so if you change the order of songs in the duplicate library you can click on this column header and get it back to the initial sequence.
Look at the library and decide if the songs are real duplicates or not. If they are duplicates and you do not want to keep both copies, mark one as rejected. If you want to keep two or more copies mark each with a number in the Dup column. Then in future these will not be shown as duplicates.
Mark a song as rejected by putting D in the Jampal frame (User defined text with description "jampal"). Then running cleanup will move those files to your rejected directory and remove them from the library.
You can fix the duplicates by:
Marking some files for deletion by typing D in the "Jampal" column.
Combining one or more versions into one file using the "Combine Duplicates" menu. This is used if the same song is found on two or more albums. You can save disk space by keeping only one copy of the song on your disk, and still have it show up under each of the albums and track numbers. This will create "Alternative Albums" for all the duplicates in one copy of a song, and flag the extra copies for deletion. Songs marked for deletion are moved when you run the cleanup command. See the online documenattion for more deatils on "Edit, Combine Duplicates".
DUPLICATES COMMAND OPTIONS
--NODUP
--NEXTFILES
TAGBKUP COMMAND
jampal tagbkup [ bak ]
The tagbkup command uses the tagbkup program to keep a backup of your mp3 file tags. This assumes that you have the actual mp3 files backed up somewhere, on CD DVD or hard drive. After you make changes to files by editing the tags you will want to backup the files so that you do not lose the changes. Jampal allows you to store lots of information in the tag, including your personal preferences, which could change at any time. Taking a backup of the entire mp3 file every time you change tags will take a lot of backup space. The tagbkup command takes a backup of the tags of your main library and stores them in a directory identified by the TAGBKUP entry in ~/.jampal/jampal.conf. Make sure you backup that directory regularly. Running tagbkup on a large library can take some time. The command shows its progress in number of files read on the console. Also it shows details of all files changed since the last tagbkup. At the end of a run the program displays the results and asks whether to remove tag backups of files that you have removed. To restore a CD use the following commands (assuming /r is the location of your cdrom and 000904_1758_rest is the location you want to restore the CD to).
. /usr/jampal/scripts/mp3.profile
cd /r
mkdir -p $MAINDIR/000904_1758_rest
tagbkup -v -r -x -d $MAINDIR/000904_1758_rest /r/*/*.mp3 $TAGBKUP/tagbkup
TAGBKUP COMMAND OPTIONS
bak
TAGUPDATE COMMAND
jampal tagupdate options filename [ filename ] ...
General purpose command line program to update or display ID3V1 and ID3V2 tags on mp3 files.
Many files can be updated at once, to update selected values on each file.
This does not interface with your library. If you update tags using this command for songs that are in a library, please open the library, select the songs that were updated and select the menu "Edit, Validate tracks" to refresh the information in the library. If you are not sure which ones you changed you can select all the songs in the library and validate them, but this will take longer.
In the utility directory are some openoffice.org spreadsheets which can be used for updating songs if you have some complicated change that is easier by updating a spreadsheet. The spreadsheet produces a file that can be used as input to tagupdate.
TAGUPDATE COMMAND OPTIONS
-OPTIONFILE optfilename
-ENCODING encoding
-DISPLAY
-SHORTDISPLAY
-NOUPDATE
-TITLE title
-ARTIST artist-name
-ALBUM album-name
-YEAR year
-COMMENT comment
-TRACK track-number
-GENRE genre-name
-ID3V2TAG frame-id value
frame-id is one of the following
XXXXlll for frames that take a language
XXXXllldddddd for frames that take a language and a description
XXXXdddddd for frames that take only a description
APICxxddddd for picture frames
Language code is always exactly 3 lower-case letters.
Picture type is two hexadecimal digits.
Description can be any length. If it includes spaces it must be quoted. It must not be a multi-line value.
Data can be a string or @filename to read from a file
For pictures @filename must be used and the extension of the file must be a recognized image file type (jpg, jpe, jpeg, bmp, png, gif)
If values include spaces or newlines they can be quoted. Multi-line values can be used in Linux, Cygwin or Unix. With Windows, multiline values cannot be used on the command line. To supply multi-line values in Windows either (1) use @filename and store the value in a file or (2) Install Cygwin and run the program from the Cygwin command line.
If any values are specified as empty (i.e. two quotes with nothing between), the frame is deleted from the tag
When updating files, any existing frames not explicitly updated are left unchanged.
All text values are trimmed (blanks, tabs, new-lines are deleted from the front and end).
The PRIV frame cannot be updated, except to delete it. The program does not cater for updating binary data in this case.
-SYNCHRONIZE
filename
MP3LAME COMMAND
jampal mp3lame [ -recode|-recode-even ]
Converts files in a directory to mp3 using lame or re-encodes mp3 files. If you use no input option, it encodes all wave files in the current directory that have extension wav. It encodes to 128K mp3.
In order to use this command you must have lame installed. Lame may not be available with your installation. It is free software and can be downloaded and installed.
This command checks the number of CPUs in your system and runs many files at one time, so that if you have two or more CPUs it can finish in the shortest time.
When either of the recode options is used, the ID3V2 tag is copied to the new file after the recoding is done.
If the songs were in a library, you should delete them and re-add them to the library after doing this.
MP3LAME COMMAND OPTIONS
-recode
-recode-even
FILES
~/Music/library/default.jampal, ~/Music/library/playlist.jampal, ...
~/Music/library/default.jmp, ~/Music/library/playlist.jmp, ...
~/.jampal/jampal_initial.properties
ZZAlbums.txt
~/.jampal/jampal.conf
ENVIRONMENT
mp3lib_skip
DIAGNOSTICS
Library needs to be saved: file-name
SEE ALSO
tagbkup(1)
WEB
http://jampal.sourceforge.net
| March 8, 2011 | jampal |