% has been installed. The rules have been precooked into the
% Documentation/Rules.make file; do
%
-% make out/introduction.dvi
+% make out/mudela.dvi
%
% or
%
-% mudela-book --outdir=out/ --outname=introduction.mudtex introduction.doc
-% latex '\nonstopmode \input out/introduction.mudtex'
+% mudela-book --outdir=out/ --outname=mudela.mudtex mudela.doc
+% latex '\nonstopmode \input out/mudela.mudtex'
% Hoi Tim, hier staan wat 'enge' commando's (die dingen met een '\'
% zoals \documentclass en \def\mudela...).
\usepackage{a4wide}
\title{Mudela}
\author{Jan Nieuwenhuizen \& Han-Wen Nienhuys}
-\date{March 2, 1998}
\def\file#1{\verb+#1+}
\chapter{A tutorial}
-\emph{\Large ***Under construction***}
+\emph{\Large ***Under construction: april 98***}
\section{Introduction}
\end{mudela}
\end{enumerate}
+[talk about ly2dvi]
+
The remainder of this document is not about \TeX, and mostly not even
about LilyPond. What you entered into your text editor in step~1. and
fed to LilyPond is a special kind of file composed of notenames,
how to combine these elements to express a piece of music in the
language that LilyPond understands. In other words, we try to explain
how to use LilyPond, and not how LilyPond works. For want of a better
-name we call this language Mudela (short for Music Description
+name we call the language Mudela (short for Music Description
Language).
This document does not cover all of Mudela. Due to technical details,
the central C, also known as c$^1$, is written as \verb+c'+. A quarter
note duration is written as \verb+4+. So, to print quarter note with
central C pitch, you enter the following
-\begin[fragment,verbatim,center]{mudela}
+\begin{mudela}[fragment,verbatim,center]
c'4
\end{mudela}
The pitch \verb+c'+ actually consists of two parts: one for the note
name, and one part for the octave. The number of apostrophes
-specifies the octave to use, and the letter which note name to use.
-The note names simply are the letters \verb+a+ to \verb+g+.
+specifies the octave to use if you are above central c. If you want
+the octaves below central c, use the comma, eg, \verb+c,,+ (The comma
+is meant to represent a ``sunken'' apostrophe). The letter specifies
+which note name to use. The note names simply are the letters
+\verb+a+ to \verb+g+.
+
+By convention, the \verb+a'+ concert pitch is the tone that is used to
+tune instruments. The exact frequency of this tone has wandered: in
+Baroque time it was 335 Hz, most textbooks will tell you it is 440 Hz,
+and a lot of orchestras nowadays tune at 441.5 Hz.
For example,
-\begin[fragment,verbatim]{mudela}
+\begin{mudela}[fragment,verbatim]
c'4 d'4 e'4 c'4 c''4 d''4 e''4 f''4 g''4 a''4 b''4 c'''4
\end{mudela}
The duration of a note is specified as a number: a whole note is
denoted by 1, the half note by 2, the quarter by 4, and so on. Here
are some random notes to show how it works
-\begin[fragment,verbatim]{mudela}
-'c8 c8 c'16 c''32 d''64 b'64 c'''2 c1 c'4 d'4 e'4 f'4 g'4 a'4
+\begin{mudela}[fragment,verbatim]
+c,8 c8 c'16 c''32 d''64 b'64 c'''2 c1 c'4 d'4 e'4 f'4 g'4 a'4
\end{mudela}
This gives us already enough material to make simple songs:
-\begin[fragment,verbatim]{mudela}
+\begin{mudela}[fragment,verbatim]
c''4 d''4 e''4 c''4
e''4 f''4 g''2
g''8 a''8 g''8 f''8 e''4 c''4
\begin{table}[h]
\begin{center}
- \caption{Defaults note names}\label{notename-tab}
+ \caption{Default note names}\label{notename-tab}
+
\begin{tabular}{ll}
english &LilyPond\\
\hline\\
for different languages, among others English (C sharp is abbreviated
to cs), Italian, Swedish, Norwegian
-\section{Hairy rhythms}
+\section{[chords]}
+
+Up till so far we have only considered music that was rather simple.
+All the music had notes going in one direction, from left to right,
+the one following the other. You might be wondering if this is all
+Lily could do, or whether is possible to stack notes as well (creating
+\emph{chords}). Rest assured: we designed LilyPond with the goal mind
+that she must handle any notation construct that can be expressed
+conveniently. Of course, we did not leave out chords.
+
+In mudela you can form a chord of several notes, by enclosing them in
+pointed parentheses, ie, $\langle$ and $\rangle$, for example a
+D-major chord can be described by
+\begin{mudela}[fragment,verbatim]
+ <d'8 fis'8 a'8 d''8>
+\end{mudela}
+Recall what was said in the previous section about flats and sharps:
+the \texttt{fis} is an f sharp. Chords can be entered in the music in
+same places that notes can. As an example we give a snippet of
+``twinkle twinkle little star'' in chords. The chords may seem, well,
+unconventional, but they mostly serve to show how chords work
+\begin{mudela}[verbatim, fragment]
+ c''4 c''4 <c''4 g''4> <c''4 e''4 g''4>
+ <c''4 e''4 a''4> <b'4 d''4 a''4> <b'2 d''2 g''2>
+ <a'4 d''4 f''4> <bes'4 d''4 f''4> <bes'4 c''4 e''4> <g'4 c''4 e''4>
+ <e'4 a'4 d''4> <a4 g'4 cis''4> <d'2 f'2 d''2>
+\end{mudela}
+
+\section{Shortcuts}
+
+If you have typed the last example in to a mudela file, you will have
+noticed that the input has lots of repetitions. You probably made
+some little errors with the right amount of \texttt{'}'s as well. For
+these reasons, saving keystrokes and preventing errors, mudela has
+some handy shortcuts. You don't have to type the duration, if it the
+same as the last duration entered. This saves a considerable number
+of keystrokes, and thus it reduces the potential for errors. The
+previous example can be reduced to
+\begin{verbatim}
+ c''4 c'' <c'' g''> <c'' e'' g''>
+ <c'' e'' a''> <b' d'' a''> <b'2 d'' g''>
+ <a'4 d'' f''> <bes' d'' f''> <bes' c'' e''> <g' c'' e''>
+ <e' a' d''> <a g' cis''> <d'2 f' d''>
+\end{verbatim}
+
+[WARNING: relative octaves are still experimental!]
+
+The need for quotes can also be reduced: most of the pitch intervals
+in traditional music are small. Therefore, it makes sense to leave
+out the quotes when the interval is small. This is called the
+relative mode for octaves. You can switch it on by entering
+\verb+\octave relative+. From then on, the pitch of a note will be
+the closest to the last one, Thus, you can enter a scale without using
+octavation quotes:
+\begin{mudela}[fragment,verbatim]
+ \octave relative;
+ c d e f g a b c
+\end{mudela}
+
+The twinkle twinkle example reduces to the following input.
+\begin{verbatim}
+ \octave relative;
+ c'4 c <c g'> <c, e g>
+ <c, e a> <b, d a'> <b,2 d g>
+ <a,4 d f> <bes, d f> <bes, c e> <g, c e>
+ <e, a d> <a,, g' cis'> <d,2 f d'>
+\end{verbatim}
+
+\section{Finishing touch}
+
-\section{Handy input}
-% \subsection{Durations}
+\chapter{Features}
-However, having only quarter notes may get a bit dull.
Durations are entered as their reciproce values
% a1 a2 a4 a a8 a a16 a a32 a a64 a a a a
-\begin[fragment,verbatim,center]{mudela}
+\begin{mudela}[fragment,verbatim,center]
a1 a2 a4 a a8 a a16 a32 a64
\end{mudela}
note that you only have to specify
Lily assumes a note has the same duration as the previous one.
Now we can already write a little tune
-\begin[fragment,verbatim,center]{mudela}
+\begin{mudela}[fragment,verbatim,center]
c d e c | c d e c | e f g2
\end{mudela}
As you'll probably have guessed,
we left-out the last c note of the next octave.
Postfixing the pitch with a quote \verb+'+
produces a note by one octave higher
-\begin[fragment,verbatim,center]{mudela}
+\begin{mudela}[fragment,verbatim,center]
c c' c''
\end{mudela}
Prefixing the pitch with a quote \verb+'+
produces a note by one octave lower
-\begin[fragment,verbatim,center]{mudela}
-a 'a ''a
+\begin{mudela}[fragment,verbatim,center]
+a a, a,,
\end{mudela}
\section{Slurs and Ties}
A tie connects two adjacent noteheads
-\begin[fragment,verbatim,center]{mudela}
+\begin{mudela}[fragment,verbatim,center]
e' ~ e
\end{mudela}
Whereas a slur rather connects `chords',
and tries to avoid crossing stems
-\begin[fragment,verbatim,center]{mudela}
+\begin{mudela}[fragment,verbatim,center]
e'( )e
\end{mudela}
And of course, such a (legato) slur can span several notes
-\begin[fragment,verbatim,center]{mudela}
+\begin{mudela}[fragment,verbatim,center]
c( d e )f
\end{mudela}
\section{Beams and Plets}
A beam is
-\begin[fragment,verbatim,center]{mudela}
+\begin{mudela}[fragment,verbatim,center]
[a8 a] [a16 a a a]
\end{mudela}
Here's a beamed triplet
-\begin[fragment,verbatim,center]{mudela}
+\begin{mudela}[fragment,verbatim,center]
[/3 a8 a a]/1
\end{mudela}
a triplet without a beam
-\begin[fragment,verbatim,center]{mudela}
+\begin{mudela}[fragment,verbatim,center]
\[/3 a4 a8\]
\end{mudela}
and a combination
-\begin[fragment,verbatim,center]{mudela}
+\begin{mudela}[fragment,verbatim,center]
[/3 a8 a16 a] a8 \]
\end{mudela}
Abbreviations
-\begin[fragment,verbatim,center]{mudela}
+\begin{mudela}[fragment,verbatim,center]
c1:16 [:16 e1 g]
\end{mudela}
-\begin[fragment,verbatim,center]{mudela}
+\begin{mudela}[fragment,verbatim,center]
c4:32 [:16 c8 d8]
\end{mudela}
The default set are the ones we like best are the Dutch notenames.
A sharp is formed by adding \verb+is+
-\begin[fragment,verbatim,center]{mudela}
+\begin{mudela}[fragment,verbatim,center]
cis dis eis fis gis ais bis
\end{mudela}
and a flat is formed by adding \verb+es+%
%\footnote{Exceptions: \verb+es+ and \verb+as+.}
\footnote{Exceptions: {\tt es} and {\tt as}.}
-\begin[fragment,verbatim,center]{mudela}
+\begin{mudela}[fragment,verbatim,center]
ces des es fes ges as bes
\end{mudela}
With the obvious names for double sharps
-\begin[fragment,verbatim,center]{mudela}
+\begin{mudela}[fragment,verbatim,center]
cisis disis eisis fisis gisis aisis bisis
\end{mudela}
and double flats
-\begin[fragment,verbatim,center]{mudela}
+\begin{mudela}[fragment,verbatim,center]
ceses deses eses feses geses ases beses
\end{mudela}
See why we like-em?
There are two special `notenames', the rest
-\begin[fragment,verbatim,center]{mudela}
+\begin{mudela}[fragment,verbatim,center]
r16 [a a a]
\end{mudela}
and the space
-\begin[fragment,verbatim,center]{mudela}
+\begin{mudela}[fragment,verbatim,center]
a2 s-"diminuendo" | a
\end{mudela}
\section{Commands}
-\begin[fragment,verbatim,center]{mudela}
-\clef "bass"; 'c
+\begin{mudela}[fragment,verbatim,center]
+\clef "bass"; c,
\end{mudela}
and a clef-change
-\begin[fragment,verbatim,center]{mudela}
+\begin{mudela}[fragment,verbatim,center]
\clef "violin"; f' e' \clef "alto"; d' c'
\end{mudela}
-\begin[fragment,verbatim,center]{mudela}
+\begin{mudela}[fragment,verbatim,center]
\meter 3/4; c g g |
\end{mudela}
-\begin[fragment,verbatim,center]{mudela}
+\begin{mudela}[fragment,verbatim,center]
\key fis cis;
-'g 'a 'b cis d e fis g'
+g, a, b, cis d e fis g'
\end{mudela}
Note how Mudela allows you to
convey a musical message
A reminder accidental can be forced by
using an exclamation mark \verb+!+
on a pitch a reminder accidental
-\begin[fragment,verbatim,center]{mudela}
+\begin{mudela}[fragment,verbatim,center]
cis d e cis | c! d e c |
\end{mudela}
-\begin[fragment,verbatim,center]{mudela}
+\begin{mudela}[fragment,verbatim,center]
\meter 2/4;
\bar "|:"; c c \bar ":|:"; c c \bar ":|"; c c \bar "|.";
\end{mudela}
\section{Chords and Voices}
Here's a simple chord
-\begin[fragment,verbatim,center]{mudela}
+\begin{mudela}[fragment,verbatim,center]
<c e g>
\end{mudela}
here are a few
-\begin[fragment,verbatim,center]{mudela}
+\begin{mudela}[fragment,verbatim,center]
<
{ c()d()c }
{ e()f()e }
\end{mudela}
and similarly voices
-\begin[fragment,verbatim,center]{mudela}
+\begin{mudela}[fragment,verbatim,center]
<
{ \voiceone c g c g }
- { \voicetwo 'c2 'g2 }
+ { \voicetwo c,2 g,2 }
>
\end{mudela}
A Mudela file needs some red tape
-\begin[verbatim,center]{mudela}
+\begin{mudela}[verbatim,center]
\score{
\melodic {
\octave c';
\section{Lyrics}
-\begin[verbatim,center]{mudela}
+\begin{mudela}[verbatim,center]
\score{
<
\melodic{
You enter a note by giving the name and the reciprocal of the duration:
-\begin[fragment,verbatim]{mudela}
+\begin{mudela}[fragment,verbatim]
a'4 % Dutch names
\end{mudela}
is a A-1 pitched crotchet. The ' signifies an octave change. A-1 is 440
Hz concert-pitch. \verb+c'+ is also known as the central c. More examples:
-\begin[fragment,verbatim]{mudela}
- 'a % 110
+\begin{mudela}[fragment,verbatim]
+ a, % 110
a % 220
A % 110, uppercase octavates down
a' % 440
These notenames along with duration are enough material to construct
simple melodies:
-\begin[verbatim,fragment]{mudela}
+\begin{mudela}[verbatim,fragment]
\octave c';
c4 c4 g4 g4 a4 a4 g2
f4 f4 e4 e4 d4 d4 c2
\end{description}
example:
-\begin[verbatim,fragment]{mudela}
+\begin{mudela}[verbatim,fragment]
\octave c';
[c8 () d8 () e8
e8(] [)g8 <c'8] e'8> % NO nesting!
Ties connect the noteheads of adjacent notes. They are entered as follows:
-\begin[verbatim,fragment]{mudela}
+\begin{mudela}[verbatim,fragment]
a'4 ~ a''4
\end{mudela}
Slurs connect whole chords, and try to avoid crossing stems. They are
entered as follows:
-\begin[verbatim,fragment]{mudela}
+\begin{mudela}[verbatim,fragment]
a'4( )a''4
\end{mudela}
Symbols which can be put at either side (above or below) of a staff
are entered as follows:
-\begin[verbatim,fragment]{mudela}
+\begin{mudela}[verbatim,fragment]
a-^ % marcato, direction: default
%a^- % portato, direction: above note
a_. % staccato, direction: below note