2 %% include file for LilyPond
4 %% this file defines various macros to accomodate lilypond output
6 %% let's not make par before endinput
9 \def\ifundefined#1{\expandafter\ifx\csname#1\endcsname\relax}
11 % skip if included already
12 \def\SkipLilydefs{\endinput}
13 \ifundefined{EndLilyPondOutput}
14 \def\EndLilyPondOutput{\csname bye\endcsname}
19 \ifundefined{mudelacopyright}
20 \def\mudelacopyright{\copyright\ \number\year}
22 \ifundefined{mudelatagline}
23 \def\mudelatagline{Lily was here}
25 \ifundefined{documentclass}
26 \input lilypond-plaintex
31 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
32 % macros to shorten other definitions
33 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
34 \def\musicmathdef#1#2{\def#1{\musicmathchar{#2}}}
35 \def\musicmathchar#1{\musicmathfont\char#1}
37 \def\topalign#1{\vbox to 0pt{#1\vss}}
38 \def\botalign#1{\vbox to 0pt{\vss #1}}
40 \def\centeralign#1{\hbox to 0pt{\hss#1\hss}}
41 \def\leftalign#1{\hbox to 0pt{#1\hss}}
42 \def\rightalign#1{\hbox to 0pt{\hss#1}}
45 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
47 % mudela-book don't like this:
49 \newdimen\interlinedist
51 \newcount\n %duh. meaningful identifiers.
53 \newdimen\stafflinethickness
55 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
56 % set fonts and primary dimensions
63 \font\smalltextfont=cmr8
64 \font\textmusic=cmmi12
67 \font\smalltextfont=cmr6
68 \font\textmusic=cmmi10
71 \font\smalltextfont=cmr6
75 \font\smalltextfont=cmr5
82 \csname cmrtwenty\texsuffix\endcsname
86 \def\musixsixteendefs{
88 \csname cmrsixteen\texsuffix\endcsname
91 \def\musixtwentysixdefs{
92 \csname cmrtwentysix\texsuffix\endcsname
96 \def\musixthirteendefs{
98 \csname cmrthirteen\texsuffix\endcsname
101 \def\musixelevendefs{
102 \csname cmreleven\texsuffix\endcsname
107 \def\textsharp{\raise.4ex\hbox{\textmusic\char"5D}}
108 \def\textnatural{\raise.4ex\hbox{\textmusic\char"5C}}
109 \def\textflat{\raise.2ex\hbox{\textmusic\char"5B}}
113 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
114 % do derivative calcs
116 % this has to be synced with the font definition
119 \stafflinethickness=\mudelapaperrulethickness pt
124 % stacked horizontal lines
125 \def\interscoreline{\vskip 16pt}
127 % big fat marks, if errors are detected.
128 \def\columnerrormark{\placebox{-5pt}{0pt}{\bf C!}}
129 \def\scorelineerrormark{\placebox{0pt}{-10pt}{\bf L!}}
130 \def\errormark{{\bf E!}}
139 % see e.g. input/test/beam-pos.ly
141 % something's wrong with the aligment; sometimes all symbols
142 % look to be placed a bit too high (there's an ugly fix for
143 % the staccato-dot in script.cc)
144 % but this varies from line to line: it seems that xdvi
145 % does some rounding; i can't really check this from screen on i
148 \def\rulesym#1#2{\dimen0=#1 %obsolete
149 \vrule height .5\dimen0 depth .5\dimen0 width #2}
150 \def\shiftedrulesym#1#2{\dimen0=#1%
151 \vrule height .7\dimen0 depth .3\dimen0 width #2}
152 \def\tinyrulesym#1#2{\dimen0=#1%
153 \vrule height .1\dimen0 depth .1\dimen0 width #2}
154 %would be nice for checking alignment
155 \def\openrulesym#1#2{\dimen0=#1%
156 \vbox to \dimen0{\vss%
157 \hbox{\vrule height .1\dimen0 width #2}%
158 \hbox{\vrule height .2\dimen0 width 0pt}%
159 \hbox{\vrule height .4\dimen0 width #2}%
160 \hbox{\vrule height .2\dimen0 width 0pt}%
161 \hbox{\vrule height .1\dimen0 width #2}%
163 %\let\rulesym\shiftedrulesym
164 %\let\rulesym\tinyrulesym
165 %\let\rulesym\openrulesym
167 % the interline symbol. Redefine to remove it.
168 \def\defaultlineseparator{\vbox{\mussepline\vskip -5pt\mussepline}}
169 \def\lineseparator{\defaultlineseparator}
171 \par\vskip 10pt plus 30pt minus 10pt\par
172 \hskip -5pt\lineseparator
173 \par\vskip 10pt plus 30pt minus 10pt\par
177 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
181 % macros suck. \ifundefined{nolilyfooter} gives wierd errors from time
186 % Warning: the order is conceptually weird. It says:
188 % if not defined (``nolilyfooter''):
193 \ifx\csname nolilyfooter\endcsname\relax
194 \message{[footer defined]}%
195 \csname lilyfooter\texsuffix\endcsname%
197 \message{[footer empty]}
199 nolilyfooter\texsuffix\endcsname