]> git.donarmstrong.com Git - lilypond.git/commitdiff
Doc: add snippet to be used in NR 2.1 Vocal, Musical cues
authorTrevor Daniels <t.daniels@treda.co.uk>
Fri, 17 Sep 2010 17:53:48 +0000 (18:53 +0100)
committerTrevor Daniels <t.daniels@treda.co.uk>
Fri, 17 Sep 2010 17:53:48 +0000 (18:53 +0100)
Documentation/snippets/adding-orchestral-cues-to-a-vocal-score.ly [new file with mode: 0644]
Documentation/snippets/new/adding-orchestral-cues-to-a-vocal-score.ly [new file with mode: 0644]

diff --git a/Documentation/snippets/adding-orchestral-cues-to-a-vocal-score.ly b/Documentation/snippets/adding-orchestral-cues-to-a-vocal-score.ly
new file mode 100644 (file)
index 0000000..04c1b6f
--- /dev/null
@@ -0,0 +1,82 @@
+%% Do not edit this file; it is automatically
+%% generated from LSR http://lsr.dsi.unimi.it
+%% This file is in the public domain.
+\version "2.13.34"
+
+\header {
+  lsrtags="vocal-music, staff-notation"
+  texidoc="
+  This shows one approach to simplify adding many orchestral cues to
+the piano reduction in a vocal score.  The music function
+@code{\cueWhile} takes four arguments: the music from which the cue
+is to be taken, as defined by @code{\addQuote}, the name to be
+inserted before the cue notes, then either @code{#UP} or @code{#DOWN}
+to specify either @code{\voiceOne} with the name above the staff or
+@code{\voiceTwo} with the name below the staff, and finally the piano
+music in parallel with which the cue notes are to appear.  The name
+of the cued instrument is positioned to the left of the cued notes.
+Many passages can be cued, but they cannot overlap each other in time.
+"
+  doctitle = "Adding orchestral cues to a vocal score"
+} % begin verbatim
+
+cueWhile =
+  #(define-music-function
+    (parser location instrument name dir music)
+    (string? string? ly:dir? ly:music?)
+    #{
+      \cueDuring $instrument #$dir {
+        \once \override CueVoice.InstrumentSwitch #'self-alignment-X = #RIGHT
+        \once \override CueVoice.InstrumentSwitch #'direction = $dir
+        \set CueVoice.instrumentCueName = $name
+        { $music }
+      }
+    #}
+  )
+
+flute = \relative c'' { 
+  \transposition c'
+  s4 s4 e g
+}
+\addQuote "flute" { \flute }
+
+clarinet = \relative c' {
+  \transposition bes
+  fis4 d d c
+}
+\addQuote "clarinet" { \clarinet }
+
+singer = \relative c'' { c4. g8 g4 bes4 }
+words = \lyricmode { here's the lyr -- ics }
+
+pianoRH = \relative c'' {
+  \transposition c'
+  \cueWhile "clarinet" "Clar." #DOWN { c4. g8 }
+  \cueWhile "flute" "Flute" #UP { g4 bes4 }
+}
+pianoLH = \relative c { c4 <c' e> e, <g c> }
+
+\score {
+  <<
+    \new Staff {
+      \new Voice = "singer" {
+        \singer
+      }
+    }
+    \new Lyrics {
+      \lyricsto "singer"
+      \words
+    }
+    \new PianoStaff <<
+      \new Staff {
+        \new Voice {
+          \pianoRH
+        }
+      }
+      \new Staff {
+        \clef "bass"
+        \pianoLH
+      }
+    >>
+  >>
+}
\ No newline at end of file
diff --git a/Documentation/snippets/new/adding-orchestral-cues-to-a-vocal-score.ly b/Documentation/snippets/new/adding-orchestral-cues-to-a-vocal-score.ly
new file mode 100644 (file)
index 0000000..4efd5cf
--- /dev/null
@@ -0,0 +1,79 @@
+\version "2.13.34"
+
+\header {
+  lsrtags="vocal-music, staff-notation"
+  texidoc="
+  This shows one approach to simplify adding many orchestral cues to
+the piano reduction in a vocal score.  The music function
+@code{\cueWhile} takes four arguments: the music from which the cue
+is to be taken, as defined by @code{\addQuote}, the name to be
+inserted before the cue notes, then either @code{#UP} or @code{#DOWN}
+to specify either @code{\voiceOne} with the name above the staff or
+@code{\voiceTwo} with the name below the staff, and finally the piano
+music in parallel with which the cue notes are to appear.  The name
+of the cued instrument is positioned to the left of the cued notes.
+Many passages can be cued, but they cannot overlap each other in time.
+"
+  doctitle = "Adding orchestral cues to a vocal score"
+}
+
+cueWhile =
+  #(define-music-function
+    (parser location instrument name dir music)
+    (string? string? ly:dir? ly:music?)
+    #{
+      \cueDuring $instrument #$dir {
+        \once \override CueVoice.InstrumentSwitch #'self-alignment-X = #RIGHT
+        \once \override CueVoice.InstrumentSwitch #'direction = $dir
+        \set CueVoice.instrumentCueName = $name
+        { $music }
+      }
+    #}
+  )
+
+flute = \relative c'' { 
+  \transposition c'
+  s4 s4 e g
+}
+\addQuote "flute" { \flute }
+
+clarinet = \relative c' {
+  \transposition bes
+  fis4 d d c
+}
+\addQuote "clarinet" { \clarinet }
+
+singer = \relative c'' { c4. g8 g4 bes4 }
+words = \lyricmode { here's the lyr -- ics }
+
+pianoRH = \relative c'' {
+  \transposition c'
+  \cueWhile "clarinet" "Clar." #DOWN { c4. g8 }
+  \cueWhile "flute" "Flute" #UP { g4 bes4 }
+}
+pianoLH = \relative c { c4 <c' e> e, <g c> }
+
+\score {
+  <<
+    \new Staff {
+      \new Voice = "singer" {
+        \singer
+      }
+    }
+    \new Lyrics {
+      \lyricsto "singer"
+      \words
+    }
+    \new PianoStaff <<
+      \new Staff {
+        \new Voice {
+          \pianoRH
+        }
+      }
+      \new Staff {
+        \clef "bass"
+        \pianoLH
+      }
+    >>
+  >>
+}
\ No newline at end of file