]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/new/quoting-another-voice-with-transposition.ly
Snippets: Replace \set Staff.instrumentName
[lilypond.git] / Documentation / snippets / new / quoting-another-voice-with-transposition.ly
1 \version "2.19.56"
2
3 \header {
4   lsrtags = "pitches, staff-notation"
5
6   texidoc = "
7 Quotations take into account the transposition of both source and
8 target.  In this example, all instruments play sounding middle C; the
9 target is an instrument in F.  The target part may be transposed using
10 @code{\\transpose}.  In this case, all the pitches (including the
11 quoted ones) are transposed.
12
13 "
14   doctitle = "Quoting another voice with transposition"
15 } % begin verbatim
16
17 \addQuote clarinet {
18   \transposition bes
19   \repeat unfold 8 { d'16 d' d'8 }
20 }
21
22 \addQuote sax {
23   \transposition es'
24   \repeat unfold 16 { a8 }
25 }
26
27 quoteTest = {
28   % french horn
29   \transposition f
30   g'4
31   << \quoteDuring #"clarinet" { \skip 4 } s4^"clar." >>
32   << \quoteDuring #"sax" { \skip 4 } s4^"sax." >>
33   g'4
34 }
35
36 {
37   \new Staff \with {
38     instrumentName = \markup { \column { Horn "in F" } }
39   }
40   \quoteTest
41   \transpose c' d' << \quoteTest s4_"up a tone" >>
42 }