next up previous contents index
Next: Tablature Up: abctab2ps User's Guide Previous: Text   Contents   Index

Subsections

Scores


Multi stave music

abctab2ps supports multi stave music (scores). There are two different ways for the notation of scores. You can either define the different voices in V: lines at the end of the header just before the first music line and use inline V: references "[V:...]" to associate music lines with specific voices, as in the following example:

X:1
T:Sonata II
C:B. Marcello, 1712
M:C
L:1/8
K:DDorian
%
V:F clef=treble    name=Flauto space=+5pt
V:B clef=bass      name=Basso  
%
Q:"Adagio"
[V:F] ad fe/d/ eA z A | dd d/e/f/g/ aA z a | 
[V:B] d2 d'2 ^c'2 =c'2 | =b2 _b2 aa/g/ fd |

Alternatively, you can write all music of a specific voice immediately after its voice definition. In this notation the above example reads:

X:1
T:Sonata II
C:B. Marcello, 1712
M:C
L:1/8
K:DDorian
%
Q:"Adagio"
V:F clef=treble    name=Flauto space=+5pt
ad fe/d/ eA z A | dd d/e/f/g/ aA z a | 
%
V:B clef=bass      name=Basso  
d2 d'2 ^c'2 =c'2 | =b2 _b2 aa/g/ fd |

The syntax of a voice definition is

V: <label> <par1>=<value1> <par2>=<value2>  ...

where <label> is used to switch to the voice in later V: lines. Each <par> = <value> pair sets one parameter for the current voice. <par> can be any of the following parameters or abbreviations:

Parameter Abbrev. Example Description
name nm nm="Violin I" This sets the long version of the voice name, to be written before the staves at the start of a piece. If the string contains \\, this is interpreted as a line break and the pieces are writen above each other.
sname snm snm="Vl. I" Short version of the name, written before subsequent staves.
clef cl clef=bass Chooses the clef (treble, alto, or bass). It can also be bass+8 and so on.
staves stv stv=2 This is the number of staves (starting from the current one) to connect by tall vertical bar lines.
brace brc brace=2 This is the number of staves (starting from the current one) to be grouped together with a brace. When this option is used, the name defined in the same V: line is written at the centre of the brace.
bracket brk brk=4 The number of staves to be grouped together by a bracket. This option does not change the way in which the names are written.
space spc spc=40 This defines or modifies the vertical space between this staff and the one below it. The space can be given in pt (default) or with a unit in the form 1cm or 0.4in. Furthermore: if a + or - sign comes after the start of the number, the value is an increment to be added to or subtracted from the default setting.
gchords gch gch=0 This controls whether any guitar chords embedded in the current voice are actually written. True/false are specified as for the %% formats.
stems stm stems=up This is parsed but not yet used in the program.
octave   octave=-2 Silently ignored by abctab2ps for compatibility with abc2midi.

The various settings (key, default length, etc) are maintained for each voice separately. Guitar chords, first and second endings, and line breaks are taken from the top voice only. Vocals can be set under each voice separately.


Polyphonic music

More than one voice on a single stave (polyphonie) is currently not supported by abctab2ps. However, there is Jean F. Moine's version of abc2ps named abcm2ps which handles up to two voices per stave. This does not sound too exciting, but if you consider that each voice can consist of chords, you will realize that almost all kind of music can be written in two voices.

In abcm2ps, a pseudo comment of the form

%%staves <definition>
determines on which staves the voices go. <definition> must contain all the voice names with any pair of "[]", "{}" and "()": When this pseudo comment appears inside a tune, the postscript generation is restarted as if there was a new tune.

Since abcm2ps is based on an older version of abc2ps, it only accepts the voice parameters clef, name or nm, snm. The other definitions are ignored.


next up previous contents index
Next: Tablature Up: abctab2ps User's Guide Previous: Text   Contents   Index
Christoph Dalitz 2011-04-26