The Mudcat Café TM
Thread #124451   Message #2750126
Posted By: Mick Pearce (MCP)
22-Oct-09 - 08:01 AM
Thread Name: A really useful program for ABC format
Subject: RE: A really useful program for ABC format
Dick - it's not hard to produce that in Java.

In 2007 I wrote a Java DT browser (actually a general song database browser, but I created a db from the DT). I wanted it mostly in java and it used the Apache Derby database (a pure java database system) to store the db. Tunes were stored in abc and I used abcm2ps and abc2midi to generate postscript and midi files on the fly.

I played the temp midi file from Java (and in fact had a simple one-line karaoke display, trapping the text events and displaying each syllable as the tune played). I modified the java Toastscript postscript viewer to display the music in a window within the browser. (Toastscript is only a Level 1 postscript program, but, although, IIRC, abcm2ps describes its output as Level 2 postscript, I never found any problems in tunes I looked at).

My browser is probably more than you want - it had facilities for maintaining the db, to log changes and generate full/incremental updates for other copies. But it wouldn't be hard to make a simple java viewer and player.

Last year I also implemented a Prolog song browser (using SWI-Prolog). Again that used abcm2ps and abc2midi on the fly. This one uses a 2-way interface with Java to make a full karaoke window for the tunes, displaying the verse and moving highlights. This one uses the internal prolog database to store the songs as Prolog terms (the db is under 20Mb for the version I've got - 2002 DT I think). I display the abc but not the music line, but it would be trivial for me to use the same Java interface and display the music via Toastscript as I did in the Java version. SWI Prolog is freely available for PC, Linux and Mac and is quite small (The installer is about 7Mb).

You could also eliminate abcm2ps and abc2midi by distributing the converted postscript and midi files (I'd guess they'd amount to about 20Mb for 5000 abc files).

Mick