Jampal todo 

Put latest "maintenance release" online.

Change fragments for mp3cover.sh to use latest open office format

current: %%
DONE Duplicate songs - a frame for alternative albums / tracks - these loaded separately
DONE  into the library. For playlist only load one entry, for library load all. 
DONE  A flag (possibly option) in the library to turn this on. Default on for library off for playlist
DONE   (alternateAlbums ?) - this means tracks added or updated will have all entries inserted.
DONE   Otherwise added will only have main entry or entry dropped, updated will only update existing entries
DONE   already there
DONE  How to handle deletions - for library only allow deletion of primary - deletes all 
DONE    for playlist they can be individually deleted
DONE  Drag and drop - virtual entries can be dragged and dropped
DONE    if dropping uses file flavor must check the virtual sequence number in track flavor
DONE    if dropping on library must load all virtuals - dropping one library on another may mess up 
 indication in the display of "virtual" entries. - italics ?
   font chooser ?  Background color ?  FG Color ? Also maybe change last playing indication
   Icons for indication ? Icon at the start of the first column. 
DONE  Comments with English and Jampal:Albums description. album name:track per line
NO Virtual entries to have V in col 0.
 mp3lib to handle renaimg and removing of virtual entries in tandem with real entries.
 A separate track object for each virtual track.
NO: Hashmap with filename:nn as key for virtual tracks
DONE  LibraryTrack.readMp3File - currently returns a file - change to return a counter of virtual tracks,
DONE    amend the method to include an extra parameter for the virtual track number required.
DONE  Librarytrack constructor takes a file and assumes only 1 track is constructed. **never used - remove **
DONE  Library.upateTrack assumes only 1 track results from reading a file - it will
DONE    update the primary entry, then if a nonzero number was returned proceed with the other entries
DONE  Error handling for bad or nonnumeric value for virtual number
DONE  Check occurrences of status
 Check occurrence of trackMap.get(fileName) - may need to modify filname parameter or loop
DONE  Instead of using key of filename:nn, leave as it but chain additional entries off it
DONE  Transfer object needs to have alternate num as a field
DONE Delete tracks to be fixed check for trackMap.remove(fileName)
 Check on track.toLibraryRec(attributes)
 updateLibraryTrack(track); to make sure new value A00 U00 etc written
DONE Potential problem - when dragging entries around in a library - may get duplicates popping up
DONE - suggest that if originating library is the same one - do not duplicate - otgerwise duplicate
DONE Remove commented lines of code done 
 
 Update documentation
 Table & tag updater for alternate albums
 
 
DONE Playlist allow duplicate entries ??
NO filename:nn:mm for duplicated tracks in a playlist ?
Wrap in launch4j
launch with mp3 files to play them via default playlist
tagbkup - latest microsoft compiler or mingw compiler or java
ptts - latest microsoft compiler or mingw compiler or java / com bridge ? 
  SF - JCom (Java-COM Bridge)
  SF - JACOB - Java COM Bridge - newer
test scripts on linux
playlist script sometimes loses a title announcement
Fix warnings from compile (java 5).
Repeat option ??
indicator for lyrics ?


Testing
Each test with a standard track and one with alternates -
    Drop new files on library
    Drop new files on playlist
    Drop existing files on library
    Drop existing files on playlist
    Put other library cursor in a strange place -
        Update tag in library (file that is in both) - add entries
        Update tag in playlist (file that is in both) - add entries
    copy files, clear lib, paste files.
    2 dummy tags with values - 
        Drag within library
        Drag within playlist
        Drag to library
        Drag to playlist
        ** When recipient library is missing some columns dummy is not copied
    Delete from library
    Delete from playlist
Drop large playlist on library
Drop large library on another library
Drop large library on playlist
Customize Playlist to library
** All OK to here
Follow option on play - 
    Normal tracks
    first one is alternate
    second one is alternate
    both are alternate
Verify tracks
    normal valid & invalid
    alternate valid & invalid
    alternates in list invalid
    Load and save library
Add alternates while in lib or playlist. make sure all updated in all libs
Update alternates while in lib or playlist. make sure all updated in all libs
Remove all alternates while in lib or playlist. make sure all updated in all libs
Update genre, make sure all copies in all libs updated.
Test that library updtaes are always saved correctly in case jampal dies

Scripts to fix
mp3lib.sh    
             - error if main track missing but others exist. Update jmp file names
             - option to specify playlist which then instead gives error if any duplicate filenames
             - only process main entries unless playlist specified
mp3cover.sh  - 
             - only process main entries unless playlist specified
mp3dup.sh    - only process main entry             
playlist.sh  - process all entries without reservation. Make sure generated playlist has appropriate 
               col 0 entries
playlistcd.sh - process all entries without reservation
tagbkup.sh   - only process main entries

Indicator for follow separate from playlist designation.

/proj/cvs/jampal/temp-testdata/playlist-cd/make-cd_080218_1825
/proj/cvs/jampal/scripts/playlistcd.sh 1


PASS  2 002-061-000 Montezuma - Nazca
PASS  2 002-062-000 The Voyage - Nox Arcana
PASS  2 002-063-000 Alexandra - Gnomusy
Command:sox c:/temp/mp3/002-063-000-title.wav c:/temp/mp3/fixed-title.wav stat 2>&1 | grep Length
sox error
result was
Command:sox c:/temp/mp3/002-063-000-title.wav  -r 44100 -c 2 c:/temp/mp3/fixed-title.wav vol 2.2 2>> /Music/playlist-cd/make-cd_0801
23_1738_peter_car/playlistcd.792.errlog 1>&2
sox error
Command:lame -t -f c:/temp/mp3/002-063-000-title.wav c:/temp/mp3/title.mp3 >> /Music/playlist-cd/make-cd_080123_1738_peter_car/playl
istcd.792.errlog 2>&1
lame error
tagbkup -cm error
PASS  2 002-064-000 Hell On Wheels - Cher
PASS  2 002-065-000 Thugz Mansion - 2 Pac
Command:sox c:/temp/mp3/002-065-000-title.wav c:/temp/mp3/fixed-title.wav stat 2>&1 | grep Length
sox error
result was
Command:sox c:/temp/mp3/002-065-000-title.wav  -r 44100 -c 2 c:/temp/mp3/fixed-title.wav vol 2.2 2>> /Music/playlist-cd/make-cd_0801
23_1738_peter_car/playlistcd.792.errlog 1>&2
sox error
Command:lame -t -f c:/temp/mp3/002-065-000-title.wav c:/temp/mp3/title.mp3 >> /Music/playlist-cd/make-cd_080123_1738_peter_car/playl
istcd.792.errlog 2>&1
lame error
tagbkup -cm error
Searching /Music/library/peter.jmp Bombay - Golden Earring  Not found: /Music/next/6/001 Dutch top songs of 1977/118 Bombay - Golden
 Earring.mp3 ...
found /Music/CD/080217_1700/001 Dutch top songs of 1977/118 Bombay - Golden Earring.mp3
PASS  2 002-066-000 Bombay - Golden Earring
PASS  2 002-067-000 Jumping The Gun - Meat Loaf
PASS  2 002-068-000 Forever Your Girl - Paula Abdul
PASS  2 002-069-000 I'm Jealous (Red Disc) - Shania Twain

tagbkup Version 1.05 (c) 2004 Peter G. Bennett
Cygwin version.
Copy V2 tags
Number of files processed = 1
tagbkup Version 1.05 (c) 2004 Peter G. Bennett
Cygwin version.
Copy mp3 data
Number of files processed = 1
tagbkup Version 1.05 (c) 2004 Peter G. Bennett
Cygwin version.
Copy mp3 data
Copy V1 tags
Number of files processed = 2
c:\Products\cygwin\usr\local\bin\sox.exe: Can't open input file 'c:/temp/mp3/002-063-000-title.wav': No such file or directory^M
Could not find "c:/temp/mp3/002-063-000-title.wav".
tagbkup Version 1.05 (c) 2004 Peter G. Bennett
Cygwin version.
Copy V2 tags
Number of files processed = 1
tagbkup Version 1.05 (c) 2004 Peter G. Bennett
Cygwin version.
Copy mp3 data
Error - Unable to open file c:/temp/mp3/title.mp3
Number of files processed = 0
tagbkup Version 1.05 (c) 2004 Peter G. Bennett
Cygwin version.
Copy mp3 data
Copy V1 tags
Number of files processed = 2

PASS  2 003-085-000 Isono Sami Sentombi - Ladysmith Black Mambazo
PASS  2 003-086-000 Sister Christian - Night Ranger
PASS  2 003-087-000 It's a Free World, Baby - R.E.M.
ERROR, see /Music/playlist-cd/make-cd_080123_1738_peter_car/playlistcd.792.errlog

peter@PANTHER /Music/playlist-cd/make-cd_080123_1738_peter_car
$

Drop files with dummy cols to a new lirary - one dummy value is
copied to all dummy values in recipient - TransferObject.updateLibrary (l 89 - 98)

File encoding in the library different between linux and windows
Need some way to validate file if artist name has changed, e.g. key in new name
Way to refresh library from files e.g. if tags have changed

Dup check - allow a way to ignore dup number

Try this under linux - 
-Dfile.encoding=Cp1252

Debugging - remote debugging options
-agentlib:jdwp=<sub-options>
transport=nn,address=nn
-agentlib:jdwp=transport=dt_socket,suspend=y,address=7001

Document changes - MRU files, alternate tracks, dups in playlists 

DONE BUG: Customize under linux - adding alternate - cannot key in title - Remove focuslistener
DONE BUG: Languange drop down defaults to wrong thing - initialize combo box selection
Linux - Play - progress bar shows a number - try suppress.
Linux - control-c - not working for copy
DONE BUG - After creating an alternate tag, sort messed up, search by keys does not work. should be canceled.
DONE BUG - After creating an alternate tag, other library sort messed up, editing of a track mesed up. Should add track at end? or edit & sort should be canceled.

playlistcd if swift fails should try again in pass 2

Change announcement to use composer for classical.

DONE Customize alternates and follow in customizer.
Remove commented lines
compile tagbkup linux
DONE tagbkup does not confirm that it is linux version ..

Linux and windows - use espeak for speech - multi language
UTF-8 for library
Property in library properties for encoding - set to UTF-8
For tags - if can encode in ISO-8859-1 then do that else use UTF-16
In bash, LC_CTYPE=UTF-8; export LC_CTYPE;
Save script files as UTF-8
Fix language file - remove del
Font selection ?

-Dfile.encoding=Cp1252 

DONE 3/21/2008 Exception while reloading library after customizing:

java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0
	at java.util.Vector.get(Unknown Source)
	at pgbennett.jampal.MainFrame.updateSelection(MainFrame.java:2155)
	at pgbennett.jampal.MainFrame$1.actionPerformed(MainFrame.java:348)
	at javax.swing.Timer.fireActionPerformed(Unknown Source)
	at javax.swing.Timer$DoPostEvent.run(Unknown Source)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)
    
New Inno setup that does not complain on Vista about unknown publisher    

Jampal plays at low quality unless you select "Java Sound Audio Engine" mixer

Available Mixers:
Primary Sound Driver
SoundMAX Digital Audio (emulated)
Playback through TotalRecorder (emulated)
Modem #0 Line Playback (emulated)
Bluetooth AV/HS Audio (emulated)
Java Sound Audio Engine

DONE Add Audio mixer selection

Downloaded songs from mp3fiesta have id3v2.4 with encodings of 03 = UTF-8
in frames. Microsoft explorer and media player reject id3v2.3 tags with 
encoding 03 - need to recode when saving. At the same time maybe add support for 
updating to UTF-16


Frames requiring 'Text encoding" : "T000" - "TZZZ"
TXXX WXXX IPLS USLT COMM APIC USER OWNE COMR 
[not supported]
GEOB SYLT 

Font selection - use from pbackup - to allow unicode chars etc.
For most of the program? searches, displays, editing
Change library file to utf-8

ID3V2Frame.java - parseData() -
Check frame and encoding, recode if nec for varsion 3

MPFile.setMp3Field - 
IV3V2Tag.setGenericFrame to take 2 strings instead of 1
1st string encode with ISO-8859-1
2nd string encode with ISO-8859-1 or UTF16
Numeric and URLS must be ISO-8859-1
WXXX is backward 1st string UTF second ISO

-DDEBUG=Y -Xincgc -Xmx256M  -Dfile.encoding=CP1252 
-DDEBUG=Y -Xincgc -Xmx256M  -Dfile.encoding=UTF-8

DONE createExtendedId is not working - decodes the whole thing including Lang

encoding - 
T000-TZZZ and TXXX 
WXXX
IPLS
USLT
SYLT
COMM
APIC
GEOB
USER
OWNE
COMR



DONE Bug - m3j not working
DONE test m3u
DONE validateTrack is not updating track info on the display after fixing.

DONE Validate tracks moves alternate to next to main (in a library and a playlist)
DONE Validate tracks removes entries from playlist

DONE Can validate be made to include album if possible ?

DONE Use windows media asx files for recordings instead of musicmatch export. awk script to convert the xml

DONE BUG - press enter after updating P column jumps across to another column if columns were reordered

Use Collators for sorting, comparing - allow collator selection 
java.text.Normailzer (java 1.6) for removing diacritics

iconv - 
ANSI_X3.4-1968 ANSI_X3.4-1986 ASCII CP367 IBM367 ISO-IR-6 ISO646-US ISO_646.IRV:1991 US US-ASCII CSASCII
CP1252 MS-ANSI WINDOWS-1252

export LC_ALL=en_US.UTF-8 

combining diacritical marks - 
0300-036F
1DC0-1DFF
20D0-20FF
FE20-FE2F

Decompose - NFKD
"�ffin" "A\u0308ffin" 
java.text.Normalizer
reg ex like [\u0080-\uff00] can be used

Run dialog options in NetBeans
pgbennett.jampal.Jampal
/Music/library/testing.jampal
-DDEBUG=Y -Xincgc -Xmx256M 

pgbennett.utility.TextSimplifier
-i UTF-8 -o UTF-8  C:\proj\cvs\jampal\work\test_utf.txt  C:\proj\cvs\jampal\work\test_utf_out.txt

pgbennett.id3.TagUpdate
-OPTIONFILE /temp/test.data -ENCODING utf-8

Filename windows Invalid chars /\*?:"<>| or less than 000A
Linux /

Linux accepts UTF-8 on commands, windows does not
cygwin does not
utf8-cygwin - http://www.okisoft.co.jp/esc/utf8-cygwin/

_w_fopen allows UTF-8 translation

tagupdate - allow for a file input so that utf-8 chars can be used

launchpad.net for translations
translations using gettext ?

DONE FIX awk - FILENAME is a reserved word but we are using it - not good

** Upgrade UBUNTU

espeak - example
C:\Program Files\eSpeak\command_line>espeak -stdin -m
<speak xml:lang="af">
my pen is in my hand
</speak>
<speak xml:lang="en">
my pen is in my hand
</speak>
<speak>
<voice xml:lang="af">
my pen is in my hand
</voice>
</speak>

<speak>
<voice name="afrikaans">
my pen is in my hand
</voice>
</speak>

<speak>
<voice xml:lang="af" gender="female">
my pen is in my hand
</voice>
</speak>

<speak>
<voice xml:lang="af" gender="female">
<prosody rate="10"> DOES NOT WORK
my pen is in my hand
<prosody>
</voice>
</speak>

"C:\Program Files\eSpeak\command_line\espeak" -stdin -m
<speak xml:lang="fr">
Bonjour mes enfants, asseyez vous.
Je m'appelle Pierre. Comment vous appellez vous?
Je M'endors Dans Tes Bras.
Go�t de poisson.
</speak>

<speak xml:lang="en-wi">
Removed          # This should be used if you are sharing library files between Windows and Linux
        # export JAMPAL_JVM_OPTIONS="-Dfile.encoding=Cp1252"

Done: Fix so JAVA_HOME does not have to be used
Bug: open library menu item under linux does not filter for libraries

Internationalize - use xgettext ? Use messages as keys to the strings ? default should return the key itself?

This problem is fixed in jampal 1.17. You will have to reload your song into the library after installing the new version of Jampal. (i.e. delete it from the library and add it again).
If you still get an error with the new version please let me know what is the error message.
Let me know if you cannot run version 1.17 of Jampal.
Version 1.17 will only work with java version 6.

Languages - 
Allow multiple languages on tag - a button to add extra ones at end and a button to delete from end. (or simply set unused ones to blank)
Announcements will be done in last language mentioned
Table of announcement options -
1 default engine and voice
2 per language engine and voice
3 engine / voice for other languages (espeak)

Steps:
1. espeak for playlist english only (done)
2. espeak for jampal english only (spawn process). done
3. playlists - language selection, use a properties file
4. jampal - language selection, use a properties file
5. mbrola option playlist
6. mbrola for jampal
7. jampal - updating properties file
8. JNI ?
Data file - in home directory/.jampal
language code, engine, voice
including a default for blank and one for others
Slash separators. Blank entry - empty string, others use "other".
LATER-Multiple languages, up to 3 - 1st for title, next for part in square brackets, next for artist - can use angle brackets they are not used <>
LATER-What if diff languages use diff engines - how will if combine ? - only support with espeak
voices.txt # = comment. Other lines lang/engine/voice. one entry with empty language. one entry with "other". Option in engine for None.
Multiple languages in library - one after the other in library. Match against last language for announcement.

Tooltips for customization, other places.

These files may be used to download the list of language codes with their language names, for example into a database. To read the files, please note that one line of text contains one entry. An alpha-3 (bibliographic) code, an alpha-3 (terminologic) code (when given), an alpha-2 code (when given), an English name, and a French name of a language are all separated by pipe (|) characters. If one of these elements is not applicable to the entry, the field is left empty, i.e., a pipe (|) character immediately follows the preceding entry. The Line terminator is the LF character. 
In the ISO 639-2 standard, two code sets are provided in which the language codes are the same except for 22 of the 450+ languages that have alternative codes. One set is for bibliographic applications, often referred to as ISO 639-2/B, and the other for terminology applications, referred to as ISO 639-2/T. The choice of the set used must be made clear by exchanging partners prior to information interchange.

These alternative codes in ISO 639-2 exist for historical reasons. At the time that ISO 639-2 was developed, there already was a well-known and widely used language code list that had been used for over 30 years in bibliographic systems which was largely adapted for the 3-character code set . At the same time there was the 2-character code list (now called ISO 639-1, previously ISO 639), which covered far fewer languages than those for bibliographic applications. There was a desire by some participants for the 3-character codes for languages that were already in the 2-character list to generally share the same 2 characters. In 22 cases the existing bibliographic code was very different than the 2-character code (because it was based on a different form of the language name), but the impact on existing bibliographic systems with millions of records using those well-established codes would have been enormous if a new 3-character code were adopted. Thus, these alternative codes were used for those languages. The alternative codes should be considered as synonyms; there is no overlap in codes between the B and the T list.

The bibliographic or terminology code set must be used in its entirety, and the choice of the set used must be made clear by exchanging partners prior to information interchange. Users shall refer to ISO 639-2/B for the code set for bibliographic applications and ISO 639-2/T for the code set for terminology applications. 

Use Itemevent instead of disable to prevent combobox changing when not selected...

cd "C:\Program Files\Jampal"
"C:\Program Files\Java\jre6\bin\javaw.exe" -Xincgc -Xmx256M -classpath jampal.jar;C:\Products\looks\liquid\liquidlnf.jar;C:\Products\looks\napkin\napkinlaf-1.2.jar;C:\Products\looks\looks-2.3.0\looks-2.3.0.jar;C:\Products\looks\squareness\squareness.jar  pgbennett.jampal.Jampal

liquid - https://liquidlnf.dev.java.net/ LGPL - extra options
jgoodies - http://www.jgoodies.com/freeware/looks/index.html - no license mentioned
squareness - http://squareness.beeger.net/ - BSD license
nimrod - http://personales.ya.com/nimrod/index-en.html - LGPL - themes http://www.gnu.org/copyleft/lesser.html.
lipstik - http://sourceforge.net/projects/lipstiklf/ - GPL
PGS - https://pgslookandfeel.dev.java.net/ - apache license - options
infonode - http://www.infonode.net/index.html?ilf - GPL
easynth - no 
napkin -  locks up - http://sourceforge.net/projects/napkinlaf/ - BSD
fh - no
JTattoo - no