-%% this file defines various macros to accomodate lilypond output
-
-% TeXbook ex 7.7
-\def\ifundefined#1{\expandafter\ifx\csname#1\endcsname\relax}
-
-% skip if included already
-\def\SkipLilydefs{\endinput}
-\ifundefined{EndLilyPondOutput}
- \def\EndLilyPondOutput{\csname bye\endcsname}
- \def\SkipLilydefs{}
-\fi
-\SkipLilydefs
-
-\ifundefined{mudelacopyright}
- \def\mudelacopyright{\copyright\ \number\year}
-\fi
-\ifundefined{LilyIdString}
- \def\LilyIdString{Lily was here}
-\fi
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% macros to shorten other definitions
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\def\musicdef#1#2{\def#1{\musicchar{#2}}}
-\def\musicchar#1{\musicfnt\char#1}
-\def\rationalmultiply#1*#2/#3{\multiply #1 by #2 \divide #1 by #3}
-
-
-\def\maccentraise#1#2{\dimen0=\noteheight
- \rationalmultiply\dimen0*#2%
- \raise\dimen0\hbox{#1}}
-\def\maccentdef#1#2#3{\def#1{\maccentraise{\musicchar{#2}}{#3}}}
-\def\vertcenter#1{\vbox to 0pt{\vss #1\vss}}
-
-\def\musicmathdef#1#2{\def#1{\musicmathchar{#2}}}
-\def\musicmathchar#1{\musicmathfont\char#1}
-
-\def\topalign#1{\vbox to 0pt{#1\vss}}
-\def\botalign#1{\vbox to 0pt{\vss #1}}
-
-\def\centeralign#1{\hbox to 0pt{\hss#1\hss}}
-\def\leftalign#1{\hbox to 0pt{#1\hss}}
-\def\rightalign#1{\hbox to 0pt{\hss#1}}
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% set up dimensions
-\parindent=0pt
-\newdimen\smallspace
-\newdimen\interlinedist
-\newdimen\stemthickness
-\newcount\n
-\newdimen\staffheight
-\newdimen\notewidth
-\newdimen\noteheight
-\newdimen\staffrulethickness
-\newdimen\interstaffrule
-\newdimen\dist
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% set fonts and primary dimensions
-% ugh
-\def\musixtwentydefs{
- \twentyfonts
- \musixcalc
-}
-
-\def\cmrtwenty{
- \font\meterfont=cmbx15
- \font\italicfont=cmti10
- \font\musicmathfont=cmsy10
- \font\normaltextfont=cmr10 %\textfont is a primitive
- \font\smalltextfont=cmr8
- \font\boldfont=cmbx10
- \font\textmusic=cmmi12
-}
-\def\cmrsixteen{
- \font\smalltextfont=cmr6
- \font\normaltextfont=cmr8 %\textfont is a primitive
- \font\meterfont=cmbx12
- \font\italicfont=cmti8
- \font\textmusic=cmmi10
- \font\boldfont=cmbx8
-}
-\def\cmreleven{
- \font\smalltextfont=cmr5
- \font\normaltextfont=cmr6
- \font\meterfont=cmbx8
- \font\italicfont=cmti6
- \font\textmusic=cmmi8
- \font\boldfont=cmbx6
+%% The overall structure of a file created by LilyPond is as follows:
+%%
+%% <lilypond parameter definitions>
+%% \ifx\lilypondstart \undefined
+%% \input lilyponddefs
+%% \fi
+%% \lilypondstart
+%% <font setup and note output>
+%% \lilypondend
+
+\newdimen\lytempdim
+\newdimen\outputscale
+
+%% Handy macros from the LaTeX manual.
+\long\gdef\lilypondfirst#1#2{#1}
+\long\gdef\lilypondsecond#1#2{#2}
+\gdef\lilypondifundefined#1{
+ \expandafter\ifx\csname#1\endcsname\relax
+ \expandafter\lilypondfirst
+ \else
+ \expandafter\lilypondsecond
+ \fi