Trevor Daniels wrote:
> I suggest you dump this as a template in A.4 for now.

Let me make sure I'm doing this right.

1) commit the attached patch
2) run scripts/auxiliar/makelsr.py
3) commit that result as "Doc: Update LSR."
4) make doc (compiles cleanly)
5) post the patch here for approval
6) push if they say it's okay?

I've made it as far as step 5.  How does it look?

- Mark


      
From aa2351b5901fd122161b96e96ec0ef1381254462 Mon Sep 17 00:00:00 2001
From: Mark Polesky <[email protected]>
Date: Sat, 8 May 2010 18:03:05 -0700
Subject: [PATCH] Doc: LM: Make verse-and-refrain example into a template.

---
 Documentation/learning/fundamental.itely           |  207 --------------------
 Documentation/learning/templates.itely             |    5 +
 ...cal-ensemble-template-with-verse-and-refrain.ly |   99 ++++++++++
 3 files changed, 104 insertions(+), 207 deletions(-)
 create mode 100644 Documentation/snippets/new/vocal-ensemble-template-with-verse-and-refrain.ly

diff --git a/Documentation/learning/fundamental.itely b/Documentation/learning/fundamental.itely
index 0965b5a..7404324 100644
--- a/Documentation/learning/fundamental.itely
+++ b/Documentation/learning/fundamental.itely
@@ -1334,213 +1334,6 @@ VerseFour  =
 }
 @end lilypond
 
-...@cindex verse and refrain
-
-We end with an example to show how we might code a solo verse which
-continues into a two-part refrain in two staves.  The positioning
-of the sequential and simultaneous sections to achieve this within
-a single score is quite tricky, so follow the explanation carefully!
-
-Let's start with a score block containing a @code{ChoirStaff}, as
-we would like the brace to appear at the start of the chorus.
-Normally you would need angle brackets after @code{\new ChoirStaff}
-to bring in all the staves in parallel, but here we want to
-defer the parallelism during the solo so we use braces, although
-angle brackets here wouldn't hurt.  Inside the @code{ChoirStaff} we
-want first the staff which will contain the verse.  This must
-contain notes and lyrics in parallel, so here we need angle
-brackets around the @code{\new Voice} and @code{\new Lyrics} to
-start them at the same time:
-
-...@lilypond[quote,verbatim,ragged-right]
-versenotes = \relative c'' {
-  \clef "treble"
-  \key g \major
-  \time 3/4
-  g4 g g | b4 b b |
-}
-
-versewords = \lyricmode {
-  One two three | four five six |
-}
-
-\score {
-  \new ChoirStaff {
-    \new Staff <<
-      \new Voice = "verse" {
-        \versenotes \break
-      }
-      \new Lyrics \lyricsto verse {
-        \versewords
-      }
-    >>
-  }
-}
-...@end lilypond
-
-That gives the verse line.
-
-Now we want to continue with refrainA on the same staff while a
-second staff is introduced in parallel with it for refrainB, so
-this is a parallel section which must be positioned immediately
-following the @code{\break} in the verse Voice.  Yes, @emph{within}
-the verse Voice!  Here's that parallel section.  More staves
-could be introduced here in the same way.
-
-...@example
-<<
-  \refrainnotesA
-  \new Lyrics \lyricsto verse @{
-    \refrainwordsA
-  @}
-  \new Staff <<
-    \new Voice = "refrainB" @{
-      \refrainnotesB
-    @}
-    \new Lyrics \lyricsto "refrainB" @{
-      \refrainwordsB
-    @}
-  >>
->>
-...@end example
-
-Here's the final result with two staves in the chorus showing
-how the parallel section is positioned within the verse Voice:
-
-...@lilypond[quote,verbatim, ragged-right]
-versenotes = \relative c'' {
-  \clef "treble"
-  \key g \major
-  \time 3/4
-  g4 g g | b4 b b |
-}
-versewords = \lyricmode {
-  One two three | four five six |
-}
-refrainnotesA = \relative c'' {
-  \clef "treble"
-  \key g \major
-  \time 2/4
-  c4 c | g4 g | \bar "|."
-}
-refrainwordsA = \lyricmode {
-  la la | la la |
-}
-refrainnotesB = \relative c {
-  \clef "bass"
-  \key g \major
-  \time 2/4
-  c4 e | d4 d |
-}
-refrainwordsB = \lyricmode {
-  dum dum | dum dum |
-}
-
-\score {
-  \new ChoirStaff {
-    \new Staff <<
-      \new Voice = "verse" {
-        \versenotes \break
-        <<
-          \refrainnotesA
-          \new Lyrics \lyricsto "verse" {
-            \refrainwordsA
-          }
-          \new Staff <<
-            \new Voice = "refrainB" {
-              \refrainnotesB
-            }
-            \new Lyrics \lyricsto "refrainB" {
-              \refrainwordsB
-            }
-          >>
-        >>
-      }
-      \new Lyrics \lyricsto "verse" {
-        \versewords
-      }
-    >>
-  }
-}
-...@end lilypond
-
-...@cindex book, example of using
-...@funindex \book
-...@funindex book
-
-However, although this is an interesting and useful exercise to
-help you to understand how sequential and simultaneous blocks work,
-in practice one would perhaps choose to code this as two
-...@code{\score} blocks within an implicit @code{\book} block, as
-follows:
-
-...@lilypond[quote,verbatim,ragged-right]
-versenotes = \relative c'' {
-  \clef "treble"
-  \key g \major
-  \time 3/4
-  g4 g g | b4 b b |
-}
-
-versewords = \lyricmode {
-  One two three | four five six |
-}
-
-refrainnotesA = \relative c'' {
-  \clef "treble"
-  \key g \major
-  \time 2/4
-  c4 c | g4 g | \bar "|."
-}
-
-refrainwordsA = \lyricmode {
-  la la | la la |
-}
-
-refrainnotesB = \relative c {
-  \clef "bass"
-  \key g \major
-  \time 2/4
-  c4 e | d4 d |
-}
-
-refrainwordsB = \lyricmode {
-  dum dum | dum dum |
-}
-
-\score {
-  \new Staff <<
-    \new Voice = "verse" {
-      \versenotes
-    }
-    \new Lyrics \lyricsto "verse" {
-      \versewords
-    }
-  >>
-}
-
-\score {
-  \new ChoirStaff <<
-    \new Staff <<
-      \new Voice = "refrainA" {
-        \refrainnotesA
-      }
-      \new Lyrics \lyricsto "refrainA" {
-        \refrainwordsA
-      }
-    >>
-    \new Staff <<
-      \new Voice = "refrainB" {
-        \refrainnotesB
-      }
-      \new Lyrics \lyricsto "refrainB" {
-        \refrainwordsB
-      }
-    >>
-  >>
-}
-...@end lilypond
-
 
 @seealso
 Notation Reference: @ruser{Vocal music}.
diff --git a/Documentation/learning/templates.itely b/Documentation/learning/templates.itely
index 09ee23e..2940a0d 100644
--- a/Documentation/learning/templates.itely
+++ b/Documentation/learning/templates.itely
@@ -110,6 +110,11 @@ beautiful printed scores!
 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
 {vocal-ensemble-template-with-lyrics-aligned-below-and-above-the-staves.ly}
 
+...@appendixsubsec Solo verse and two-part refrain
+
+...@lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
+{vocal-ensemble-template-with-verse-and-refrain.ly}
+
 
 @node Orchestral templates
 @appendixsec Orchestral templates
diff --git a/Documentation/snippets/new/vocal-ensemble-template-with-verse-and-refrain.ly b/Documentation/snippets/new/vocal-ensemble-template-with-verse-and-refrain.ly
new file mode 100644
index 0000000..8118ba0
--- /dev/null
+++ b/Documentation/snippets/new/vocal-ensemble-template-with-verse-and-refrain.ly
@@ -0,0 +1,99 @@
+\version "2.13.21"
+
+\header {
+  lsrtags = "vocal-music, contexts-and-engravers, template"
+  texidoc = "
+This template creates a score which starts with a solo verse and
+continues into a refrain for two voices.  It also demonstrates the
+use of spacer rests within the @code{\global} variable to define
+meter changes (and other elements common to all parts) throughout
+the entire score.
+"
+  doctitle = "Solo verse and two-part refrain"
+}
+
+global = {
+  \key g \major
+
+  % verse
+  \time 3/4
+  s2.*2
+  \break
+
+  % refrain
+  \time 2/4
+  s2*2
+  \bar "|."
+}
+
+SoloNotes = \relative g' {
+  \clef "treble"
+
+  % verse
+  g4 g g |
+  b4 b b |
+
+  % refrain
+  R2*2 |
+}
+
+SoloLyrics = \lyricmode {
+  One two three |
+  four five six |
+}
+
+SopranoNotes = \relative c'' {
+  \clef "treble"
+
+  % verse
+  R2.*2 |
+
+  % refrain
+  c4 c |
+  g4 g |
+}
+
+SopranoLyrics = \lyricmode {
+  la la |
+  la la |
+}
+
+BassNotes = \relative c {
+  \clef "bass"
+
+  % verse
+  R2.*2 |
+
+  % refrain
+  c4 e |
+  d4 d |
+}
+
+BassLyrics = \lyricmode {
+  dum dum |
+  dum dum |
+}
+
+\score {
+  <<
+    \new Voice = "SoloVoice" << \global \SoloNotes >>
+    \new Lyrics \lyricsto "SoloVoice" \SoloLyrics
+
+    \new ChoirStaff <<
+      \new Voice = "SopranoVoice" << \global \SopranoNotes >>
+      \new Lyrics \lyricsto "SopranoVoice" \SopranoLyrics
+
+      \new Voice = "BassVoice" << \global \BassNotes >>
+      \new Lyrics \lyricsto "BassVoice" \BassLyrics
+    >>
+  >>
+  \layout {
+    ragged-right = ##t
+    \context {
+      % these lines prevent empty staves from being printed
+      \RemoveEmptyStaffContext
+      \override VerticalAxisGroup #'remove-first = ##t
+    }
+  }
+}
+
-- 
1.6.3.3

_______________________________________________
lilypond-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to