2
%% mxlyrdoc.tex: Manual for the MusiXTeX lyrics package musixlyr
4
%% Copyright (C) 1996-2003 Rainer Dunker
6
%% This document is free software; you can redistribute it and/or modify
7
%% it under the terms of the GNU General Public License as published by
8
%% the Free Software Foundation; either version 2 of the License, or
11
%% This document is distributed in the hope that it will be useful,
12
%% but WITHOUT ANY WARRANTY; without even the implied warranty of
13
%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
%% GNU General Public License for more details.
16
%% You should have received a copy of the GNU General Public License
17
%% along with this document; if not, write to the Free Software
18
%% Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26
%% E-mail: rainer.dunker@web.de
28
\documentclass[twoside]{article}
29
\usepackage{musixtex,multicol,makeidx}
33
\textwidth210mm \advance\textwidth-2in % These format settings
34
\textheight297mm \advance\textheight-2in % can be freely changed!
35
\advance\textheight-\headheight \advance\textheight-\headsep
36
\footskip0pt \topmargin0pt \evensidemargin0pt \oddsidemargin0pt
39
\parskip0.5ex plus 0.25ex minus 0.25ex
50
\renewenvironment{theindex}
55
\def\printcmd#1{{\tt\char92 #1}}
56
\def\ci#1{\printcmd{#1}\bci{#1}}
57
\def\bci#1{\index{#1@\printcmd{#1}}} % "blind" command index entry
60
\let\myqnwidth\qn@width
63
\def\musixlyr{{\tt musixlyr}}
65
\def\var#1{\hbox{$\langle$#1$\rangle$}}
66
\def\oneversespace{\par\vspace*{2mm}}
67
\def\twoversesspace{\par\vspace*{7mm}}
75
\title{\musixlyr\ --- a \musixtex\ Extension Package for Lyrics Handling
77
\author{\copyright\ Rainer Dunker 1996--2003\\
78
{\tt rainer.dunker@web.de}}
83
{\small\sl (The page layout of this document is tailored to A4 paper
84
format, but the text width and height can be freely changed in order
85
to meet other paper sizes; no part of the layout relies on a
88
{\parskip0pt\tableofcontents}
92
\section{Introduction}
95
\subsection{Basic concepts}
97
\musixlyr\ is a set of \TeX\ macros to be used with Taupin \musixtex\
98
(version T.52 or later) for typesetting vocal music. Its purpose is
99
to compensate two drawbacks of \musixtex's lyrics handling:
101
\item Typesetting lyrics with the ``native'' \musixtex\ commands
102
\verb|\zcharnote|, \verb|\zsong| etc.\ tends to be quite
103
inefficient, particularly if the lyrics have to be changed or
104
corrected. The idea underlying \musixlyr\ is to separate lyrics
105
coding from music coding and let \TeX\ weave them together with as
106
little manual interference as possible. As a result you can enter
107
and edit lyrics (nearly) as easily as normal text.
108
\item \musixtex\ has no built-in mechanism for centering hyphens between
109
syllables and for handling hyphenation at long melismas. This is
110
implemented in \musixlyr\ following the example of engraved music.
115
\subsection{New since version~2.0}
117
\musixlyr~2.0 provides the following major enhancements:
119
\item Support for lyrics on multi-staff instruments
120
$\longrightarrow$~section~\ref{multi-staff-instruments}
122
\item Melisma declaration as part of the lyrics definition,
123
i.\,e.~within \ci{setlyrics}
124
$\longrightarrow$~section~\ref{melismas}
126
\item Improved scheme for vertical lyrics positioning
127
$\longrightarrow$~section~\ref{vertical-positioning}
129
\item Facility for posting lyrics anywhere on a staff, even where no
130
notes are present at all
131
$\longrightarrow$~section~\ref{lyric*-verse-numbers}
134
These new features are especially interesting when \musixlyr\ is used in
135
conjunction with \PMX:
137
\item Automatic detection of upper/lower voice context in
138
a two-voice staff; explicitly addressing lyrics commands to
139
auxiliary lyrics with \ci{auxlyr} is no longer required
140
$\longrightarrow$~section~\ref{auxlyr-attachment}
142
\item Context-dependent lyrics settings that do not need to be
143
adressed to absolute instrument/staff numbers, making lyrics
144
assignment robust against part extraction
145
$\longrightarrow$~section~\ref{assignment-by-context}
148
Finally, a few improvements have been made that do not bear explicit
149
new features but work rather behind the scenes:
151
\item No more \TeX\ register allocations for each verse name newly
152
defined by \ci{setlyrics} or \ci{copylyrics}; the use
153
of those registers has been replaced by macros.
155
\item Due to the abandoned per-verse register allocations, the
156
\ci{enableauxlyrics} command is obsolete. It is retained for the
157
sake of backward compatibility, but it has no effect.
159
\item Slightly more robust processing of undefined verses. An error
160
is raised immediately when an undefined verse is assigned to a
161
staff/instrument, and the undefined verse name is implicitly
162
defined as having empty lyrics. This avoids obscure errors in later
163
stages of \TeX\ processing.
166
The current version~2.1c is mainly a bugfix version of~2.0, with a few
167
functional additions:
169
\item Possibility to add additional lyrics to an existing lyrics
170
definition without discarding the remainder of the current lyrics
171
line contents; useful if lyrics are defined in several portions
172
spread over the score (see~\ref{appendlyrics}).
173
\item The \musixlyr\ version is identified by the predefined macro
174
\verb|\musixlyrversion|, enabling other \TeX\ code to check for
175
version compatibility (according to a suggestion by Dirk Laurie).
178
Suggestions for other useful things are welcome.
182
\subsection{Backward incompatibility issues}
184
The following properties make \musixlyr\ versions~2.$x$ incompatible
188
It is no longer possible to represent ``empty syllables'' by
189
empty \TeX\ environments `\verb|{}|' within \ci{setlyrics}; see
190
also section~\ref{empty-syllable}.
193
Within \ci{setlyrics}, the underscore character has got a
194
special meaning and thus can no longer be used as usual; see
195
section~\ref{melismas-by-underscores}.
198
By default, auxiliary lyrics are now placed vertically {\em
199
above\/} (no longer below) the staff they are assigned to; see
200
section~\ref{auxlyr-vertical-position-default}.
204
The following bugfix of \musixlyr~2.1b also implies a slight backward
208
At the beginning of a music line (system), lyrics have often been
209
right-shifted because \musixlyr\ has assumed MusiXTeX's horizontal
210
``zero'' position as the left boundary for lyrics positioning. Now,
211
lyrics are allowed to extend into the left margin as far as
212
required for centered placement under/above the note.
214
Although this is a more ``natural'' behaviour, it may lead to
215
collisions between lyrics and other stuff (like dynamic marks) that
216
have not occurred using older \musixlyr\ versions. In such a case,
217
there are two ways to solve the problem:
220
\item Restore the former \musixlyr\ behaviour globally by saying
224
near the top of your score source.
226
\item Right-shift the colliding lyrics where necessary using
227
\ci{lyroffset} (see~\ref{lyroffset}).
233
\subsection{Restrictions}
236
\item \musixlyr\ does not influence the \musixtex/{\tt musixflx}
237
spacing algorithm in order to make the notes spacing dependent on
238
the space requirements of the lyrics. See section~\ref{horizpos}
239
about how spacing problems are handled.
241
\item \musixlyr\ seems to work correctly in my preferred working
242
environment, but I cannot exclude problems in situations I have
243
not undergone (especially concerning the use of \musixtex\
244
preprocessors, the \musixtex\ extension library, and past or
245
future \musixtex\ releases). Thus it is important that you point out
246
encountered bugs and incompatibilities to me; there is little
247
chance that I notice them on my own.
249
Please do also bother me if you find this manual --- or parts of
250
it --- incomprehensible or incomplete.
255
\section{Installation}
257
Put the {\tt musixlyr.tex} file into a directory that is included in
258
your \verb|TEXINPUTS| search path --- that's all. (Refer to your local \TeX\
259
documentation for details on this.)
265
Before using \musixlyr\ macros, state
266
\begin{quote}\verb|\input musixlyr|\end{quote}
267
near the beginning of your source file but {\bf after} the
268
\verb|\input musixtex| (\LaTeX: \verb|\usepackage{musixtex}|)
273
\subsection{Entering lyrics}
276
\subsubsection{Lyrics as lines of words}
278
As opposed to the ``vertical'' music construction of
279
\musixtex, \musixlyr\ treats lyrics ``horizontally'' as {\em lyrics
280
lines.\/} Each separate ``thread'' of words is a separate lyrics
281
line; thus, in the following example\footnote{Excerpt from
282
``Tourdion'' by {\sc Pierre Attaignant} ({\sl ars
283
musica\/} vol.\,4, M\"oseler Verlag Wolfenb\"uttel/Z\"urich)},
287
{Quand je bois du vin clai-ret, a-mi tout}
288
\setlyrics{alto}{Le bon vin nous}
289
\setlyrics{tenor}{Bu-vons bien, bu-vons mes a-mis,}
290
\copylyrics{tenor}{bass}
291
\assignlyrics4{soprano}
293
\assignlyrics2{tenor}
295
\setsongraise3{-1.5mm}
299
\generalmeter{\meterfrac32}
305
\NOtes\wh{`e}\sk\sk\sk\ha e&%
306
\wh g\sk\sk\sk\ha e&%
307
\wh b\sk\sk\sk\ha b&%
309
\NOTesp\wh{`e}&\wh{'b}&\wh e&\hup e\en
310
\NOtes\sk\ha{`e}&\sk\ha{'b}&\sk\ha e&\qa{fg'a}\en
311
% force hyphens of incomplete words:
312
\def\atnextbar{\znotes\lyric{}&\lyric{}\en}%
317
there are four lyrics lines notwithstanding that two of them consist
320
Note that the number of lyrics lines does not depend on the number
321
of staves: Any number of lyrics lines (including none) can be attached
322
to each staff (more about multiple lyrics lines per staff in
323
section~\ref{multilyrlines}).
326
\subsubsection{Setting up a lyrics line}
328
A lyrics line is set up using the command
330
\ci{setlyrics}\verb|{|\var{name}\verb|}{|\var{words}\/\verb|}|
332
where \var{name} is a name\footnote{This name must not contain
333
backslashes or commas. Most other characters do not cause problems;
334
however, it is safer to use only letters and digits.} for the lyrics
335
line (e.\,g.\ the name of the voice singing these lyrics) and
336
\var{words} is the complete text where multi-syllable words must be
337
given {\bf hyphenated.} For example, the soprano lyrics of the above
338
example are set as follows:
342
\setlyrics{soprano}{Quand je bois du vin clai-ret, a-mi tout}\end{verbatim}
345
Important notes on using \ci{setlyrics}:
348
Within the lyrics definition, spaces and hyphens are used to
349
split the whole text into words or syllables. If you want a space
350
or hyphen appear {\em within\/} a word/syllable, use the command
351
\verb|\space| or \ci{lyrhyphenchar}, respectively, instead.
353
\label{empty-syllable}%
354
If you want the lyrics attachment to skip over a note,
355
i.\,e.~a certain note shall not receive a syllable, you may
356
achieve this by inserting an empty syllable in the \var{words}
357
text. However, neither a ``really empty'' syllable (i.\,e.~two
358
consecutive separating spaces) nor an empty environment \verb|{}|
359
will work, but you may use either \verb|{\empty}| or
360
\verb|\empty{}| for this.
362
Normally, the \ci{nolyr} command (discussed later in this
363
manual) should be used for this purpose, but an empty syllable may
364
be more handy if it occurs in only one of multiple assigned
365
verses; see also sections~\ref{melismas-by-underscores}
366
and~\ref{multilyrlines}.
368
Note that, since lyrics lines are cut into pieces which are
369
processed separately, you cannot apply things like temporary font
370
changes in the usual manner (i.\,e.~using \TeX\
371
environments). See section~\ref{layoutpar} about how to accomplish
374
Applying \ci{setlyrics} to an already defined \var{name}
375
redefines the lyrics line. This may be useful at very long pieces
376
because setting up and applying lyrics in smaller portions
377
(e.\,g.\ movement by movement) saves both time and memory.
379
It is possible to specify melismas --- that shall occur later when
380
a verse is attached to the music --- already within
381
\ci{setlyrics}; see section~\ref{melismas-by-underscores} for
386
There are two variants of the \verb|\setlyrics| command available:
389
If several voices have the same lyrics, you do not have to copy
390
and paste the lyrics for each further voice; just say
391
\begin{quote}\ci{copylyrics}\verb|{|\var{from name}%
392
\verb|}{|\var{to name}\verb|}|\end{quote}
393
to set up a lyrics line named \var{to name} with the same contents
396
Applying \ci{setlyrics} to an already defined \var{name}
397
has the effect of discarding all previous contents of \var{name},
398
even if part of the lyrics is still pending for being
399
processed. If you want to {\em append\/} further lyrics to an already
400
existing lyrics line instead --- without interrupting the
401
processing of the current lyrics contents ---, use the command
404
\ci{appendlyrics}\verb|{|\var{name}\verb|}{|\var{words}\/\verb|}|
406
instead of \verb|\setlyrics|.
407
% A warning about performance loss due to \appendlyrics's material
408
% accumulation may be added here; it should occur only if \golyr
409
% jumps to or near to the lyrics beginning are performed.
413
\subsubsection{Assigning lyrics lines to staves}
415
{\bf Note:} During the following discussion, the term {\em staff\/} is
416
used wherever \musixtex\ would precisely use the term {\em
417
instrument\/} instead, assuming that lyrics are posted to single-staff
418
instruments only. However, everything also applies to the assignment
419
of lyrics to staves of multi-staff instruments; see
420
section~\ref{multi-staff-instruments} about how to use lyrics in a
421
multi-staff instrument context.
423
To assign a lyrics line to a staff, say
424
\begin{quote}\ci{assignlyrics}\verb|{|\var i%
425
\verb|}{|\var{name}\verb|}|\end{quote}
426
where \var i is the instrument number (counted as usual from bottom to
427
top) and \var{name} the name of the lyrics line.
429
The resulting assignment can be redefined everywhere. This is useful
430
if the arrangement of voices on staves changes within the score; when
431
a voice is continued on a different staff at the next system, use
432
\ci{assignlyrics} (preferrably enclosed in \verb|\atnextline{...}|) to
433
make the respective lyrics line follow this change without
434
interrupting the flow of words.
436
If a lyrics line is assigned to instrument \var i and you want it to be
437
continued on a different instrument while assigning no other lyrics line
438
to instrument \var i, you must explicitly cancel the former assignment by
439
saying \ci{assignlyrics}\verb|{|\var i\verb|}{}|.
441
{\bf Caution:} Never assign a lyrics line to more than one
442
staff simultaneously; if the same lyrics are needed at
443
several staves in parallel, use \ci{copylyrics} (see above).
445
As a summary of this section, here is the complete ``lyrics
446
definition section'' of the above example:
452
\setlyrics {soprano}{Quand je bois du vin clai-ret, a-mi tout}
453
\setlyrics {alto} {Le bon vin nous}
454
\setlyrics {tenor} {Bu-vons bien, bu}
455
\copylyrics{tenor} {bass}
456
\assignlyrics4{soprano}
458
\assignlyrics2{tenor}
459
\assignlyrics1{bass}\end{verbatim}
462
See also section~\ref{assignment-by-context} about an alternative way
463
to assign lyrics to staves.
467
\subsection{Managing the attachment of lyrics to notes}
471
\subsubsection{Automatic lyrics attachment}
472
\label{auto-attachment}
474
By default, the syllables of a lyrics line are consecutively attached to
475
all {\em spacing\/} notes of the assigned staff. Chords thus receive only
476
one syllable since they usually contain exactly one spacing note.
477
However, this may be different if you are using auxiliary lyrics;
478
see section~\ref{auxlyrics} for details.
480
``Spacing'' in this context means: generated by one of the commands
481
\verb|\qu|, \verb|\hu|, \verb|\wh|, etc.\ and not by \verb|\zqu|,
482
\verb|\zhu|, \verb|\zq|, etc. Spacing or not does {\em not\/} depend on
483
whether the note-generating command is enclosed in \verb|\znotes| or
484
any other \verb|\notes| command. So if any note seems to have been
485
left out by the attachment automatism, first make sure that this
486
note is generated using a command not beginning with \verb|\z|.
488
If the number of words of a lyrics line gets exhausted before all
489
notes of the respective staff are processed, ``???'' is posted at all
493
\subsubsection{Addressing manipulations to lyrics}
495
In the ``ideal'' case, the attachment automatism perfectly distributes the
496
lyrics over the music. In practice, however, situations in which the
497
automatism must be ``helped'' manually are frequent. Such
498
manipulations must be posted within the music code. Here are the
501
\item All lyrics manipulations must be stated inside
502
\verb|\notes...\enotes|.
503
(Exception: melisma specifications within \verb|\setlyrics|, see
504
section~\ref{melismas-by-underscores}).
505
\item Lyrics manipulations solely refer to the lyrics line(s)
506
attached to the current staff (``current'' with respect to the
507
enclosing `\verb|&|' characters).
508
\item Similar to many other \musixtex\ commands (e.\,g.\ for beams
509
and slurs), lyrics manipulations must be issued before the
510
corresponding note commands.
512
Examples in the following sections will illustrate the application.
515
\subsubsection{Melismas}
518
Regarding lyrics and music separately, melismas are no property of
519
either one; instead, they characterize the relation between both and
520
play a role only where music and lyrics occur together. Using
521
\musixlyr, however, lyrics coding and music coding are basically
522
unrelated, but melismas do have to be specified somewhere. You have to
523
decide yourself whether you regard melismas as an attribute rather of
524
the lyrics or rather of the music (this may vary according to the type
525
of score you are preparing, or may even differ within a score);
526
\musixlyr\ provides two corresponding styles of melisma specification
527
which are discussed in the following paragraphs.
530
\item[Melismas as a music property.]
531
Within the music code, a melisma is initiated and terminated by the
534
\hspace*{\fill}\ci{beginmel}\hfill\ci{endmel}\hspace*{\fill}
536
issued before the first and last note, respectively, of the melisma.
537
This left-justifies the current word/syllable, suspends lyrics until
538
after the melisma, and sets up a ``word extension
539
underline''\footnote{I am not sure whether this is the appropriate
540
term; it is taken from the {\sl Finale\/} reference manual.} unless
541
the current word is continued afterwards and thus has to be
542
hyphenated. For example,
548
\setlyrics{melismatic}{a me-lis-ma}
549
\assignlyrics1{melismatic}
551
\NOtes\beginmel\qa{def}\endmel\qa e\en\bar
552
\NOtes\beginmel\qa{def}\endmel\qa g\en\bar
553
\NOtes\beginmel\qa{'a!gf}\endmel\qa e\en\bar
554
\NOtes\beginmel\qa{defe}\en\bar
555
\NOTEs\endmel\wh d\en
566
\NOtes\beginmel\qa{def}\endmel\qa e\en\bar
567
\NOtes\beginmel\qa{def}\endmel\qa g\en\bar
568
\NOtes\beginmel\qa{'a!gf}\endmel\qa e\en\bar
569
\NOtes\beginmel\qa{defe}\en\bar
570
\NOTEs\endmel\wh d\en
573
If a system break occurs within the melisma, hyphenation or underline
574
is continued at the next system, thus automatic line breaking is
577
\item[Melismas as a lyrics property.]
578
\label{melismas-by-underscores}
579
To specify a melisma within a lyrics definition (i.\,e.~within
580
\ci{setlyrics} or \ci{appendlyrics}), simply append an underscore
581
character to a syllable to make it span over an additional note,
582
two underscores to span over two additional notes, and so
583
on. Alternatively, you may append to a syllable a single underscore
584
followed by a number which denotes the number of {\em additional\/}
585
melisma notes: \verb|abc_| is equivalent to \verb|abc_1|,
586
\verb|abc__| to \verb|abc_2|, and so on.
588
No matter which of the two underscore appendix styles you use: If a
589
melismatic syllable is hyphenated to the following one, the melisma
590
denotation must {\bf precede} the hyphen --- for example:
591
\verb|abc__-def| ({\bf not:} \verb|abc-__def|).
593
All melisma properties mentioned above (lyrics suspension, left
594
justification of syllable, word extension underline, system break
595
support) also apply to melismas specified this way. For reference,
596
here is the lyrics definition section of the example above, this time
597
utilizing the underscore melisma technique (note that, in this case,
598
all \ci{beginmel} and \ci{endmel} commands must be omitted in the
602
\ci{setlyrics}\verb|{melismatic}{a___ me_3-lis___-ma_4}|
605
\item[Comparing both points of view.]
606
The music-oriented melisma view (using \ci{beginmel}/\ci{endmel}) is
607
advantageous for music with a rather loose binding to certain lyrics,
608
e.\,g.~folk songs that are to be printed with various verse compilations
609
or in different languages. You may then enter each verse without
610
taking care of melismas because they are coded just once as part of
613
On the other hand, the lyrics-focused melisma style (using
614
underscores) is best suited to pieces with a fixed lyrics-to-music
615
binding; it is easier to type and to read, but less flexible as
616
regards combining the same lyrics with different music. It is
617
especially advantageous for multiple verses (see
618
section~\ref{multilyrlines}) with different syllables-to-notes
619
distribution (see verse~3 of the ``Drunken sailor'' example in
620
section~\ref{versenumbers}); it is much easier to code each verse's
621
melismas individually than tracking all melismas in parallel using
622
the \ci{verses} command (see again section~\ref{multilyrlines}).
625
You may use both styles within the same score but you should avoid
626
activating both melisma types simultaneously at the same lyrics line;
627
the result of such an occurrence is undefined.
631
\subsubsection{Turning automatic lyrics attachment on/off}
633
If the attachment automatism is unsuitable for some
634
situation --- e.\,g.\ at complex polyphonic voicings or wherever you
635
want to place all syllables manually --- you can turn it off using
636
\begin{quote}\ci{lyricsoff}\end{quote}
637
after the last note that shall get a syllable. (If your piece begins
638
with a lyrics-less section, state \ci{lyricsoff} before the first
639
note of a staff.) To re-enable automatic lyrics attachment, use
640
\begin{quote}\ci{lyricson}\end{quote}
641
before the first note that shall get a syllable.
643
If automatic lyrics attachment shall skip over certain single notes
644
only, the \ci{nolyr} command is more suitable (see
645
section~\ref{nolyr-command}).
648
\subsubsection{Lyrics repetition and skipping}
650
As in the following example of a polyphonic piece,
660
{\llabel{amenlabel}A-men!} \assignlyrics1{amen1}
661
\copylyrics{amen1}{amen2} \assignlyrics2{amen2}
664
\itenu0K\beginmel\wh K\sk\sk\sk
665
\midslur2\tten0\endmel\hlp K&%
667
\qa f\lyrnop\lyrpt,\qa g%
668
\golyr{amenlabel}\lclyr\qa h\lyrnop\lyrpt,\qa{_i}%
669
\golyr{amenlabel}\lclyr\beginmel\islurd1h\qa{hg}%
670
\tslur1f\endmel\qa f\en
676
it often happens that some lyrics phrases are repeated by some but
677
not all voices, or that each voice has its individual arrangement of
678
lyrics repetitions. Nevertheless, you do not have to enter
679
these repetitions directly within \ci{setlyrics}; instead, you
680
enter the lyrics as if they were performed in an unbroken
681
sequence. Repetitions and skips are then handled using a ``go to''
682
technique involving the following steps:
684
\item[Labelling ``go to'' targets.] A syllable which has to be jumped at
685
must be preceded (without spaces in between) by
686
\begin{quote}\ci{llabel}\verb|{|\var{label name}\verb|}|\end{quote}
687
within \ci{setlyrics}.
688
\item[Performing jumps.] Within the music code, say
689
\begin{quote}\ci{golyr}\verb|{|\var{label name}\verb|}|\end{quote}
690
before the note at which the jump has to be performed.
692
{\bf Caution:} If you try to jump to an undefined lyrics label, no
693
meaningful error message is produced. However, if \TeX\ reports an
694
error at a \ci{golyr} command, you should check conformity of
695
defined and used labels.
697
The following actions must be taken in special cases:
699
\item[Adding punctuation marks.] Usually a comma or period is
700
appended to the word preceding a jump; this is done by the command
701
\begin{quote}\ci{lyrpt}\var{punctuation char}\end{quote}
702
where \var{punctuation char} can be any single punctuation
704
\item[Removing punctuation marks.] Before adding a punctuation mark
705
to a word as said above, an already existing punctuation mark
706
should be removed by the command:
707
\begin{quote}\ci{lyrnop}\end{quote}
708
\item[Lower case letters.] Words at jump targets often begin with a
709
capital letter which should appear lower case after a jump;
710
this can be forced by the command:
711
\begin{quote}\ci{lclyr}\end{quote}
713
Here is a code excerpt from the above example, summarizing the use of
714
all mentioned commands:
727
{\llabel{amenlabel}A-men!} \assignlyrics1{amen1}
728
\copylyrics{amen1}{amen2} \assignlyrics2{amen2}
731
\itenu0K\beginmel\wh K\sk\sk\sk
732
\midslur2\tten0\endmel\hlp K&%
734
\qa f\lyrnop\lyrpt,\qa g%
735
\golyr{amenlabel}\lclyr\qa h\lyrnop\lyrpt,\qa{_i}%
736
\golyr{amenlabel}\lclyr\beginmel\islurd1h\qa{hg}%
737
\tslur1f\endmel\qa f\en
739
\endextract\end{verbatim}
741
Note that the ``go to'' technique is recommendable mainly if different
742
voices perform different repetitions or skips on the same lyrics; if
743
all voices perform the same sequence of repetitions, however, it is
744
easier to hard-code them within \ci{setlyrics}.
747
\subsubsection{Miscellaneous}
751
\item[Excluding single notes.]
752
\label{nolyr-command}%
753
In the following situation,
758
\setlyrics1{ca-den-za}
761
\NOtes\zqlp{'c}\qu e\en
762
\Notes\qu{'d}\nolyr\cl b\en
764
\NOTes\zhl{'c}\hu c\en
769
the eighth note must be excluded from receiving a syllable. This
770
can be accomplished saying
771
\begin{quote}\ci{nolyr}\end{quote}
772
before the command generating this note.
773
\item[Manual lyrics posting.] When automatic lyrics attaching is
774
switched off, a word or syllable can be placed manually saying
775
\begin{quote}\ci{lyr}\end{quote}
776
before the command generating the note that shall get this
779
This command also works independently from a following note command;
780
you can issue it before a rest, a \verb|\sk| or even alone for
781
itself in order to place a word/syllable wherever you want (no
782
matter whether the attachment automatism is on or off).
784
Manipulations to the posted word/syllable have to be placed {\em
785
before\/} the \ci{lyr} command.
786
\item[Left justification.] Say
787
\begin{quote}\ci{llyr}\end{quote}
788
in order to have the next word/syllable left-justified to the
789
notehead instead of centered.
791
If you prefer to have left justification as the default, say
792
\begin{quote}\ci{leftlyrtrue}\end{quote}
793
before your piece begins (\ci{leftlyrfalse} to restore centered
795
\item[Word extension underlines.] The melisma commands (see
796
\ref{melismas}) automatically manage word extension underlines;
797
however, they can be set manually: Say
798
\begin{quote}\ci{lyrrule}\end{quote}
799
before the respective note command to initiate an underline {\em
800
after\/} the word, and
801
\begin{quote}\ci{lyrruleend}\end{quote}
802
before the note where the underline shall be terminated.
804
Note that no underline will be drawn if the word is continued
805
afterwards so that the underline would interfere with the
807
\item[Horizontal offset.]\label{lyroffset}%
808
To shift a word/syllable out of its default
809
horizontal position, say
810
\begin{quote}\ci{lyroffset}\verb|{|\var n\verb|}|\end{quote}
811
which --- similar to \verb|\roffset| --- moves the next word/syllable
812
\var n quarter note head widths to the right (left if \var n
815
Note that the effect of \ci{lyroffset} may be overridden by
816
automatic lyrics shifting. If you want to gain complete manual
817
control over the positioning, you have to disable the shifting
818
automatism; see section \ref{horizpos} for details.
819
\item[Extra lyrics.] If, as in the following
820
example\footnote{Excerpt from ``In the town where I was born''
821
({\sl Eine kleine Melodie,\/} Strube, M\"unchen 1989)},
831
\setsongraise2{-0.5mm}
835
\setlyrics{lower}{yel-low sub-ma-rine,} \assignlyrics1{lower}
836
\copylyrics{lower}{upper} \assignlyrics2{upper}
838
\Notes\ibl0N0\zqbp0N\ibu1N0\qbp1b&%
839
\ibl2f0\zqbp2d\ibu3g0\qbp3g\en
840
\notes\tbbl0\tbl0\zqb0N\tbbu1\tbu1\qb1b&%
841
\tbbl2\tbl2\zqb2d\tbbu3\tbu3\qb3g\en
842
\Notes\ibl0M0\zqbp0M\ibu1N0\qbp1b&%
843
\ibl2f0\zqbp2d\ibu3g0\qbp3g\en
844
\notes\tbbl0\tbl0\zqb0M\tbbu1\tbu1\qb1b&%
845
\tbbl2\tbl2\zqb2d\tbbu3\tbu3\qb3g\en
846
\Notes\ibl0L{-1}\zqbp0L\hu b&\zhl d\hu g\en
847
\notes\tbbl0\tbl0\lyric{ya,}\qb0K\en
848
\Notes\ibl0L1\lyric{ya,}\qbp0L\en
849
\notes\tbbl0\tbl0\lyric{ya,}\qb0M\en
854
a voice has ``extra'' lyrics (such as ``hmm'', ``ah'', ``ya'', etc.)
855
in addition to the ``main'' lyrics, you need not enter them within
856
\ci{setlyrics} (which would inhibit using \ci{copylyrics});
857
instead, you can enter them directly within the music code using
859
\begin{quote}\ci{lyric}\verb|{|\var{extra syllable}\verb|}|\end{quote}
860
before the note where they shall appear. (Note that the effect is
861
different from using \verb|\csong| which would not apply automatic
862
hyphenation, horizontal positioning control, and \musixlyr's
863
vertical positioning scheme.) Automatic lyrics attaching --- if
864
active --- is suspended at that note. All manipulations can be
865
applied; they must be given before the \ci{lyric} command.
867
If you want the syllable linked to the following one by a hyphen,
868
use \ci{lyrich} instead of \ci{lyric}.
870
It may sometimes be necessary to post lyrics where no note is
871
present at all, i.\,e.~in the empty space between notes. This is,
872
however, possible with \verb|\lyric|, but is is unsuitable because
873
automatic lyrics attachment shall {\em not\/} be suspended at the
874
next note. In this case one of the commands \ci{lyric*} or --- for
875
hyphenated syllables --- \ci{lyrich*} should rather be used; they
876
have no effect on the ``regular'' flow of lyrics.
877
\label{lyric*-verse-numbers}%
878
One application for this are vertically aligned verse numbers. For
885
\setlyrics1{Spring time}
889
\znotes\loffset{2.2}{\verses{\lyric*{1.},\lyric*{2.}}}\en
899
\setlyrics1{Spring time}
905
\znotes\loffset{2.2}{\verses{\lyric*{1.},\lyric*{2.}}}\en
912
(See section~\ref{multilyrlines} about attaching multiple verses
913
to a single staff, a feature that has not been introduced so far.)
915
You may even obtain verse numbers that are repeated at the
916
beginning of each system by enclosing the \verb|\znotes...| command
917
for setting the numbers in \verb|\def\everystaff{...}|.
919
Another possible application --- combined with empty syllables ---
920
is coping with unusual lyrics situations at voltas; for example,
924
\setlyrics1{first pass}
925
\setlyrics2{se-cond pass}
931
\Setvolta1\def\atnextbar{\znotes\verses{,\lyric{}}\en}\bar
933
\znotes\verses{,\lyrich*{}}\en \Setvolta2\setendvoltabox\rightrepeat
934
\NOTEs\verses\lyricsoff\pause\en\bar
935
\NOTEs\ha{gg}\en\setendvolta
947
\setlyrics1{first pass}
948
\setlyrics2{se-cond pass}
952
\Setvolta1\def\atnextbar{\znotes\verses{,\lyric{}}\en}\bar
954
\znotes\verses{,\lyrich*{}}\en
955
\Setvolta2\setendvoltabox\rightrepeat
956
\NOTEs\verses\lyricsoff\pause\en\bar
957
\NOTEs\ha{gg}\en\setendvolta
958
\endextract\end{verbatim}
961
The trick used here is to inject empty syllables into the second
962
verse at the barlines around the first volta; they serve as anchors
963
for the hyphenation suspended under this volta.
965
Note that the \ci{lyric}, \ci{lyric*}, \ci{lyrich}, and
966
\ci{lyrich*} commands cannot be used at staves without assigned
972
\subsection{Horizontal positioning}
975
\musixlyr\ takes care of blank space between words. If a word --- at
976
its default position --- would come too close to or overlap the
977
previous word, it is shifted right in order to ensure a minimum of
978
blank space. This minimal interword space can be set by
979
\begin{quote}\ci{minlyrspace}\verb|=|\var{any \TeX\ dimension}\end{quote}
980
and is initially set to~3\,pt.
982
%The situation is different if two syllables belong to the same
983
%word. Such syllables are allowed to close up; only overlapping is
984
%inhibited by shifting. If the space between such syllables is
985
%narrower than a hyphen, the hyphen is omitted unless you force
986
%hyphens in every spatial situation saying
987
%\begin{quote}\verb|\forcelyrhyphenstrue|\end{quote}
988
%(to restore the default behaviour: \verb|\forcelyrhyphensfalse|). In
989
%this case, enough room is made for the hyphen by shifting the right
990
%syllable if necessary.
992
\leavevmode\label{nicerhyphens}%
993
The situation is different if two syllables belong to the same
994
word. Such syllables are allowed to close up; only overlapping is
995
inhibited by shifting. If the ``natural'' space between such syllables is
996
narrower than a hyphen, the hyphen is omitted and the two syllables
997
close up completely (eventually by left-shifting the second syllable
998
to prevent a small gap). You may though force
999
hyphens in every spatial situation saying
1000
\begin{quote}\ci{forcelyrhyphenstrue}\end{quote}
1001
(to restore the default behaviour: \ci{forcelyrhyphensfalse}). In
1002
this case, enough room is made for the hyphen by right-shifting the
1003
second syllable if necessary.
1005
If the note spacing is quite narrow, lyrics shifting may get
1006
accumulated within a system. In order to prevent shifting words too
1007
far out of their original position, a wider note spacing should be
1008
considered. The command
1009
\begin{quote}\ci{showlyrshifttrue}\end{quote}
1010
marks each lyric shift with a black rectangle of the respective
1011
width, thus making it easy to detect questionable positionings.
1013
If you prefer to completely disable lyrics shifting, set
1014
\ci{minlyrspace} to a large negative value (e.\,g.~$-10$\,cm).
1018
\subsection{Vertical positioning}
1019
\label{vertical-positioning}
1021
By default, \musixlyr\ places lyrics vertically centered between the
1022
two adjacent staves. Lyrics below the lowest or above the topmost
1023
staff of a system are centered around the system's bottom or top
1025
\footnote{This is not necessarily the most reasonable way, but it is
1026
compatible to \musixtex's \printcmd{csong} behaviour.}
1028
In most scores, you will have to deviate from this standard and
1029
manually adjust the lyrics' vertical position. This can be done per
1030
staff with the command
1032
\ci{lyrraise}\verb|{|\var n\verb|}|\verb|{|\var{pos}\var{raise}\verb|}|
1034
which applies the following setting to the lyrics attached to staff
1035
number~\var n: \var{pos} is one of the letters \verb|a|
1036
and~\verb|b|. \verb|a| sets the lyrics above the staff, \verb|b| below
1037
the staff. \var{raise} is a dimension value by which the lyrics are
1038
lifted above (or lowered under, if it is negative) the default
1039
position as mentioned above. \ci{lyrraise}\verb|{|\var n\verb|}{b0pt}|
1040
is the initial setting for all staves.
1042
It is possible to apply changes to the vertical position at any place
1043
within the score, but in most cases it is most reasonable to do so
1044
within \verb|\atnextline{...}| which ensures consistent, even spacing
1047
For the sake of backward compatibility, applying \musixtex's command
1048
\ci{setsongraise}\verb|{|\var n\verb|}{|\var{raise}\verb|}|
1049
implicitly performs a
1050
\ci{lyrraise}\verb|{|\var n\verb|}|\verb|{b|\var{raise}\verb|}|,
1051
but not vice versa --- i.\,e.~\ci{lyrraise} has no effect on lyrics
1052
set with \musixtex's lyrics commands \verb|\csong|,
1053
\verb|\zsong|,~etc. Likewise, the obsolete \musixlyr\ command
1054
\ci{auxsetsongraise} implies \verb|\auxlyr{\lyrraise...{b...}}|, but
1055
not vice versa (see section~\ref{auxlyrics} to learn about the meaning
1060
\subsection{Setting lyrics layout parameters}
1064
\subsubsection{Available parameters}
1067
\item[Font:] There is no special font command; the current font is
1068
used for lyrics. It can be changed using the usual \TeX/\LaTeX\
1070
\item[Minimum length of word extension underlines:] A word extension
1071
underline is omitted if it would become too short. The minimum
1072
length can be set by
1073
\begin{quote}\ci{minlyrrulelength}\verb|=|\var{any \TeX\ dimension}
1075
and is initially set to~2\,mm. If you prefer to completely inhibit
1076
the underlines, set this parameter to an unsurpassably high value
1077
(e.\,g.~the width of your paper).
1078
\item[Minimum inter-syllable distance for multiple hyphens:] If the
1079
space between two hyphenated syllables (or between one of the
1080
syllables and the respective system margin) is wider than this
1081
distance, it is filled with a line of hyphens instead of a single
1082
hyphen. The minimum distance to be filled with more than one
1083
hyphen can be set by
1084
\begin{quote}\ci{minmulthyphens}\verb|=|\var{any \TeX\ dimension}\end{quote}
1085
and is initially set to~15\,mm. If you prefer to completely inhibit
1086
filling with multiple hyphens, set this parameter to an
1087
unsurpassably high value.
1088
\item[Hyphen character:] This can be redefined by:
1089
\begin{quote}\verb|\def|\ci{lyrhyphenchar}\verb|{|\dots\verb|}|\end{quote}
1091
Further layout parameters discussed elsewhere are: vertical
1092
positioning (section \ref{vertical-positioning}), word justification
1093
(section \ref{miscmanip}), minimum interword distance, and forcing
1094
hyphens (section \ref{horizpos}).
1096
{\bf Note:} In order to change the mentioned parameters globally, the
1097
respective commands must be issued {\em outside\/}
1098
\verb|\notes...\enotes|.
1100
\subsubsection{Individual settings per staff}
1103
All layout parameters can be set either globally (applying to all
1104
lyrics lines) or individually, i.\,e.\ valid for a single specified staff.
1105
An individual change is accomplished by enclosing the proper command
1107
\begin{quote}\ci{lyrlayout}\verb|{|\dots\verb|}|\end{quote}
1108
and issuing this within \verb|\notes...\enotes| in the section of the
1109
referred-to staff. For example,
1111
\verb|\notes...&|\ci{lyrlayout}\verb|{\it\leftlyrtrue}...&...\en|
1113
applies italic font and left justification to the lyrics line(s)
1114
assigned to the second staff.
1116
Applying \ci{lyrlayout} to the same staff again overrides
1117
{\em all\/} previous individual settings for this staff;
1118
pay attention to this if you have made several individual settings and
1119
want to reset some but retain others. Saying \ci{lyrlayout}\verb|{}|
1120
restores the global settings for a staff.
1122
The \ci{lyrlayout} command can also be used within
1123
\ci{setlyrics}; this is useful if an individual setting
1124
(especially a font change) should apply to a particular
1125
portion of lyrics rather than to a portion of music. For example,
1127
\ci{setlyrics}\verb|{x}{An |\ci{lyrlayout}%
1128
\verb|{\it}em-pha-sized\lyrlayout{} phrase}|
1130
causes the word ``emphasized'' to appear italic wherever it is posted
1131
within the music. (Be sure to attach \ci{lyrlayout} commands to
1132
the corresponding lyrics portions {\em without\/} blank spaces in
1135
{\bf As an exception,} the {\bf vertical positioning of lyrics} cannot be
1136
changed within \ci{lyrlayout}; instead, it is handled staff-wise
1137
using the special commands discussed in
1138
section~\ref{vertical-positioning}.
1142
\subsection{Multiple verses per staff}
1143
\label{multilyrlines}
1145
An arbitrary number of verses can be assigned to a staff
1146
straightforwardly by saying
1147
\begin{quote}\ci{assignlyrics}\verb|{|\var n\verb|}{|%
1148
\var{names}\verb|}|\end{quote}
1149
where \var{names} is a {\bf comma-separated list} of the desired
1150
lyrics line names, listed from top to bottom. In the following
1151
example\footnote{Excerpt from: ``Non moriar sed vivam'', motet by
1152
{\sc Martin Luther}},
1156
\generalmeter\allabreve
1159
\setlyrics{latin} {Non mo-ri-ar sed}
1160
\setlyrics{german}{Ich wer-de nicht ster-ben, son-dern}
1161
\assignlyrics1{latin,german}
1163
\setsongraise1{-1.5mm}
1165
\znotes\verses{,\lyrlayout{\footnotesize\it}}\en
1166
\NOTEs\wh{'a}\en\bar
1167
\NOTes\verses{\beginmel}\ha{'b}\verses{\endmel}\ha a\en\bar
1168
\NOtesp\beginmel\qup{'a}\en
1170
\NOtes\verses{,\endmel}\qa{'c}\verses{,\beginmel}\itieu0d\qa d\en\bar
1171
\NOtes\ttie0\qa{'d}\endmel\qa c\en
1172
\NOtes\verses{\beginmel}\ha{'d}\en\bar
1173
\NOTes\verses{\endmel}\ha{'ee}\en
1178
the lyrics lines have been set up as follows:
1182
\setlyrics{latin} {Non mo-ri-ar sed}
1183
\setlyrics{german}{Ich wer-de nicht ster-ben, son-dern}
1184
\assignlyrics1{latin,german}\end{verbatim}
1188
\subsubsection{Handling verses individually}
1190
If you code lyrics attachment manipulations the way
1191
described in section~\ref{manipulation}, these manipulations apply
1192
{\em to all lyrics lines\/} of the referred staff {\em
1193
simultaneously.\/} In order to address each lyrics line separately,
1196
\ci{verses}\verb|{|\var{man1}\verb|,|\var{man2}\verb|,|\dots\verb|}|
1198
where \var{man1} is a sequence of commands to manipulate the upper
1199
lyrics line, \var{man2} to manipulate the second lyrics line from
1200
above, and so on. These command sequences may be empty. Delimiting
1201
commas after the last non-empty list entry can be omitted. For example,
1203
\ci{verses}\verb|{,,\beginmel,\golyr{abc}}|
1205
leaves the upper two lyrics lines unaltered, initiates a melisma at
1206
the third, performs a jump to label {\tt abc} at the fourth, and
1207
leaves all further ones (whatever their number may be) unaltered. As
1208
another example, the font change for the german lyrics of the above
1209
excerpt is accomplished by
1211
\verb|\znotes|\ci{verses}\verb|{,\lyrlayout{\footnotesize\it}}\en|
1213
before the first note is coded.
1216
\subsubsection{Vertical positioning}
1217
\label{multiple-vert-pos}
1219
A block of multiple lyrics lines is vertically centered around the position
1220
which a single lyrics line would have taken; thus you can do things
1225
\setlyrics{Winter1}{Win-ter a-de\rlap{,} a-ber dein Schei-den macht\rlap{,}}
1226
\setlyrics{Winter2}{schei-den tut weh\rlap,}
1227
\assignlyrics1{Winter1,Winter2}
1228
\generalmeter{\meterfrac34}
1230
\setsongraise1{-2mm}
1232
\NOtes\qa{ffe}\en\bar
1233
\NOTesp\hup d\en\rightrepeat
1234
\assignlyrics1{Winter1}%
1235
\NOtes\qa{fgh}\en\bar
1237
\Notes\beginmel\Ibu0gf1\qb0g\endmel\tqh0f\en
1242
without having to adjust the vertical position within the
1243
piece. (See the source of this manual for the coding of this
1246
\leavevmode\label{lyrstrut}%
1247
The vertical distance between the baselines of multiple verses is
1248
appropriate for the default 10~points font size of plain \TeX.
1249
However, the size-switching commands \verb|\smalltype|,
1250
\verb|\medtype|~etc.\ do not implicitly adjust the vertical distance
1251
to the chosen font size. Since the vertical distance of lyrics is
1252
controlled by the concept of a {\em lyrics strut\/}\footnote{In
1253
analogy to \TeX's {\tt\char92 strut}; see {\sl The \TeX book\/} by
1254
{\sc D.~E.~Knuth.}}, you should perform this adjustment explicitly with
1256
\begin{quote}\ci{setlyrstrut}\end{quote}
1257
directly after each ``global'' font size change (i.\,e.~after each size
1258
change not issued within \verb|\lyrlayout{...}|;
1259
see~\ref{indivlayout}) unless you do not want the spacing to be
1260
adjusted. (\TeX perts only: If you like to define your own vertical
1261
spacing, you may redefine the \ci{lyrstrutbox} yourself.)
1265
\subsection{Auxiliary lyrics}
1268
If you have typeset two voices of a polyphonic arrangement within one
1269
staff, you normally want to give each voice its own lyrics lines.
1270
Usually, the two voices are distinguished by means of the notes' stem
1271
direction; the lyrics of the up-stemmed voice are typeset above,
1272
those of the down-stemmed voice below the staff. \musixlyr\
1273
provides the facility to maintain such two lyrics ``streams'' per
1274
staff; one of them --- which is handled exactly as described so
1275
far --- will be called {\em main lyrics,\/} the second one {\em
1276
auxiliary lyrics.\/}
1279
\subsubsection{Addressing auxiliary lyrics}
1281
Only two rules are to be obeyed for directing commands to auxiliary lyrics:
1283
\item Enclose everything concerning auxiliary lyrics in:
1284
\begin{quote}\ci{auxlyr}\verb|{...}|\end{quote}
1285
For example, assign lyrics line~{\tt verse1} to staff~2 as
1286
auxiliary lyrics by:
1287
\begin{quote}\ci{auxlyr}\verb|{\assignlyrics{2}{verse1}}|\end{quote}
1288
For example, begin a melisma at the next note of the ``auxiliary'' voice by:
1289
\begin{quote}\ci{auxlyr}\verb|{\beginmel}|\end{quote}
1290
(For \TeX perts: If the argument of \ci{auxlyr} consists of
1291
only one token, the braces can be omitted, so that
1292
\verb|\auxlyr\beginmel| does the same.)
1293
\item There are exactly two exceptions to the first rule. The first
1294
one are the \ci{setlyrics}, \ci{appendlyrics}, and \ci{copylyrics}
1295
commands which need not be enclosed in \ci{auxlyr}\verb|{...}|;
1296
their function is independent of the later use of the defined
1297
lyrics lines as either main or auxiliary lyrics.
1299
The second exception concerns lyrics commands issued as type-1
1300
\TeX\ strings in a \PMX\ source; see below for details.
1303
\label{auxlyr-vertical-position-default}%
1304
Auxiliary lyrics are lifted above the staff by default, i.\,e.~they have
1305
the same vertical position as main lyrics belonging to the staff above
1306
the current staff. If this causes collisions with the main lyrics of
1307
the upper staff, you have to shift the lyrics away from each other
1308
using the vertical spacing commands discussed in
1309
section~\ref{vertical-positioning}.
1312
\subsubsection{Automatic attachment of auxiliary lyrics}
1313
\label{auxlyr-attachment}
1315
While it is easy to attach only one lyrics ``stream'' to a single
1316
voice within a system automatically, the attachment of both main and
1317
auxiliary lyrics involves the task of determining which note belongs
1318
to which voice. Unfortunately, \musixtex\ does not explicitly state a
1319
note's membership of a particular voice; therefore, a heuristic
1320
method has to be used to gather this information. However,
1321
the situation is completely different if you prepare your scores with
1323
\footnote{If you don't know what \PMX\ is, have a look at:
1324
{\tt http://icking-music-archive.sunsite.dk/musixtex/software/pmx/}}
1325
preprocessor. The following paragraphs explain managing the lyrics
1326
attachment automatism for both cases --- \PMX\ and
1327
non-\PMX\ --- separately.
1330
\paragraph{Using \PMX.}
1331
\label{pmx-autodetection}
1333
(This paragraph requires some \PMX\ knowledge.) For \PMX-prepared
1334
scores (which \musixlyr\ detects automagically\footnote{%
1335
This automatic \PMX\ detection may cause problems for processing
1336
\PMX\ scores prepared with the \PMX-unaware \musixlyr\
1337
version~1.0. See section~\ref{no-pmx-autodetection} about how to
1338
solve this backward-incompatibility issue.
1340
between the two voices of a staff works fully automatic. This applies
1341
to both the automatic lyrics attachment as well as explicit lyrics
1342
manipulations --- i.\,e.,~you do not have to use \ci{auxlyr}\verb|{...}| for
1343
manipulating auxiliary lyrics. (This only applies to manipulations
1344
that appear in a voice's context, i.\,e.~within a type-1 \TeX\ string.)
1345
For reference, see the following example\footnote{Excerpt from
1346
``Waldesnacht, du wunderk\"uhle'' by {\sc Johannes Brahms} ({\sl Eine
1347
kleine Melodie,\/} Strube, M\"unchen 1989)},
1352
\setlyrics{soprano}{all der ir-ren Qua-len los.}
1353
\auxlyr{\assignlyrics1{soprano}}
1354
\copylyrics{soprano}{alto}
1355
\assignlyrics1{alto}
1357
\auxlyr{\lyrraise1{a -3\internote}}
1358
\staffbotmarg5.5\Interligne
1359
\stafftopmarg5\Interligne
1363
\startextract\addspace\afterruleskip
1365
\NOtes\zhu{=j}\lower6\internote\qp\lifthpause{-3}\sk\qu h\en
1367
\NOtes\auxlyr\beginmel\roffset{.8}{\isluru2j}\zhup f\lower8\internote\qp\en
1369
\NOTes\zql e\itieu0e\qu e\en
1371
\NOtes\beginmel\islurd1c\zql c\ttie0\tslur2h\auxlyr\endmel\qu e%
1372
\roff{\endmel\tsslur1d\zhl d}\qu{=d}%
1373
\auxlyr\beginmel\itieu0d\hu d%
1376
\NOTes\zhl d\ttie0\auxlyr\endmel\hu d%
1379
\NOTes\zhl a\fermataup l\hu d\hpause\en
1380
\setdoubleBAR\endextract
1384
which can be obtained by the following \PMX\ code (processed with
1390
\input musixtex % These commands are necessary
1391
\input pmx % because pmx.tex MUST be \input
1392
\input musixlyr % before musixlyr.tex!
1394
\setlyrics{soprano} % \setlyrics and \copylyrics
1395
{all der ir-ren Qua-len los.} % need not be enclosed in
1396
\copylyrics{soprano}{alto} % \auxlyr{...}.
1398
\assignlyrics1{alto}
1399
\auxlyr{\assignlyrics1{soprano}
1400
\lyrraise1{a 3\Interligne}}
1402
\let\BM\beginmel % For brevity within the subsequent
1403
\let\EM\endmel % music coding recommended.
1405
1 1 4 4 0 0 3 2 0 5 20 0
1411
r4-6 r2-6 | r4-8 d24s e4 //
1412
c25n a4 | \BM\ f2d s+4 \isu0e{.8}\ e4 /
1414
\BM\ c s \EM\ d2r s d4 //
1415
\ts0e0\EM\ e s+3 dn \BM\ d2 s /
1417
d2 a // % Note that \BM and \EM
1418
\EM\ d s c / % apply either to main
1419
% 5th bar: % or to auxiliary lyrics,
1420
a r+0 // % depending on which voice
1421
d of rb / % they appear in.\end{verbatim}
1424
By default, main lyrics are attached to the lower voice (whose
1425
lines end with \verb|//| in the \PMX\ source), auxiliary lyrics to the
1426
upper voice; due to \PMX\ internals, this ensures that if only one
1427
voice is present, main lyrics are attached to it. However, situations
1428
exist in which it is desirable to have main lyrics attached to the
1429
upper voice, e.\,g.~when you have only main lyrics and want to
1430
synchronize them with the soprano voice instead of the alto voice
1431
(both of them set on the same staff). In this case, you can toggle the
1432
attachment of lyrics to voices with the command
1433
\begin{quote}\ci{lyrmodealter}\verb|{|\var n\verb|}|\end{quote} for
1434
staff number \var n; the command
1435
\begin{quote}\ci{lyrmodenormal}\verb|{|\var n\verb|}|\end{quote}
1436
restores the default behaviour. If $\hbox{\var n}=0$ then the change
1440
\paragraph{Using ``plain'' \musixtex\ without \PMX.}
1442
In this context, there are two basically different modes for lyrics
1445
\item In {\em normal mode\/} (which is active by default) only main
1446
lyrics are provided automatically as described in
1447
section~\ref{auto-attachment}. All auxiliary lyrics must be issued
1448
manually by saying \ci{auxlyr}\ci{lyr} before the respective note.
1449
This mode is useful when you do not have auxiliary lyrics at all
1450
or when auxiliary lyrics occur only occasionally within the piece.
1451
\item In {\em alternative mode\/}, both main and auxiliary lyrics
1452
are provided automatically. The two voices of a staff are
1453
distinguished by means of their notes' stem direction; the lower
1454
voice gets main lyrics, the upper one auxiliary lyrics. This
1455
implies that the automatism fails at stemless
1456
notes\footnote{Ancient notes, namely breve, longa, and maxima, are
1457
also treated as stemless notes by \musixtex's internals.}, thus you
1458
have to provide lyrics manually by saying \ci{lyr} or
1459
\ci{auxlyr}\ci{lyr}, respectively, before such notes. This mode is
1460
meant for staves which continuously contain two polyphonic voices
1461
with separate lyrics.
1464
The appropriate mode can be chosen staff-wise: The command
1465
\begin{quote}\ci{lyrmodealter}\verb|{|\var n\verb|}|\end{quote}
1466
enables alternative mode for staff number \var n; the command
1467
\begin{quote}\ci{lyrmodenormal}\verb|{|\var n\verb|}|\end{quote}
1468
restores normal mode. As stated above, $\hbox{\var n}=0$ performs the
1469
choice affecting all staves.
1471
For illustration, have a look at the following
1472
example\footnote{Excerpt from ``Audite nova'' by {\sc Orlando di
1473
Lasso} ({\sl ars musica\/} vol.\,4, M\"oseler Verlag
1474
Wolfenb\"uttel/Z\"urich)}:
1480
\setlyrics{soprano}{bring her die Gans,} \auxlyr{\assignlyrics1{soprano}}
1481
\copylyrics{soprano}{alto} \assignlyrics1{alto}
1483
\generalsignature{-2}
1484
\advance\stafftopmarg3\Interligne
1485
\advance\staffbotmarg2\Interligne
1487
\startextract\addspace\afterruleskip
1488
\NOtes\zqu g\ql e\en
1490
\Notes\zqu i\beginmel\ibslurd0f\ibl0f{-1}\qb0f\en
1492
\Notes\auxlyr\beginmel\ibsluru1i\zqup i\qb0d\en
1494
\Notes\endmel\tbslurd0e\ql c\en
1495
\notes\ibbu0h{-1}\qb0h\en
1497
\NOtes\auxlyr\endmel\tbsluru1h\zqu h\ql c\en
1499
\NOTEs\auxlyr\lyr\zwh i% The lyrics of the whole notes
1500
\lyr\wh b\en % must be given manually.
1506
The lyrics were defined as follows:
1511
\setlyrics{soprano}{bring her die Gans,}
1512
\copylyrics{soprano}{alto}
1514
\assignlyrics1{alto}
1515
\auxlyr{\assignlyrics1{soprano}}
1517
\lyrmodealter0 % provide main + aux. lyrics automatically\end{verbatim}
1520
This is the complete notes section:
1524
\NOtes\zqu g\ql e\en
1526
\Notes\zqu i\beginmel\ibslurd0f\ibl0f{-1}\qb0f\en
1528
\Notes\auxlyr\beginmel\ibsluru1i\zqup i\qb0d\en
1530
\Notes\endmel\tbslurd0e\ql c\en
1531
\notes\ibbu0h{-1}\qb0h\en
1533
\NOtes\auxlyr\endmel\tbsluru1h\zqu h\ql c\en
1535
\NOTEs\auxlyr\lyr\zwh i% The lyrics of the whole notes
1536
\lyr\wh b\en % must be given manually.\end{verbatim}
1539
Note that, as opposed to using \PMX, there is no special provision
1540
for attaching main lyrics to the upper voice. If you desire a single
1541
lyrics ``thread'' synchronized with the upper voice, please use
1542
auxiliary lyrics instead and position them below the staff (see
1543
section~\ref{vertical-positioning}).
1544
Alternatively, you may use main lyrics in normal lyrics mode and code
1545
the lower voice completely non-spacing (in the sense explained
1546
in~\ref{auto-attachment}), the upper voice completely spacing; this
1547
should not be too complicated for mainly homophonic pieces.
1551
\subsection{Lyrics at multi-staff instruments}
1552
\label{multi-staff-instruments}
1554
So far in this manual, the term {\em staff\/} has always been used for
1555
what \musixtex\ precisely calls an {\em instrument\/}. This section,
1556
however, correctly adopts the \musixtex\ terminology.
1558
Lyrics can be assigned to staves of a multi-staff instrument. To do
1561
\ci{assignlyricsmulti}\verb|{|\var i\verb|}{|\var s\verb|}{...}|
1563
instead of \verb|\assignlyrics...|; here, \var s~addresses the desired
1564
staff number (counted from bottom to top) of instrument~\var i.
1567
\ci{assignlyrics}\verb|{|\var i\verb|}{...}|
1568
can be used as well if instrument~\var i has multiple staves; in this
1569
case, it is equivalent to
1570
\verb|\assignlyricsmulti{|\var i\verb|}{1}{...}|,
1571
i.\,e.~it affects only the first staff (and not all staves, as may be
1574
In the same spirit, the following ``multi'' commands replace the
1575
standard ones within a multi-staff instrument context:
1577
\ci{lyrraisemulti}\\
1578
\ci{lyrmodenormalmulti}\\
1579
\ci{lyrmodealtermulti}
1582
All other \musixlyr\ commands or features can be used the same way as
1583
within a single-staff instrument context.
1585
Using lyrics at multi-staff instruments can be useful, for example,
1586
for typesetting songs with piano accompaniment:%
1587
\footnote{Example taken from songbook {\sl Am Brunnen vor dem Tore\/},
1588
Delphin Verlag M\"unchen/Z\"urich 1981}
1592
\setlyrics{verse}{Gu-ter Mond, du gehst_ so_ stil_-le}
1593
\assignlyricsmulti11{}
1594
\assignlyricsmulti12{verse}
1595
\lyrraisemulti12{b 2\internote}
1597
\generalsignature{-1}
1598
\generalmeter\meterC
1603
\Notes\qp|\ibl0j{-2}\qb0j\tqb0i\en
1604
\bar\hardspace{1.7\myqnwidth}%
1605
\NOtes\isluru1d\lq c\zq M\ql d|\qa h\en
1606
\NOtes\zq c\zq M\ql e|\qa h\en
1607
\Notes\lq c\zq M\ql d|\islurd0h\ibu0h2\qb0h\tslur0i\tqh0i\en
1608
\Notes\tslur1e\zq c\zq M\ql e|\isluru0j\ibl0j2\qb0j\tslur0k\tqb0k\en
1609
\bar\hardspace\myqnwidth
1610
\Notes\isluru1d\lq c\zq M\ql d|\isluru0j\ibl0j{-2}\qb0j\tslur0i\tqb0i\en
1611
\NOtes\zq c\zq M\ql e|\qa g\en
1612
\NOtes\lq c\zq M\ql d|\qp\en
1613
\znotes\midslur2\tsslur1d\en
1617
The lyrics of this example are defined as follows:
1619
\bci{assignlyricsmulti}
1622
\setlyrics{verse}{Gu-ter Mond, du gehst_ so_ stil_-le}
1623
\assignlyricsmulti{1}{2}{verse}
1624
\lyrraisemulti {1}{2}{b \internote}\end{verbatim}
1629
\subsection{Managing lyrics assignment according to current context}
1630
\label{assignment-by-context}
1632
Managing the properties of lyrics lines assignment to instruments by
1633
absolute instrument numbers --- as it is done with the
1634
\ci{assignlyrics}, \ci{lyrraise}, and \ci{lyrmodealter}
1635
commands --- may cause difficulties whenever the score's number and
1636
order of instruments shall be rearranged; in this case instrument
1637
numbers change, thus the instrument number parameters of the
1638
mentioned lyrics-related commands have to be adjusted.
1640
This is especially unpleasant where such a rearrangement is done
1641
automatically, e.\,g.~by \PMX's part extraction facility {\em
1642
scor2prt\/}; this is intended to work without any manual editing
1643
of the generated part files.
1645
To address this issue, \musixlyr\ provides {\em context-dependent\/}
1646
variants of the commands mentioned above. For example: Instead of
1647
\verb|\assignlyrics{2}{soprano}|, you may say something like:
1649
\verb|\notes...&|\ci{assignlyricshere}\verb|{soprano}...\en|
1651
\ci{assignlyricshere}\verb|{|\var{name(s)}\verb|}| assigns the given verse
1652
\var{name(s)} to the instrument/staff whose context it occurs in within the
1653
\verb|\notes...\en| construct; no absolute instrument/staff number needs to
1656
For example, the following two code fragments are equivalent:
1661
\def\arraystretch{1}%
1662
\begin{tabular}{l@{\qquad}|@{\qquad}l}
1663
\begin{tabular}[t]{@{}l@{}}
1664
\ci{assignlyrics}\verb| {1} {acct}%|\\
1665
\ci{assignlyricsmulti}\verb|{2}{2}{verse}%|\\
1666
\verb.\NOtes\qa c&\qa e|\qa g\en.
1669
\begin{tabular}[t]{@{}l@{}}
1670
\verb|\NOtes|\ci{assignlyricshere}\verb|{acct}\qa c%|\\
1672
\verb. |.\ci{assignlyricshere}\verb|{verse}\qa g\en|
1678
Using \PMX, the context-dependent commands must be given as type-1
1679
inline \TeX\ strings. Here is the same example, coded as \PMX input:
1684
\def\arraystretch{1}%
1685
\begin{tabular}{l@{\qquad}|@{\qquad}l}
1686
\begin{tabular}[t]{@{}l@{}}
1687
\ci{assignlyrics}\verb| {1} {acct}\|\\
1688
\ci{assignlyricsmulti}\verb|{2}{2}{verse}\|\\
1694
\begin{tabular}[t]{@{}l@{}}
1695
\hphantom{\tt .NOtes.assignlyricshere.acct..qa cg.en}\\
1697
\ci{assignlyricshere}\verb|{acct}\ c44 /|\\
1699
\ci{assignlyricshere}\verb|{verse}\ g44 /|\\
1705
The first one (left) results in wrong lyrics assignments in {\em
1706
scor2prt\/} output; the second one (right) is robust against part
1709
This is the complete set of ``here'' commands that can be applied the
1712
\ci{assignlyricshere}\\
1714
\ci{lyrmodenormalhere}\\
1715
\ci{lyrmodealterhere}
1718
All other \musixlyr\ commands are context-driven anyway, i.\,e.~using
1719
the mentioned ``here'' commands you can completely omit any absolute
1720
instrument/staff number assignment.
1724
\subsection{Miscellaneous}
1726
\subsubsection{Avoiding problems after {\tt\char92
1727
endpiece...\char92 startpiece}}
1729
Sometimes, after having suspended the music with \verb|\endpiece| and
1730
restarted it with \verb|\startpiece| (or the respective
1731
\verb|\...extract| commands), the lyrics lines are totally misaligned
1732
because the internal lyrics positioning parameters are not reset
1734
\begin{quote}\ci{resetlyrics}\end{quote}
1735
before the beginning of the new music section should solve this
1739
\subsubsection{Improved centering of words with punctuation marks}
1741
Centered words with an attached punctuation mark often seem a bit
1742
left-shifted since the punctuation mark also counts for the
1743
centering. To have a word centered solely with respect to its
1744
letters, enclose the punctuation mark in \verb|\rlap{...}| as it is
1745
done in the example of section~\ref{multiple-vert-pos}. Unfortunately,
1746
this circumvents the lyrics shifting automatism, and is incompatible
1747
with the use of \ci{lyrnop}.
1750
\subsubsection{Verse numbers}
1751
\label{versenumbers}
1753
There is no special command for this topic. See the following example:
1757
\generalmeter{\meterfrac24}
1760
{\llap{1.} What shall we do with a drun-ken sail-or\rlap{?}}
1762
{\llap{2.} Take him and shake him and try to\lyrlink a-wake him,}
1763
\setlyrics{sailor3}{\llap{3.} Give him a dose of_ salt and wa-ter,}
1764
\setlyrics{sailor4}{\llap{4.} Give him a dash with a bo-som's rub-ber,}
1765
\assignlyrics1{sailor1,sailor2,sailor3,sailor4}
1767
\setsongraise1{-6mm}
1769
\znotes\llyr\lyroffset{-2}% make the numbers stand off to the left
1770
\lyr% post the numbers
1772
\Notes\ibu0h0\qb0h\en
1773
\notes\nbbu0\qb0h\tqh0h\en
1774
\Notes\ibu0h0\qb0h\en
1775
\notes\nbbu0\qb0h\tqh0h\en\bar
1776
\Notes\Dqbu hd\Dqbu fh\en
1782
To see how this is accomplished, look for the example's coding within
1785
Section~\ref{lyric*-verse-numbers} explains an alternative method for
1786
setting vertically aligned verse numbers.
1789
\subsubsection{``Lyrics slurs''}
1791
If two consecutive syllables of a lyrics line share the same note (as
1792
in the second verse of the above example), you may want to link them
1793
together with a small slur under them \mbox{like\lyrlink this.} To do
1794
this, use the command \ci{lyrlink} instead of the respective blank
1795
space within the \verb|\setlyrics| definition.
1797
If any of the adjacent characters extend under their \TeX\ baseline
1798
(like `g', `j', `p', etc.), use \ci{lowlyrlink} which lowers the
1799
slur accordingly (e.\,g.: \mbox{sing\lowlyrlink gladly}).
1802
\subsubsection{Restoring the \PMX-unaware behaviour of \musixlyr~1.0}
1803
\label{no-pmx-autodetection}
1805
As stated in section~\ref{pmx-autodetection}, \musixlyr\ distinguishes
1806
between main and auxiliary lyrics context in a special way when it
1807
detects that the score has been set up using \PMX. However, this
1808
automatic \PMX\ detection may cause problems for processing \PMX\
1809
scores prepared with the \PMX-unaware \musixlyr\ version~1.0. To solve
1810
this, you can force the old \musixlyr\ behaviour by an explicit macro
1811
redefinition as follows:
1813
Within {\tt musixlyr.tex}, find the code fragment
1814
\begin{quote}\begin{verbatim}
1815
\ifx\nextvoice\undefined
1816
\def\decide@lyrmode{%
1819
\fi\fi\fi\fi\fi\fi\fi}
1820
\else\end{verbatim}\end{quote}
1821
(which is about 25 lines long). Copy it, exluding the first and the
1822
last line, to your score source and surround it by the
1823
\verb|\makeatletter...\makeatother| command pair. This
1824
should then look like this:
1825
\begin{quote}\begin{verbatim}
1827
\def\decide@lyrmode{%
1830
\fi\fi\fi\fi\fi\fi\fi}
1831
\makeatother\end{verbatim}\end{quote}
1833
To restore the \PMX-aware \musixlyr\ behaviour of version~1.1 and
1834
newer, copy the {\em second\/} \verb|\decide@lyrmode| definition
1835
from {\tt musixlyr.tex} to the desired place in your score and
1836
surround it with \verb|\makeatletter...\makeatother|.
1838
To do these redefinitions within a \PMX\ input file, it is probably
1839
always best to wrap them in macro definitions within the \PMX\ file
1840
preamble. This way, you can switch between the ``old'' and ``new''
1841
\musixlyr\ behaviour by simply calling these macros in \PMX's
1845
\section{Command index}
1850
\section{Software license}
1852
\musixlyr\ (including this manual) is free software; you can
1853
redistribute it and/or modify it under the terms of the GNU General
1854
Public License as published by the Free Software Foundation; either
1855
version~2 of the License, or any later version.
1857
\musixlyr\ is distributed in the hope that it will be useful,
1858
but WITHOUT ANY WARRANTY; without even the implied warranty of
1859
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1860
GNU General Public License for more details.
1862
You should have received a copy of the GNU General Public License
1863
along with \musixlyr; if not, write to the Free Software
1864
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
1868
\begin{tabular}[t]{l}
1871
85\,591 Vaterstetten\\[0.5ex]
1873
E-mail: \tt rainer.dunker@web.de