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