% File: mppdoc.tex -*-LaTeX-*- % automatically generated from mppdoc.doc by dodoc % File: mppdoc.doc: dodocmpp --> -*-LaTeX-*- \ifx\documentclass\undefined % \documentstyle[twoside,11pt,mppdoc,multicol]{report} \documentstyle[11pt,mppdoc]{report} \else % \documentclass[twoside,11pt]{report} \documentclass[11pt]{report} % \usepackage{multicol} \usepackage{mppdoc} % \usepackage{fancylowheadings} %uncomment for html doc \let\proofpage\relax % \usepackage{proofpage}\proofpage \fi \def\musictex{Music\TeX{}} %\def\MPP{M\kern-.1em\raise.95ex\hbox{{p}}\kern-.25em\lower.8ex\hbox{P}} \def\MPP{M\kern-.1em\raise.65ex\hbox{{P}}\kern-.35em\lower.45ex\hbox{P}} \def\empty{} \def\MusiXTeX{xxx} \ifx\MusiXTeX\empty\else \let\MusiXTeX\musixtex \fi %\pagestyle{fancy} %\chead{\everypage} \startmuflex%\makeindex \begin{document} \title{ \Huge\bf \musixtex\ Pre-Processor\raise1.5ex\hbox{\large\copyright}\\[\bigskipamount] \LARGE\bf Using \TeX\ and the \musixtex\\ macro package\\ to write parts and scores of music\\ \Large\sl b\`eta--Test Version 0.45~-- \today} \author{\Large\rm Jan \sc Nieuwenhuizen,\\ \large\sl Department of Physics,\\ \normalsize\sl Eindhoven University of Technology,\\ % P.O.\ Box 513,\\ NL--5600 MB\enspace\enspace Eindhoven} \date{} %\let\endtitleORI\endtitlepage %\def\endtitlepage{\vfill} %\endtitleORI \maketitle \clearpage \thispagestyle{empty} %\null %\vfill \begin{flushright}\sl %.. All the possible is done,\\ %the impossible is being done,\\ %for miracles I ask for some delay.\\[\smallskipamount] %{\sc N.N.}\\[\bigskipamount] %...~time after time~...\\[\smallskipamount] %{\sc Cindy Lauper}\\[\bigskipamount] If you are not familiar with \TeX{} at all\\ I would recommend to find another software\\ package to do musical typesetting.\\ Setting up \TeX{} and \musixtex\\\ on your machine and mastering it\\ is an awesome job which gobbles up\\ a lot of your time and disk space.\\[\medskipamount] But, once you master it...\\[\smallskipamount] {\sc Hans Kuykens} \end{flushright} \clearpage \setcounter{page}1 \tableofcontents \setcounter{secnumdepth}3 \pagestyle{headings} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{\MPP: the \musixtex\ Pre-Processor} \section*{Preface} Dear user,\\ what you are looking at is the manual to \MPP, a preprocessor which is still in b\`eta-test stage as is \musixtex, and as long they are b\`eta, almost everything in \MPP and \musixtex is subject to change. This manual is far from completed and, as such, of questionable use at this time, but do have a look at the examples. \subsection{About \musixtex\ } \musixtex\ \ is a \TeX\ macro package for typesetting music, written by Daniel Taupin. Even though it is still in the $\beta$--test phase, it works fine and it has a number of advantages over its predecessor \musictex. As stated in documentation of \musixtex, \musixtex\ is {\em only\/} a typesetter, and not intended to interpret some kind of musical notation. Which, in turn, is one of the strong points of \musixtex. For simple notes direct manual input works fine, but when accents, beam and slurs are added, the input gets more unreadable and error prone (especially with the cummulative accents). Coding a score of music would be a disaster. %Not to mention the \section{Why a \musixtex\ Pre-Processor} The documentation of \musixtex\ mentions that setting of a piece of music using \musixtex\ `might appear to be awfully complicated, just as the real keyboard or orchestral music.' This is certainly true. Furthermore the docs state that the only real option that is left for a composer/typesetter, is having `aesthetic decisions automatically made by somebody (or something) else.' We cannot completely agree on this one: setting music is not solely subject to aesthetic decisions, there are certain rules which a piece of music must satisfy, e.g.\ when setting a score of music, %?? the spacing of notes in each staff of a score is coupled to notes in the other staffs. There are also a lot of assumptions one can safely make that could simplify music input, but do not imply any major aesthetic decisions, for example the relative spacing of notes, the drawing of beams and slurs, the placing of accents and directions. The complexity of a \musixtex\ input file can be seriously reduced without any loss of information. With this in mind a new music definition language was developed. Compared to \musixtex\ \, \MPP\ is a quite simple program, but it has the potential to make \musixtex\ much more {\em accessible\/} if not {\em useable\/}. Its goal is not to cover all of \musixtex's possibilities, but to make the coding of simple pieces (or parts) of music a lot easier. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{The \MPP\ musical definition language} \section{Introduction} The \MPP\ input language is mostly visually based and should be relatively easy to read (and write). This means that: \begin{itemize} \item Notes are coded by their names. \item Most other musical definitions such as duration, bars, accents, beams and slurs are represented by single characters. \item Typesetting details are computed by \MPP\ and can be overruled for special cases. \item Each staff of music is coded in its own \verb+.mpp+ file. Several \verb+.mpp+ input files can be compiled to create a multiple-staff part or score. \item To enhance the readability of the music, comments and whitespace may be inserted at any point between notes. \end{itemize} As examples are often found to be more fun than technical descriptions that nobody reads anyway, the examples come first, and you will be bored with the definitions afterwards. Here is a simple piece of music: \begin{music} % File x.mpp was autmatically created by dodoc % From the music below % MusiXTeX Source created by mpp Mon Oct 9 15:34:40 1995 % File: x.tex % From: x.mpp % \instrumentnumber{1} % \setstaffs1{1} % \def\thetitle{x.mpp} % % \normalmusicsize \def\ppffstyle{\ppfftwenty} \def\directstyle{\twelveit} \def\xpletstyle{\tenit} \ppff % \let\endpiece\endextract \startextract \addspace\afterruleskip \NOtes\qu{!c}% \en% \NOtes\qu{!f}% \en% \NOtes\ql{!'b}% \en% \NOtes\qu{!c}% \en% % \endextract \end{music} which was coded as: \begin{verbatim} c f b c \end{verbatim} \section{The notes} Notes are the basic building blocks of music. In \MPP\ You can produce notes by specifying their pitches and lengths, and optional ``features''. The pitch is specified by a note-name (a, b, etc.) and an octave. In the above example all notes lie in the same octave, and have the same duration, a quart. There should be no spaces or comments in a note. %inputting their names (pitches, e.g. C D) % % %A note can be defined by its name, the relative octave and its %duration. The piece of music shown above is perhaps a bit too simple to be taken seriously, but it is a start. In the following sections the examples might gradually become more interesting. \subsubsection{The duration} A duration is specified by a number: the reciprocal value of its length. For a pointed notes you can also type a number of periods (\verb=.=) following the length. The duration immediately follows the notename. Example: \begin{music} % File x.mpp was autmatically created by dodoc % From the music below % MusiXTeX Source created by mpp Mon Oct 9 15:34:42 1995 % File: x.tex % From: x.mpp % \instrumentnumber{1} % \setstaffs1{1} % \def\thetitle{x.mpp} % % \normalmusicsize \def\ppffstyle{\ppfftwenty} \def\directstyle{\twelveit} \def\xpletstyle{\tenit} \ppff % \let\endpiece\endextract \startextract \addspace\afterruleskip \NOtes\cup{!g}% \en% \notes\ccu{!'a}% \en% \NOtes\ql{!'b}% \en% \NOtes\qu{!g}% \en% % \endextract \end{music} which was coded as: \begin{verbatim} g8. a16 b g4 \end{verbatim} %sorry hw, using dodocmpp now... %This will produce: %It was coded as: %Have a look at this piece of music: As you can see. The third note has no duration specified, and MPP makes its length the default length, is a quart. If you omit the duration of a note, MPP uses the value of \verb|\duration|. You can change this default duration at any time with the macro \verb+\duration+: to change the default duration of notes to, say, sixteenth \verb+\duration{16}+. \subsubsection{The pitch} The pitch of a note is determined by its name and the octave where MPP should produce the note. %The notename together with the key of the music %defines the printing of accidentals: %\key?? is default C; as \duration is default 4 % i see your point; this looks a bit silly \begin{music} % File x.mpp was autmatically created by dodoc % From the music below % MusiXTeX Source created by mpp Mon Oct 9 15:34:44 1995 % File: x.tex % From: x.mpp % \instrumentnumber{1} % \setstaffs1{1} % \def\thetitle{x.mpp} % % \normalmusicsize \def\ppffstyle{\ppfftwenty} \def\directstyle{\twelveit} \def\xpletstyle{\tenit} \ppff % \let\endpiece\endextract \startextract \addspace\afterruleskip \NOtes\smallsk\sh{!g}\cup{!g}% \en% \notes\ccu{!'a}% \en% \NOtes\smallsk\fl{!'b}\ql{!'b}% \en% \NOtes\qu{!g}% \en% % \endextract \end{music} which was coded as: \begin{verbatim} gis8. a16 bes gis4 \end{verbatim} As you can see, MPP correctly puts accidentals in, depending on the key of the piece. You can set the \verb+\key+ with \verb+\key\G+. Supported keys are from C flat (7 flats) to C sharp (7 sharps), since double-sharps are as yet unimplemented. I'm not quite sure this is a purely dutch convention, but we are accustomed to this set of notenames: %\em %that is constituted as follows% \footnote{Other languages may want to use their own handy set of notenames; do, re, mi, $ldots$ and do-mol, do-kruis (?), $\ldots$ (Belgian); ut, r\'e, mi, $\ldots$ and ut-b\'emol, ut-di\`ese $\ldots$ (?)(French); a, b, c, $\ldots$ and a-flat, a-sharp, $\ldots$ (English)}: \begin{itemize} \item the natural notes are known as \verb+a+ through \verb+g+. \item a sharp adds the postfix \verb+is+ (pronounce a{\em i\/}s as i: gr{\em ee\/}n). \item a flat adds the postfix \verb+es+ (pronounce c{\em i\/}s as \ae in c{\em a\/}t)% \footnote{Exceptions: as, es.} \end{itemize} The note names can be changed to your taste% \footnote{Notename definitions must be composed strictly of lowercase alpha characters (a-z).} , please refer to notes.ini \subsubsection{The relative octave} The unadorned c is the central c, commonly known as c$^1$ or $\overline c$, below the normal staff (in treble-clef). $'$c is one eigth higher, $`$c produces a note which is an eigth lower. For your convenience, C is equivalent with `c. %The note \verb+a+ has pitch $\equiv$ 440 Hz., %and the note \verb+A+ has pitch $\equiv$ 110 Hz. %Relative octaves are indicated by accents, %one backward accent lowers the pitch one octave (\verb+`a+ $\equiv$ 220 Hz.), %one forward accent raises the pitch one octave (\verb+'a+ $\equiv$ 880 Hz.): \begin{music} % File x.mpp was autmatically created by dodoc % From the music below % MusiXTeX Source created by mpp Mon Oct 9 15:34:45 1995 % File: x.tex % From: x.mpp % \instrumentnumber{1} % \setstaffs1{1} % \def\thetitle{x.mpp} % % \normalmusicsize \def\ppffstyle{\ppfftwenty} \def\directstyle{\twelveit} \def\xpletstyle{\tenit} \ppff % \let\endpiece\endextract \startextract \addspace\afterruleskip \NOtes\qu{!'C}% \en% \NOtes\ql{!c}% \en% \NOtes\ql{!'c}% \en% \NOtes\ql{!''c}% \en% \setclef1\bass\changeclefs\NOtes\qu{!C}% \en% \NOtes\qu{!'C}% \en% \NOtes\ql{!c}% \en% \NOtes\ql{!'c}% \en% % \endextract \end{music} which was coded as: \begin{verbatim} `c c 'c ''c \clef\bass `C C 'C ''C \end{verbatim} As you can see, \MPP\ will remember the clef when setting music. \subsubsection{The features} Music isn't notes only, each notes can have some extra directions on how to play them. We call these directions ``features'', e.g. accents. Some other characteristics are also called ``feature'', e.g. its size. There are two kinds of feature: \begin{itemize} \item macros, specifying note-characteristics, \item subscripts and superscripts, for accents and other directions. \end{itemize} \begin{music} % File x.mpp was autmatically created by dodoc % From the music below % MusiXTeX Source created by mpp Mon Oct 9 15:34:48 1995 % File: x.tex % From: x.mpp % \instrumentnumber{1} % \setstaffs1{1} % \def\thetitle{x.mpp} % % \normalmusicsize \def\ppffstyle{\ppfftwenty} \def\directstyle{\twelveit} \def\xpletstyle{\tenit} \ppff % \let\endpiece\endextract \startextract \addspace\afterruleskip \NOtes\zqu{!'a}\hl{!f}% \en% \NOtes\qu{!'d}% \en% \NOTes\ust{!''c}\uupbow{!''f}\zqp{!''c}\zqp{!'e}\qlp{!'a}% \en% \NOtes\ust{!''a}\ufinger{1}{!''d}\zq{!''a}\zq{!'d}\lfinger{2}{!'F}\lfinger{4}{!'C}\ql{!'b}% \en% \NOtes\zq{!'g}\zq{!'e}\atswap{\directstyle \p}{!'F}\ql{!'c}% \en% \NOTEs\lgobble{!e}\atswap{\directstyle dolce}{!'F}% \en% % \endextract \end{music} which was coded as: \begin{verbatim} { a4 f2 } 'd4\stemup { ''c4.^.^\upbow 'e4. a4.\stemdown} { 'a^.^1 'd b_2_4} { 'g4 'e4 'c4_{p} } s2._{ }_{dolce} \end{verbatim} \subsubsection{Summary} A note consists of: \begin{itemize} \item \catcode`@=11 % treat at signs as letters a superfluous (memorizing) accidental. This is optional. \verb+#+ $\equiv$ sharp, \verb+=+ $\equiv$ natural, \verb+@+ $\equiv$ flat, \catcode`@=12 % at signs are no longer letters \item the relative ocatave \verb+`+ $\equiv$ $-1$, \verb+'+ $\equiv$ $+1$ (accents are not cumulative as in MusiXTeX), \item the notename, e.g.\ c (c is the central, below the staff of a treble-cleffed staff) %( a $\equiv$ 440, A $\equiv$ 110, `a = 220, 'a = 880 ), \item the duration, a number: 1 $\equiv$ whole, 2 $\equiv$ half, 4 $\equiv$ quart, 4. $\equiv$ quart point, This is optional. If you do not supply a duration, the value of \verb|\duration| is used. \item list of accents or other super- and subscripts, e.g.\ \verb+a^{.}+ (staccato dot above a) , \verb+_{3}+ (use third finger). These are the so-called features. \end{itemize} or, in BNF form: % := es | is % := a | b | c | d | e | f | g \begin{verbatim} := [][][][] := '#' | '=' | '@' := '`' | '\'' | '\'' | octavate '`' := (these are defined in the file note.ini) := 1 | 2 | 4 | 8 | 16 | 32 | 64 | [] := '.' | '.' := | features :=