Not logged in

abc2svg is a set of tools written in Javascript and based on abcm2ps.

It permits to edit, display, print and play music from files written in ABC.

Its specific features are described (with abc2svg!) in the document abcm2ps/abc2svg features and the parameters in abcm2ps/abc2svg parameters.

Web usage

abc2svg may be used in any web browser. The needed files are available in my site
They are updated on release change.

These files are:

When looking at a ABC file in a web browser, you may also use a bookmarklet as this one for rendering all tunes, or this one for rendering the tunes one by one.


Then, you may edit and save both files.
There may be only one included file.

nodeJS usage

Installed via npm, the abc2svg package comes with the command line (batch) programs abc2svg and abc2odt.

These ones may be used as abcm2ps to generate XHTML or ODT files.

abc2svg writes to standard output:
        abc2svg > Out.xhtml

abc2odt output is abc.odt or the file specified by the command line argument -o:
        abc2odt -o my_file.odt


If you want to build the abc2svg scripts in your machine, you must first get the files from chisel, either as a tarball or a Zip archive (click Timeline and then in the top commit), or by cloning the repository in some directory:

fossil clone abc2svg.fossil
fossil open abc2svg.fossil

Then, building is done using the tool ninja or samurai.
You may do it:

        NOMIN=1 samu -v

        samu -v

If you also want to change or add music glyphs, you may edit the source file font/abc2svg.sfd. In this case, you will need both base64 and fontforge, and run

        samu -v font.js

If you cannot or don't want to install ninja or samurai, you may build the abc2svg files by ./build which is a shell script.


After building the abc2svg scripts, you will be able to generate music sheets from the command line as you did with abcm2ps, thanks to the following shell scripts (the result goes to stdout):

backend scripts

By default, the batch scripts generate (XHTML+SVG) files.
This output may be modified by backend scripts. These ones must appear just after the command.
There are:

PDF generation

abctopdf is a shell script which converts ABC to PDF using one of the previous shell scripts and the program rsvg-convert.
As a constraint, the used music font must be installed and defined by %%musicfont <fontname>.
        abctopdf -o my_file.pdf

MEI support

As an experimental feature, an extented core mei2svg-1.js may be generated. This one may handle both the ABC and MEI notations.

In browser mode, the script abcemb-1.js loads either abc2svg-1.js or mei2svg-1.js after checking the music notation type (%abc or X: is ABC, <mei is MEI - see this tune for an example).

In batch mode, the script abcqjs also loads the right abc2svg core according to the source file extension (.abc or .mei).