To use xml2abc-js in your own script call "vertaal ()" in the following way:
var xmldata = $.parseXML (abc_code); // abc_code is a (unicode) string with one abc tune.
// the options are passed as a single object, where the members have the same name and value(s)
// as in xml2abc.py. Consult the readme of xml2abc.py for more information on these options.
// Here we just use the defaults by setting them to zero.
var options = { 'u':0, 'b':0, 'n':0, // unfold repeats (1), bars per line, chars per line
'c':0, 'v':0, 'd':0, // credit text filter level (0-6), no volta on higher voice numbers (1), denominator unit length (L:)
'm':0, 'x':0, // with midi volume and panning (1), no line breaks (1)
'p':'f' }; // page format: scale (1.0), width, left- and right margin in cm
var result = vertaal (xmldata, options);
var abcText = result [0]; // the translation (string)
var errorTxt = result [1]; // all information and error messages (string)
Notes: