From 366ab19c99c62435a284c6c1cefeb6079bc65a51 Mon Sep 17 00:00:00 2001 From: gpercival Date: Tue, 7 Jun 2005 05:29:30 +0000 Subject: [PATCH] New section on modifying templates and misc small changes. --- ChangeLog | 7 + Documentation/user/converters.itely | 4 +- Documentation/user/invoking.itely | 7 +- Documentation/user/lilypond.tely | 6 + Documentation/user/putting.itely | 193 +++++++++++++++++++++++++++- 5 files changed, 208 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 86f16dd29a..f1ee7606d8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-06-07 Graham Percival + + * Documentation/user/putting.itely: add info on modifying templates. + + * Documentation/user/lilypond.itely, converters.itely, invoking.itely: + misc small changes. + 2005-06-07 Han-Wen Nienhuys * VERSION (PACKAGE_NAME): release 2.5.28 diff --git a/Documentation/user/converters.itely b/Documentation/user/converters.itely index 68bface71f..f2e852e0c6 100644 --- a/Documentation/user/converters.itely +++ b/Documentation/user/converters.itely @@ -262,10 +262,10 @@ These tools include @uref{http://nicolas@/.sceaux@/.free@/.fr/lilypond/lyqi@/.html,lyqi}, an Emacs major mode. @item @uref{http://@/www@/.nongnu@/.org/@/xml2ly/, xml2ly}, which imports -@uref{http://@/www@/.musicxml@/.com/,MusicXML} +@uref{http://@/www@/.musicxml@/.com/xml@/.html,MusicXML} @item @uref{http://@/rnvs@/.informatik@/.tu@/-chemnitz@/.de/@/~jan/@/noteedit/@/noteedit@/.html,NoteEdit} -which imports MusicXML +which imports @uref{http://@/www@/.musicxml@/.com/xml@/.html,MusicXML} @item @uref{http://@/www@/.all@/-day@/-breakfast@/.com/@/rosegarden/,Rosegarden}, which imports MIDI diff --git a/Documentation/user/invoking.itely b/Documentation/user/invoking.itely index 44a4950d66..115c105054 100644 --- a/Documentation/user/invoking.itely +++ b/Documentation/user/invoking.itely @@ -427,6 +427,10 @@ convert-ly -e myfile.ly If there are no changes to myfile.ly and file called myfile.ly.NEW is created, then myfile.ly is already updated. +@command{convert-ly} always converts up to the last syntax change handled by +it. This means that the @code{\version} number left in the file is +usually lower than the version of @command{convert-ly} itself. + To upgrade LilyPond fragments in texinfo files, use @example @@ -476,9 +480,6 @@ available version. Print usage help. @end table -@command{convert-ly} always converts up to the last syntax change handled by -it. This means that the @code{\version} number left in the file is -usually lower than the version of @command{convert-ly} itself. @refbugs diff --git a/Documentation/user/lilypond.tely b/Documentation/user/lilypond.tely index 0b0da3f656..c3d401a5e5 100644 --- a/Documentation/user/lilypond.tely +++ b/Documentation/user/lilypond.tely @@ -13,6 +13,8 @@ Current version of the manual: 2.5.18 Please update this whenever you run convert-ly on the docs. +convert-ly --from=... --to=... --no-version *.itely + %%%%% Distributions will want to install lilypond.info in postinstall, doing: @@ -79,6 +81,10 @@ HINTS FOR STYLE * Avoid fluff (``Notice that,'' ``as you can see,'' ``Currently,''). +* The above three suggestions refer to the formal Notation Manual + (chapters 5 and up). In the Tutorial, Example templates, and + Putting it all together, you may write more colloquially + * The use of the word `illegal' is inappropriate in most cases. Say `invalid' instead. diff --git a/Documentation/user/putting.itely b/Documentation/user/putting.itely index b5c6e1a249..c6e24ae369 100644 --- a/Documentation/user/putting.itely +++ b/Documentation/user/putting.itely @@ -2,15 +2,14 @@ @node Putting it all together @chapter Putting it all together -This section will demonstrate more complicated stuff in LilyPond, probably -via annotated examples. It's currently incomplete and serves as a -placeholder so that the chapter numbering doesn't change later. +This section explains how to use the rest of the documentation and +how to solve common problems. @menu * Suggestions for writing LilyPond files:: +* Extending the templates:: @end menu -@c explain \score{} ? Add a note to the tutorial? @node Suggestions for writing LilyPond files @section Suggestions for writing LilyPond files @@ -59,3 +58,189 @@ don't comment the file. @end itemize +@node Extending the templates +@section Extending the templates + +You've read the tutorial, you know how to write music. But how can you +get the staves that you want? The templates are ok, but what if you +want something that isn't covered? + +Start off with the template that seems closest to what you want to end +up with. Let's say that you want to write something for soprano and +cello. In this case, we would start with ``Notes and lyrics'' (for the +soprano part). + +@example +\version "2.4.0" +melody = \relative c' @{ + \clef treble + \key c \major + \time 4/4 + + a4 b c d +@} + +text = \lyricmode @{ + Aaa Bee Cee Dee +@} + +\score@{ + << + \context Voice = one @{ + \autoBeamOff + \melody + @} + \lyricsto "one" \new Lyrics \text + >> + \layout @{ @} + \midi @{ \tempo 4=60 @} +@} +@end example + +Now we want to add a cello part. Let's look at the ``Notes only'' example: + +@example +\version "2.4.0" +melody = \relative c' @{ + \clef treble + \key c \major + \time 4/4 + + a4 b c d +@} + +\score @{ +\new Staff \melody +\layout @{ @} +\midi @{ \tempo 4=60 @} +@} +@end example + +We don't need two @code{\version} commands. We'll need the @code{melody} +section. We don't want two @code{\score} sections -- if we had two +@code{\score}s, we'd get the two parts separately. We want them together, +as a duet. Within the @code{\score} section, we don't need two +@code{\layout} or @code{\midi}. + +If we simply cut and paste the @code{melody} section, we would end up with +two @code{melody} sections. So let's rename them. We'll call the one +for the soprano @code{sopranoMusic}, and the one for the cello can be +called @code{celloMusic}. While we're doing this, let's rename @code{text} +to be @code{sopranoLyrics}. Remember to rename both instances of all +these names -- both the initial definition (the +@code{melody = relative c' @{ } part) and the name's use (in the +@code{\score} section). + +While we're doing this, let's change the cello part's staff -- celli +normally use bass clef. We'll also give the cello some different +notes. + +@example +\version "2.4.0" +sopranoMusic = \relative c' @{ + \clef treble + \key c \major + \time 4/4 + + a4 b c d +@} + +sopranoLyrics = \lyricmode @{ + Aaa Bee Cee Dee +@} + +celloMusic = \relative c @{ + \clef bass + \key c \major + \time 4/4 + + d4 g fis8 e d4 +@} + +\score@{ + << + \context Voice = one @{ + \autoBeamOff + \sopranoMusic + @} + \lyricsto "one" \new Lyrics \sopranoLyrics + >> + \layout @{ @} + \midi @{ \tempo 4=60 @} +@} +@end example + +This is looking promising, but the cello part won't appear in the +score -- we haven't used it in the @code{\score} section. If we +want the cello part to appear under the soprano part, we need to add + +@example +\new Staff \celloMusic +@end example + +@noindent +underneath the soprano stuff. We also need to add @code{<<} and +@code{>>} around the music -- that tells LilyPond that there's +more than one thing (in this case staff) happening at once. The +@code{\score} looks like this now + +@example +\score@{ +<< + << + \context Voice = one @{ + \autoBeamOff + \sopranoMusic + @} + \lyricsto "one" \new Lyrics \sopranoLyrics + >> + \new Staff \celloMusic +>> + \layout @{ @} + \midi @{ \tempo 4=60 @} +@} +@end example + +@noindent +This looks a bit messy; the indentation is messed up now. That is +easily fixed. Here's the complete soprano and cello template. + +@lilypond[quote,verbatim,raggedright] +\version "2.4.0" +sopranoMusic = \relative c' { + \clef treble + \key c \major + \time 4/4 + + a4 b c d +} + +sopranoLyrics = \lyricmode { + Aaa Bee Cee Dee +} + +celloMusic = \relative c { + \clef bass + \key c \major + \time 4/4 + + d4 g fis8 e d4 +} + +\score{ + << + << + \context Voice = one { + \autoBeamOff + \sopranoMusic + } + \lyricsto "one" \new Lyrics \sopranoLyrics + >> + \new Staff \celloMusic + >> + \layout { } + \midi { \tempo 4=60 } +} +@end lilypond + + -- 2.39.5