From 56527576e48e8b3cf331088eb0d91f20f5b075ae Mon Sep 17 00:00:00 2001 From: fred Date: Wed, 17 Jan 2001 22:38:15 +0000 Subject: [PATCH] lilypond-1.3.124 --- Documentation/user/tutorial.itely | 187 +++++++++++++++++++++++++++++++++++++- input/test/top-staff-volta.ly | 5 + input/tutorial/flowing.ly | 2 + input/tutorial/ly2dvi.ly | 23 +++++ 4 files changed, 216 insertions(+), 1 deletion(-) create mode 100644 input/test/top-staff-volta.ly create mode 100644 input/tutorial/ly2dvi.ly diff --git a/Documentation/user/tutorial.itely b/Documentation/user/tutorial.itely index d6b1234759..d741a1434d 100644 --- a/Documentation/user/tutorial.itely +++ b/Documentation/user/tutorial.itely @@ -7,6 +7,7 @@ * Introduction:: Introduction * The first tune:: The first tune * Lyrics and chords:: Lyrics and chords +* More movements:: More than one movement in a file * Piano music:: Piano music * end of tutorial:: The end @end menu @@ -307,7 +308,7 @@ The last brace ends the @code{\score} block. There are two things to note here. The format contains musical concepts like pitches and durations, instead of symbols and positions: the input format tries to capture the meaning of @emph{music}, and not -notation. Therefore Second, the format tries to be @emph{context-free}: +notation. Second, the format tries to be @emph{context-free}: a note will sound the same regardless of the current time signature, the key, etc. @@ -318,6 +319,9 @@ symbols and their placement is @emph{generated} from a high-level musical description. In other words, LilyPond would be best described by `music compiler' or `music to notation compiler'. + + + @node Lyrics and chords @section Lyrics and chords @@ -681,6 +685,187 @@ will be set in two lines. @end example End the score block. +@node More movements +@section More movements + +You probably ran @file{ly2dvi} on the last example, and ended up with a +viewable @file{.dvi} file. However, between there are a few steps of +which LilyPond is only one. To enhance your understanding of what's +happening under the hood when you run ly2dvi, we explain what programs +are run. + +@code{ly2dvi} is a program that calls a number of programs in sequence. +The first thing it does, is running LilyPond on the input file. After +some calculations, lily comes up with a @file{.tex} file. The contents +of this file are very low-level instructions. + +For example, if you'd put the following in a file called +@file{layout.ly}, + +@example + \header @{ title = "Two miniatures"; @} + + #(set point-and-click #t) + + \paper @{ + linewidth = -1.0; @} + + \score @{ + \notes @{ c'4 d'4 @} + \header @{ + opus = "Opus 1."; + piece = "Up"; @} + @} + \score @{ + \notes @{ d'4 c'4 @} + \header @{ + opus = "Opus 2."; + piece = "Down"; @} + @} +@end example + +The result should look somewhat like this@footnote{The titling in this +manual was not generated by ly2dvi, so details will differ.} + +@center @strong{Two miniatures} +@flushright + Opus 1. +@end flushright +@flushleft +@var{Up} +@end flushleft +@lilypond + \score { + \notes { c'4 d'4 } + \paper { + linewidth = -1.0; } + } +@end lilypond +@flushright + Opus 2. +@end flushright +@flushleft +@var{Down} +@end flushleft +@lilypond + \score { + \notes { d'4 c'4 } + \paper { + linewidth = -1.0; } + } +@end lilypond + +This file is produced by ly2dvi in a few stages, with the help of text +formatting tools. LilyPond produces two output files, @file{layout.tex} +and @file{layout-1.tex}. They both look like this: + +@example + ... + \placebox@{-5 \outputscale @}% + @{ 8.7229 \outputscale @}% + @{\magfontWXGEomMMBo\char90 @}% + + \placebox@{-4 \outputscale @}% + @{ 81.0647 \outputscale @}% + ... +@end example + +@file{ly2dvi} analyses the progress indication that LilyPond spews out, +and generates a file called @file{layout_ly1.tex}. This file contains +formatting instructions for the title and page layout. A fragment might +look like +@example + + \geometry@{width=540.602362pt,headheight=2mm, ... + \renewcommand@{\@@oddfoot@}@{\parbox@{\textwidth@}@{\mbox@{@} ... + \begin@{document@} + \lilypondtitle@{foo@}% + \makelilytitle + \input@{ly2dvi.tex@} + +@end example + +@file{ly2dvi} runs it through LaTeX. LaTeX is a text-formatting system +built on top of @TeX. It's very popular in the academic world. If LaTeX +is successful, this will produce a @file{.dvi} file, containing both the +titling and notes. @code{ly2dvi} completes its task by deleting the two +temporary files, leaving only @file{layout.dvi}. + +@example + #(set point-and-click #t) +@end example + +Editing input files can be quite complicated if you're working with +large files: if you're digitizing existing music, you have to +synchronize the .ly file, the sheet music on your lap and the sheet +music on the screen. The point-and-click mechanism makes it easy to +find the origin of an error in the .ly file: @footnote{This feature is +presently only available on X-windows using a patched version of xdvi +and emacs} when you view the file with Xdvi and click on a note using +control-right button, [checkme], you editor will jump to the spot where +that note was entered. + +More information is in in @ref{Point and click} + +@example + \paper @{ +@end example + +The @code{\score} blocks that follow in the file, don't have +@code{\paper} sections, so the settings of this block are substituted: A +paper block, at top-level, i.e. not in a @code{\score} block sets the +default page layout. + +@example + linewidth = -1.0; @} +@end example + + + +The variable @code{linewidth} normally sets the length of the systems on +the page. However, a negative value has a special meaning here. If +@code{linewidth} is less than 0, no line breaks are inserted into the +score, and the spacing is set to natural length: a short phrase takes up +little space, a longer phrase more space. + +@example + \score @{ + \notes @{ c'4 d'4 @} +@end example + +In previous examples, notes were specified in relative octaves, +i.e. each note was put in the octave that would put it closest to its +predecessor. Besides relative, there is also absolute octave +specification, and it is turned on by default. In this input mode, the +central C is denoted by @code{c'}. Going down, you get @code{c} +@code{c,} @code{c,,} etc. Going up, you get @code{c''} @code{c'''} etc. + +When you're copying music from existing sheet music, relative octaves +are probably the easiest to use: it's less typing work and errors are +easily spotted. However, if you write LilyPond input, either by hand +(ie. composing) or by computer, absolute octaves is probably less work. + + +@example + \header @{ +@end example + +The @code{\header} is normally at the top of the file, where it sets +values for the rest of the file. If you want to typeset different pieces +from one file (eg. if there are multiple movements, or if you're making +a etude-book), you can put different @code{\score} +blocks into the input file. ly2dvi will assemble all LilyPond +output files into a big document. The contents of \header blocks +specified within each score, are used for the titling of each movement. +@example + opus = "Opus 1."; + piece = "Up"; @} +@end example +For example, the Opus number is put at the right, and the piece string +will be at the left. + + + @node Piano music @section Piano music diff --git a/input/test/top-staff-volta.ly b/input/test/top-staff-volta.ly new file mode 100644 index 0000000000..189286af31 --- /dev/null +++ b/input/test/top-staff-volta.ly @@ -0,0 +1,5 @@ + +voltaCommands = \notes { + s1 \property Staff.repeatCommands = #((volta . "1")) + c4 c4 c4 c4 + s1 diff --git a/input/tutorial/flowing.ly b/input/tutorial/flowing.ly index 0a46021c07..8307139e96 100644 --- a/input/tutorial/flowing.ly +++ b/input/tutorial/flowing.ly @@ -2,7 +2,9 @@ title = "The river is flowing"; composer = "Traditonal (?)"; } + \include "paper16.ly" + melody = \notes \relative c' { \partial 8; g8 | diff --git a/input/tutorial/ly2dvi.ly b/input/tutorial/ly2dvi.ly new file mode 100644 index 0000000000..a3abb07096 --- /dev/null +++ b/input/tutorial/ly2dvi.ly @@ -0,0 +1,23 @@ + \header { + title = "Two miniatures"; + } + + #(set point-and-click #t) + + \paper { linewidth = -1.0; } + + \score { + \notes { c'4 d'4 } + \header { + opus = "Opus 1."; + piece = "Up"; + } + } + + \score { + \notes { d'4 c'4 } + \header { + opus = "Opus 2."; + piece = "Down"; + } + } -- 2.11.4.GIT