abcCairo
abcCairo is a project to extend the powerful abc2mps program developed and maintained by Jean-Francois Moine. The abcCairo project adds the ability to generate PNG, SVG and PDF image files from the abc source using the Cairo library. The ability to generate PostScript is retained, but the old SVG generation mechanism is not maintained and has been removed.
In order to be able to build abcCairo on a Linux system, you will need to install these packages:
libcairo2-dev
libpango1.0-dev
These will give you the Cairo and Pango libraries, together with the header files needed to be able to compile programs using these libraries. Note that these packages have further dependencies, so you will probably end up installing more than just these two libraries. You can then build abcCairo with the command
make
executed in the abcCairo directory. This relies on Makefile
, which you
will find in this directory. The code should be distributed with a working
Makefile
, but if you run into problems, you can try rebuilding it with
./configure
to run the configure script.
Building abcCairo without the Pango Library
It is possible to build a version of abcCairo which does not use the Pango libraries. This makes use of the Cairo "toy" text interface, which is less powerful than Pango but still allows you to render most of the unicode characters that you are likely to need. This uses Makefile_no_pango to build it. To build, first do
make -f Makefile_no_pango clean
This gets rid of any object files and executables that you previously built with Pango. Then do
make -f Makefile_no_pango abcm2ps
This may be useful if for some reason the Pango library is not readily
available on your system. The -f
option to make
causes it to use a
specified file rather than looking for Makefile
or makefile
.
Building abcCairo without relying on Linux Packages
Advice on building abcCairo on other systems is given in the file build_guide.txt
Usage
abcCairo [options] file [file_options] ..
where:
file input ABC file, or '-'
options and file_options:
.output file options:
-E produce EPSF output, one tune per file
-CPNG produce PNG output using Cairo, one tune per file
-CSVG produce SVG output using Cairo, one tune per file
-CPDF produce PDF output using Cairo, one tune per file
-PPDF produce PDF output using Cairo, tunes fitted on pages
default is PostScript output, tunes fitted on pages
-O fff set outfile name to fff
-O = make outfile name from infile/title
-i indicate where are the errors
.output formatting:
-s xx set scale factor to xx
-w xx set staff width (cm/in/pt)
-m xx set left margin (cm/in/pt)
-d xx set staff separation (cm/in/pt)
-a xx set max shrinkage to xx (between 0 and 1)
-F foo read format file "foo.fmt"
-D bar look for format files in directory "bar"
-p format for bagpipes regardless of key
.output options:
-l landscape mode
-I xx indent 1st line (cm/in/pt)
-x add xref numbers in titles
-M don't output the lyrics
-N n set page numbering mode to n=
0=off 1=left 2=right 3=even left,odd right 4=even right,odd left
-1 write one tune per page
-G no slur in grace notes
-j n[b] number the measures every n bars (or on the left if n=0)
if 'b', display in a box
-b n set the first measure number to n
-f have flat beams
-T n[v] output the tablature 'n' for voice 'v' / all voices
.line breaks:
-c auto line break
-B n break every n bars
.input file selection/options:
-e pattern
tune selection
.help/configuration:
-V show program version
-h show this command summary
-H show the format parameters
-S secure mode
-q quiet mode
Below is the README from the original abcm2ps.
abcm2ps
Overview
abcm2ps is a C program which converts music tunes from the ABC music notation to PostScript or SVG.
Based on abc2ps, the Postscript generator for ABC music notation by Michael Methfessel, it was first developped to print barock organ scores that have independant voices played on one or many keyboards and a pedal-board (the 'm' of abcm2ps stands for many or multi staves/voices). Since this time, it has evolved so it can render many more music kinds.
Note that this program is at end of life. Its successor is abc2svg.
Features
The features of abcm2ps are based on the ABC draft 2.2 (February 2013). The differences are listed in the abcm2ps/abc2svg documentation.
Installation and usage
The installation procedure is described in the file INSTALL. To build the program with default settings run
./configure
make
Basically, the program usage is:
abcm2ps [options] file1 [file1_options] file2 [file2_options] ...
where file1, file2, .. are the ABC input files.
This will generate a Postscript file (default name: Out.ps
).
Run abcm2ps -h
to know the list of the command line options.
Documentation
- abcm2ps.rst describes all command-line options.
When abcm2ps
is installed, it may be read by man abcm2ps
.
- the features and format parameters are described in http://moinejf.free.fr/abcm2ps-doc/index.html
Links
Author's page: http://moinejf.free.fr/
To know more about the ABC music notation, have a look at http://abcnotation.com/
Guido Gonzato maintains many abcm2ps binaries and more documentation at http://abcplus.sourceforge.net/