]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/new/adding-orchestral-cues-to-a-vocal-score.ly
Doc: convert-ly on English docs.
[lilypond.git] / Documentation / snippets / new / adding-orchestral-cues-to-a-vocal-score.ly
1 \version "2.13.36"
2
3 \header {
4   lsrtags="vocal-music, staff-notation"
5   texidoc="
6   This shows one approach to simplify adding many orchestral cues to
7 the piano reduction in a vocal score.  The music function
8 @code{\cueWhile} takes four arguments: the music from which the cue
9 is to be taken, as defined by @code{\addQuote}, the name to be
10 inserted before the cue notes, then either @code{#UP} or @code{#DOWN}
11 to specify either @code{\voiceOne} with the name above the staff or
12 @code{\voiceTwo} with the name below the staff, and finally the piano
13 music in parallel with which the cue notes are to appear.  The name
14 of the quoted instrument is positioned to the left of the cue notes.
15 Many passages can be cued, but they cannot overlap each other in time.
16 "
17   doctitle = "Adding orchestral cues to a vocal score"
18 }
19
20 cueWhile =
21   #(define-music-function
22     (parser location instrument name dir music)
23     (string? string? ly:dir? ly:music?)
24     #{
25       \cueDuring $instrument #$dir {
26         \once \override TextScript #'self-alignment-X = #RIGHT
27         \once \override TextScript #'direction = $dir
28         s1*0-\markup { \tiny $name }
29         $music
30       }
31     #}
32   )
33
34 flute = \relative c'' { 
35   \transposition c'
36   s4 s4 e g
37 }
38 \addQuote "flute" { \flute }
39
40 clarinet = \relative c' {
41   \transposition bes
42   fis4 d d c
43 }
44 \addQuote "clarinet" { \clarinet }
45
46 singer = \relative c'' { c4. g8 g4 bes4 }
47 words = \lyricmode { here's the lyr -- ics }
48
49 pianoRH = \relative c'' {
50   \transposition c'
51   \cueWhile "clarinet" "Clar." #DOWN { c4. g8 }
52   \cueWhile "flute" "Flute" #UP { g4 bes4 }
53 }
54 pianoLH = \relative c { c4 <c' e> e, <g c> }
55
56 \score {
57   <<
58     \new Staff {
59       \new Voice = "singer" {
60         \singer
61       }
62     }
63     \new Lyrics {
64       \lyricsto "singer"
65       \words
66     }
67     \new PianoStaff <<
68       \new Staff {
69         \new Voice {
70           \pianoRH
71         }
72       }
73       \new Staff {
74         \clef "bass"
75         \pianoLH
76       }
77     >>
78   >>
79 }