From: fred Date: Sun, 24 Mar 2002 20:09:47 +0000 (+0000) Subject: lilypond-0.1.56 X-Git-Tag: release/1.5.59~3205 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=184020d29dc745425c71d1f17a05d5d05d301246;p=lilypond.git lilypond-0.1.56 --- diff --git a/Documentation/Makefile.am b/Documentation/Makefile.am index 2d04c0c7d2..6ed22de202 100644 --- a/Documentation/Makefile.am +++ b/Documentation/Makefile.am @@ -1,7 +1,7 @@ # Generated automatically by wild-perl 0.1 # Documentation/Makefile.am.wild -DOCFILES = introduction.doc mudela-course.doc mudela-man.doc +DOCFILES = introduction.doc mudela-man.doc PODFILES = AUTHORS.pod CodingStyle.pod INSTALL.pod MANIFESTO.pod PATCHES.pod convert-mudela.pod faq.pod gnu-music.pod index.pod internals.pod language.pod lilypond.pod links.pod literature.pod ly2dvi.pod mi2mu.pod mudela-book.pod mutopia.pod other-packages.pod OUTPODFILES = $(PODFILES) TEXTFILES = $(OUTPODFILES:.pod=.txt) @@ -12,7 +12,7 @@ DVIFILES = $(DOCFILES:.doc=.dvi) XPMS = lelie_icon.xpm lelie_logo.xpm lelieblond.xpm giffiles = $(XPMS:.xpm=.gif) -EXTRA_DIST = Makefile.am.wild Rules.make $(XPMS) $(DOCFILES) $(PODFILES) vocabulary-data vocabulary-forms.el +EXTRA_DIST = Makefile.am.wild Rules.make $(XPMS) $(DOCFILES) $(PODFILES) vocabulary-data vocabulary-forms.el fonts.tex MAN1FILES = lilypond convert-mudela mi2mu mudela-book ly2dvi MAN1GROFF = $(addsuffix .1,$(MAN1FILES)) diff --git a/Documentation/introduction.doc b/Documentation/introduction.doc index 1af131b13f..64c81baf67 100644 --- a/Documentation/introduction.doc +++ b/Documentation/introduction.doc @@ -19,7 +19,7 @@ \documentclass{article} \usepackage{a4wide} \title{Introduction to GNU LilyPond} -\author{Jan Nieuwenhuizen} +\author{Jan Nieuwenhuizen \& Han-Wen Nienhuys} \date{March 2, 1998} \def\file#1{\verb+#1+} @@ -72,49 +72,173 @@ \emph{\Large ***Under construction***} \section{Introduction} -This document should provide a gentle introduction to -LilyPond's input language, Mudela. -For completeness and nifty features see -\file{input/*.ly} -and -\file{lily/parser.y}, \file{lily/lexer.l}. -By tradition, Mudela files have the extension \file{.ly}. - -Mudela is an ascii script language -that is especially designed -to be easy to read and write. -In the following sections -the basic elements of Mudela are presented -in a series of simple examples. -Each example has -a verbatim snippet of Mudela% -% a snippet of Mudela as it's typed-in% -\footnote{ -In an effort not to bore you too much with details, -we leave-out some red tape -that's needed for a valid piece of Mudela. -Therefore, before you try-out any of the examples, -be sure to read the section `A complete example'.} -on the left -and the resulting fragment of music on the right -as it was produced by LilyPond. - -\section{Notes} - -Let's start with a single note, a quarter C - -\begin[fragment,verbatim,center]{mudela} -c +This document is a gentle introduction to using LilyPond to typeset +simple music. + + +LilyPond is a so called ``batch'' program. This means, that you use a +texteditor (such as emacs or vi) to create an input file. When you +are done editing your input file, you run LilyPond. If Lily +finds any errors in your input file she\footnote{ If computer programs +could have gender, we're sure that LilyPond is a female computer +program, so we will refer to the program as a she. This gender-bending +is not to tease you, dear reader. We do it in real life as well. In +the past two years LilyPond has become sort of a baby daughter to us, +keeping us awake at night, but also providing lots of joy. We hope +you do not mind our little aberration from computer-manual tradition. +% +% The name LilyPond is actually sort of a girl's name. Can you guess which +% one ? +% +} complain. If everything is well, than she'll generate a file that +you can process further to view or print it. + +To get you started we'll run down the full procedure for you once. + +\begin{enumerate} +\item +Fire up your favourite editor (if you know none, try \texttt{joe silly.ly}), +and key in the following text: +\begin{verbatim} +\score { + < + \type Staff = aStaff \melodic { g'2 e'4 } + \type Lyrics = yell \lyric { Air2 ball!4 } + > +} +\end{verbatim} + +save your file as \file{silly.ly}. As might have noticed, the input +files to LilyPond have the extension \file{.ly}. + +\item +Run LilyPond on your newly created file: \verb+lilypond silly+. +LilyPond will then print all kinds of mumbo jumbo that can safely +ignored. +You might see something like this: +\begin{verbatim} +GNU LilyPond 0.1.55/FlowerLib 1.1.39 +Parsing ... [/home/hanwen/musix/spacer/init/lily-init.ly[/home/hanwen/ + + ... stuff left out here ... + + Documentation/silly.ly] +Interpreting music ...[1] (time: 0.04 seconds) +Preprocessing elements... +Calculating column positions ... [2] +Approximated: 1 lines, (with an average of 4.0 columns) +Time: 0.01 seconds +warning: Can not solve this casting problem exactly; revert to Word_wrap +[2]Time: 0.00 seconds + +Postprocessing elements... +TeX output to silly.tex ... +\end{verbatim} + All has gone well; there were some warning but no errors. The + output is a \file{TeX}\footnote{% + \file{TeX} is usually spelled as + \TeX. It is batch program for typesetting text, developed by the + famous programmer and scientist Donald Knuth to typeset his famous The + Art of Computer Programming bookseries. As you can see \TeX\ can be + adapted to do a lot more. In fact, the document that you are + reading was also done with \TeX.} file, and it is called + \file{silly.tex}. +\item + To do something useful with the output you have to run \TeX\ on it + first. type \verb+tex silly+. The output should resemble this: +\begin{verbatim} +This is TeX, Version 3.14159 (C version 6.1) +(silly.tex +Babel and hyphenation patterns for american, dutch, loaded. +(/home/hanwen/lib/texmf/tex/lilypond/lilyponddefs.tex +(/home/hanwen/lib/texmf/tex/lilypond/dyndefs.tex) +(/home/hanwen/lib/texmf/tex/lilypond/fetdefs.tex +(/home/hanwen/lib/texmf/tex/lilypond/feta20.tex) +(/home/hanwen/lib/texmf/tex/lilypond/lily-ps-defs.tex))) [1] ) +Output written on silly.dvi (1 page, 3084 bytes). +Transcript written on silly.log. +\end{verbatim} + The human translation is ``everything went OK, the result is one + page long, and I put it in \file{silly.dvi}''. The \file{silly.dvi} + file is a description of how a piece of text looks when it is + printed. You can view it, or print it. If you are using a Unix + system equipped with X-Windows, issue the command \file{xdvi silly} + to view the result. If this is not the case, consult your local + \TeX\ guru on printing and viewing DVI files. What is in your + window should look like this: +\begin{mudela} +\score { + < + \type Staff = aStaff \melodic { g'2 e'4 } + \type Lyrics = yell \lyric { Air2 ball!4 } + > +} \end{mudela} +\end{enumerate} + +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, +special words and punctation. The remainder of this document explains +how to combine these elements to express a piece of music in the +language that LilyPond understands. So we try to explain how to use +LilyPond, and not how LilyPond works; the input language of LilyPond +is the subject of the document. For want of a better name we call +this language Mudela (short for Music Description Language). + +This document does not cover all of Mudela. Due to technical details, +the precise working of Mudela is coupled to the innards of LilyPond. +If you really want to know all the details, your best bet would be to +get the sources to LilyPond and read the parser and scanner +source\footnote{ They are in \file{lilypond-x.y.z/lily/parser.y}, +\file{lilypond-x.y.z/lily/lexer.l}. Of course, it would be even +better if you would improve LilyPond and send the resulting diffs to +us. But that would a really different ballpark (And we +haven't started on the programming guide yet.)} + +In the following sections the basic elements of Mudela are presented. +We don't want to bore you too much with details, so we will leave-out +some red tape that's needed for a valid piece of Mudela: to be +precise, we will write \verb+X Y Z+, when we really mean +\begin{verbatim} +\score { + \melodic { X Y Z } + \paper {} +} +\end{verbatim} +Usually, we will also print the resulting fragment of music on the +right just as it was produced by LilyPond. -Now that was easy and entering a scale is not much harder +For the remainder we will assume that you can carry out steps 1 to 4 +from the above instruction. We will also assume that you know how +music notation works, and that you are familiar with terms such as +``note'', ``clef'', ``slur'' etc. -%\subsection{Pitches} +\section{When you know the notes to print\ldots} +The basic building block of music is the note. You can have LilyPond +print a note by specifying the pitch and the duration. The pitch of +the central C, also know as c$^1$ is written as \verb+c'+. A quarter +note duration is written as \verb+4+: \begin[fragment,verbatim,center]{mudela} -c d e f g a b +c'4 +\end{mudela} +The \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 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. This gives us already +enough material to make simple songs: +\begin[fragment,verbatim]{mudela} + 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 + c''4 g'4 c''2 \end{mudela} +You might wonder: ``what if I would + + % \subsection{Durations} However, having only quarter notes may get a bit dull. @@ -280,71 +404,6 @@ cis d e cis | c! d e c | \bar "|:"; c c \bar ":|:"; c c \bar ":|"; c c \bar "|."; \end{mudela} -\section{Scripts} - -Staccato may be abbreviated -\begin[fragment,verbatim,center]{mudela} -a-\staccato a-. -\end{mudela} - -Marcato -\begin[fragment,verbatim,center]{mudela} -a-\marcato a-| -\end{mudela} - -Staccatissimo -\begin[fragment,verbatim,center]{mudela} -a-\staccatissimo a-^ -\end{mudela} - -Sforzato -% duh? -% a-\sforzato a-> -\begin[fragment,verbatim,center]{mudela} -a-\accent a-> -\end{mudela} - -\begin[fragment,verbatim,center]{mudela} -a-\fermata -\end{mudela} - -\begin[fragment,verbatim,center]{mudela} -a-\fermata -\end{mudela} - -Dynamics from pianississimo upto mezzopiano -\begin[fragment,verbatim,center]{mudela} -a\ppp a\pp a\p a\mp -\end{mudela} - -from fortississimo downto mezzoforte -\begin[fragment,verbatim,center]{mudela} -a\fff a\ff a\f a\mf -\end{mudela} - -sforzando, sforzato and rinforzato -% huh? -% a\sfz a\sf a\rf -\begin[fragment,verbatim,center]{mudela} -a\sfz a\sf -\end{mudela} - -Fingering -\begin[fragment,verbatim,center]{mudela} -[e8-1 c'-5 g-3 f-2] a''-\flageolet -\end{mudela} - -Bowing -\begin[fragment,verbatim,center]{mudela} -c-\upbow d-\downbow -\end{mudela} - -Footwork -\begin[fragment,verbatim,center]{mudela} -\clef "bass"; \octave c; - 'b4.-\lheel [cis8-\ltoe dis8-\rtoe e8-\rheel] -\end{mudela} - \section{Chords and Voices} Here's a simple chord @@ -419,3 +478,98 @@ See \file{ly2dvi (1)}. \end{document} +% kut en peer. + +\begin{verbatim} + +% twinkle, v1 +\score { + \melodic { + c4 c4 g4 g4 a4 a4 g2 + f4 f4 e4 e4 d4 d4 c2 + } + \paper {} +} +\end{verbatim} + +there are a few things to note about this example: + +The braces are grouping characters. In general, in mudela data entry +for a data section called ``foobar'' looks like this: + +\begin{verbatim} +\foobar { ...... } +\end{verbatim} + +To see if it actually works, we run it through LilyPond. Invoke the +command +\begin{verbatim} + lilypond twinkle.ly +\end{verbatim} +When LilyPond starts working it will produce various ``operator +pacification'' messages, which you can safely ignore for now. The run +should have left a file called \file{lelie.tex} in your working +directory. You can process that file with \TeX, and it will look like +this: + +\begin{mudela} +\score { + \melodic { + c4 c4 g4 g4 a4 a4 g2 + f4 f4 e4 e4 d4 d4 c2 + } + \paper {} +} +\end{mudela} + +As you can see, this is the song that we wanted, albeit a little +low-pitched. You would probably want a version of the song which has +all notes an octave higher. This can be done by adding a +\verb+\octave+ command to the source. This sets the default octave +for all notes. Another convenience is the default duration: if you do +not specify a duration with the notename, the last explicitly entered +is used. The improved version reads thus + + +\begin[verbatim]{mudela} + % twinkle v2 +\score { + \melodic { + \octave c'; + c4 c g g a a g2 + f4 f e e d d c2 + } + \paper {} +} +\end{mudela} + + + +FIXME rewrite starting here. + +\begin[verbatim]{mudela} + \score { + \melodic { % {...} is a voice + c'4 g'4 % c and g are pitches, 4 is the duration + % (crotchet/quarter note) + c''4 ''c4 % c' is 1 octave up, 'c 1 down. + % <...> is a chord + } +} +\end{mudela} + + +\begin[fragment,verbatim]{mudela} + { c4 e4 g4 } +\end{mudela} + +Basics: the \verb+%+ introduces a comment. All music is inside a +\verb+\score+ block which represents one movement, ie one contiguous +block of music. Voices are grouped by \verb+{+ and \verb+}+ and +chords by \verb+<+ and \verb+>+. + + +The \verb+\octave+ command controls the default pitch (octave). If you +do not specify duration, the last one entered is used. The +\verb+\paper+ block contains parameters for spacing and dimensions. + diff --git a/bin/make-website.in b/bin/make-website.in index e574780344..2f636547a0 100644 --- a/bin/make-website.in +++ b/bin/make-website.in @@ -187,7 +187,7 @@ def gen_list(inputs, filename): list.write( ""); list.close() -texstuff = ["mudela-man", "mudela-course"] +texstuff = ["mudela-man", "introduction"] def gen_manuals(): print 'generating TeX doco manuals' diff --git a/input/Makefile.am b/input/Makefile.am index 3bdf8d9dc1..095d3806a8 100644 --- a/input/Makefile.am +++ b/input/Makefile.am @@ -1,7 +1,7 @@ # Generated automatically by wild-perl 0.1 # input/Makefile.am.wild -LYFILES = beam-bug.ly beams.ly cadenza.ly collisions.ly coriolan-alto.ly denneboom.ly font-body.ly font.ly font11.ly font13.ly font16.ly font20.ly font26.ly gourlay.ly keys.ly kortjakje.ly multi.ly pedal.ly praeludium-fuga-E.ly rhythm.ly scales.ly scripts.ly sleur.ly slurs.ly spacing.ly stem.ly test-lyrics.ly tril.ly twinkle-pop.ly twinkle.ly +LYFILES = abbrev.ly beam-bug.ly beams.ly cadenza.ly collisions.ly coriolan-alto.ly denneboom.ly font-body.ly font.ly font11.ly font13.ly font16.ly font20.ly font26.ly gourlay.ly keys.ly kortjakje.ly multi.ly pedal.ly praeludium-fuga-E.ly rhythm.ly scales.ly scripts.ly sleur.ly slurs.ly spacing.ly stem.ly test-lyrics.ly tril.ly twinkle-pop.ly twinkle.ly TEXFILES = dummy.tex M4FILES = dummy.m4 EXTRA_DIST = Makefile.am.wild TODO $(LYFILES) $(TEXFILES) $(M4FILES) diff --git a/mf/Makefile.am b/mf/Makefile.am index c5026972b0..26f66e0e44 100644 --- a/mf/Makefile.am +++ b/mf/Makefile.am @@ -13,7 +13,7 @@ outdir = . TEXFILES = dimen.tex dyn.tex MFFILES = feta-autometric.mf feta-banier.mf feta-beams16.mf feta-beams20.mf feta-beams26.mf feta-beugel.mf feta-beum.mf feta-black16.mf feta-bolletjes.mf feta-braces16.mf feta-braces20.mf feta-brackets16.mf feta-brackets20.mf feta-din10.mf feta-eindelijk.mf feta-generic.mf feta-haak.mf feta-ital-f.mf feta-ital-m.mf feta-ital-p.mf feta-ital-r.mf feta-ital-s.mf feta-ital-z.mf feta-klef.mf feta-macros.mf feta-nummer-generic.mf feta-nummer.mf feta-nummer10.mf feta-nummer12.mf feta-nummer3.mf feta-nummer4.mf feta-nummer5.mf feta-nummer6.mf feta-nummer7.mf feta-nummer8.mf feta-params.mf feta-puntje.mf feta-schrift.mf feta-slag.mf feta-sleur.mf feta-test16.mf feta-test20.mf feta-toevallig.mf feta-watzieik.mf feta11.mf feta13.mf feta16.mf feta19.mf feta20.mf feta23.mf feta26.mf grayimagen.mf MFDEPS = $(outdir)/mf.dep -EXTRA_DIST = Makefile.am.wild GNUmakefile Rules.make $(MFFILES) $(TEXFILES) TODO README +EXTRA_DIST = Makefile.am.wild GNUmakefile Rules.make $(MFFILES) $(TEXFILES) TODO FONT_FILES = feta-beams16.mf feta-beams20.mf feta-beams26.mf feta-black16.mf feta-braces16.mf feta-braces20.mf feta-brackets16.mf feta-brackets20.mf feta-din10.mf feta-nummer10.mf feta-nummer12.mf feta-nummer3.mf feta-nummer4.mf feta-nummer5.mf feta-nummer6.mf feta-nummer7.mf feta-nummer8.mf feta-test16.mf feta-test20.mf feta11.mf feta13.mf feta16.mf feta19.mf feta20.mf feta23.mf feta26.mf FET_FILES = feta11.mf feta13.mf feta16.mf feta19.mf feta20.mf feta23.mf feta26.mf