-these names, you should look at bind(Section)ref(subsect:include) for
-information on how to use include files.
-
-sect(Running LilyPond)
-label(sec:running-lilypond)
-
-In the previous section some basic elements of Mudela were presented.
-We didn't want to bore you too much with repetitive details, so we
-left out some red tape that's needed for a of Mudela in a form that is accepted
-by LilyPond. To
-be precise, we wrote code(X Y Z), when we really meant
-verb(\score {
- \notes { X Y Z }
- \paper {}
-})
-We will continue to leave out the red tape this, until the time is right to explain what
-it means.
-
-
-Because LilyPond uses a language, it is a so called em(batch)
-program.
-This means, that you use a
-text editor (such as code(emacs) or code(vi)) to create an input
-file. When you are done editing your input file, you save it, and you
-run LilyPond on the file. If LilyPond finds any errors in your input file
-then nop(she)footnote(We're sure that if computer programs could have
- gender, LilyPond would be 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 us with lots of joy. We hope you do
- not mind our little aberration from the traditions of computer-manual
- writing.) COMMENT(
- The name LilyPond is actually sort of a girl's name. Can you guess which
- one ?)
-will complain. If everything went well, then she'll generate a file, that
-you can process further to view or print.
-
-Using LilyPond to print or view some music is a four-step procedure.
-To get you started we'll run down the full procedure for you.
-
-enumerate(
-it()
-Fire up your favourite editor (if you don't
-know any editors, try code(joe silly.ly)),
-and key in the example from bind(Figure)ref(fig:twinkle1), with red tape:
-verb(
-\score {
- \notes {
- c''4 c''4 g''4 g''4
- a''4 a''4 g''2
- }
- \paper {}
-}
-)
-
-Save your file as file(twinkle.ly).footnote(The default extension for Mudela
-files is file(.ly).)
-
-it()
-Run LilyPond on your newly created file: enter code(lilypond twinkle).
-LilyPond will then print all kinds of mumbo jumbo that can safely be
-ignored. You might see something like this:
-verb(
-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/twinkle.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 twinkle.tex ...
-)
-
-All has gone well; there were some warnings but no errors. The run
-resulted in output, a TeX file called file(twinkle.tex).
-
-file(TeX) is usually spelled TeX(). It is a batch program for
-typesetting text. It was developed by the great programmer and
-scientist Donald Knuth to typeset his famous bookseries em(The Art of
-Computer Programming). As you can see, TeX() can be adapted to do a
-lot more. whenlatex(In fact, the document that you are reading now was also
-produced with TeX().) COMMENT(ugh.)
-
-
-it()
- To do something useful with the output you have to run TeX() on it
- first. Run the command code(tex twinkle). The output should resemble this:
-verb(
-This is TeX, Version 3.14159 (C version 6.1)
-(twinkle.tex
-Babel <v3.6h> 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 twinkle.dvi (1 page, 3084 bytes).
-Transcript written on twinkle.log.
-)
- The human translation is ``everything went OK, the result is one
- page long, and I put it in file(twinkle.dvi).''
-
-it()The file(twinkle.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, then you can issue
-the command file(xdvi twinkle) 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 approximately look like this:
-mudela()(
-\score {
- \notes {
- c''4 c''4 g''4 g''4
- a''4 a''4 g''2
- }
- \paper { linewidth = 13.\cm; }
-}
-)
-
-it()
-If you want to print file(twinkle.dvi), you should invoke the command
-code(dvips twinkle). Running this command should generate a
-PostScript file called file(twinkle.ps). This file can be printed on
-any PostScript compatible printer. You should not use any other
-tools: the output from LilyPond contains fragments of PostScript which
-will not print correctly if you don't use PostScript. If your printer
-doesn't understand PostScript, you should check out GhostScript, a
-PostScript emulator.
-)
-
-
-
-The four-pass procedure sketched above is a bit clumsy. Moreover, the
-result is pretty crude: the page does not include prettily printed
-titles and if you are unlucky, the margins don't come out well. Jan
-Arne Fagertun wrote a tool to take the above steps out of your hands,
-make neat margins and print titling. The tool is called file(ly2dvi),
-and it should be on your system if you use Lily on a Unix platform.
-If you use file(ly2dvi), then you can do verb(ly2dvi twinkle.ly ) in
-stead of steps 2 and 3. You will feel the real advantage of using
-file(ly2dvi) when you add titling to the music. This is something
-that we will discuss in bind(Section)ref(tutorial:titling).
-
-
-COMMENT(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.
-They are in file(lilypond-x.y.z/lily/parser.yy) and
-file(lilypond-x.y.z/lily/lexer.ll).)
-