XChords usage

XChords 0.3 online demo

All You need is Firefox 1.5 (the easiest way to see results) and this link.

XChords 0.3 installation and usage at your computer:

Download xchords.0.3.zip at your comp and unzip it somewhere - d:/projects/xchords for example.

From Your command line in project root dir type 'ant -projecthelp'. It will lists all targets and short description. If not, check your java and ant configuration. Look also in /docs directory. Email me. Just don't sit silently. ;)

Dependencies: I've tried successfully xchords with Java 1.5, ant 1.6.1, batik 1.6, fop 0.20.4, online demo with tomcat 5.5.9. XSLT stylesheets are working with xalan (note the redirect:write extension element), it could be used with saxon also, but you must change appropriate extension element in XSL files - it is commented now)

Configure appropriate paths in cfg/env.properties file. And then run the targets, which will make the rest. My usual usage is:
'ant targetname -Dparam.archive=basic'. Replace targetname with plain, svg, htmlpic and so on targets. If you have your own file with chords, use its name instead of basic.

Many things are hardcoded, but it is working, as I need. If you need parametrization and extension, let me know.

Changes from 0.2:

New startup and configuration style - through ant. If you don't have java and ant, try it. If you can't for any reason, it's still here the old way of startup scripts. Look at XChords 0.2 and then later at docs/startupscripts.txt for description. However, I don't maintain them, correct them and the docs, if they are wrong. If you want similar scripts for other OS, write them. I will support only ant way, because it's OS independent.

The main difference is, that throught ant you can have input and output anywhere at the comp, through old startup scripts it was in subdirectories /data and /out in project dir, which is not good. Also the startup scripts are not dealing very good with environment variables and with params. Use ant way, if possible.

XChords 0.2:

You need fop.0.20.4, batik.1.1.1, jre - possibly anything higher than 1.3 (I use java/1.5.0_01 now, but for long time was using 1.3.1_02). New versions will not be tested against lower versions than java 1.5.

Download it all, setup on your disk. Edit /bin/setter.bat, /bin/svg2pdf.bat, /bin/svg2raster.bat. You need to setup the correct paths. After this, change directory to xchords/bin and try to run:
plain basic or
webpage basic yes 140 210 png or
pdf basic yes 140 210.
If all these three commands work, you did everything perfectly and you can further experiment with XChords.

If you are on other platform than Windows, try to write your own startup scripts. They are very simple. Share them then with me. Or you can directly call java from command line as written below.

How to view results

There is generated basic_svg.html file, which is just index of links to *.svg files.
Firefox: Download at least version 1.5 beta1 and You will have native SVG support!
IE: You can download SVG plugin from Adobe and view html files, than click on links and the svg graphics is shown.
Batik: You can view each svg file separately only, but you can perform transformations over it and save in jpeg/png/tiff formats.br/> There is more software, which could be used for viewing svg graphics. These are the basic ways. (for me)

XChords 0.1 info (should still work):

XChords is XSLT utility. You need XSLT processor - I use Xalan for Java.

This is the command line, I use:
java org.apache.xalan.xslt.Process -IN chords.xml -XSL svg.xsl -OUT chords_svg.html -PARAM showfingers yes
where chords.xml is your XML file with XChords definition of chords, svg.xsl is my stylesheet, chords_svg.html is resulting index HTML file and parameter showfingers could be yes or no.

Well, you also need to have xalan.jar, xerces.jar on your classpath, properly setted JAVA_HOME and PATH to JAVA_HOME/bin.

There are .bat files in the zip file /bin directory, which define location of these files and values of the environment variables. Redefine them and then you can easily run something like that:
svg basic yes
It will take basic.xml file in ../data directory and produce basic_svg.html file and *.svg files in ../out directory, with finger numbers turned on.

svg basic no
will produce basic_svg.html file and *.svg files in ../out directory, with finger numbers turned off.

Similarly you can call
plain basic
to get textual representation of chords in basic_plain.html file (in ../out directory).

The .bat files is just for fast call. If you are on other system than Windows, you can prepare your own (probably .sh) startup files. You can share it with me.