]> git.donarmstrong.com Git - lilypond.git/blob - input/regression/quote-during-subvoice.ly
Imported Upstream version 2.16.0
[lilypond.git] / input / regression / quote-during-subvoice.ly
1 \version "2.16.0"
2
3 \header {
4   texidoc = "@code{\\quoteDuring} and @code{\\cueDuring} shall properly quote
5 voices that create a sub-voice.  The sub-voice will not be quoted, though.
6 Exceptions are sections of parallel music @code{<< @{...@} \\ @{...@} >>},
7 which will be quoted.
8 "
9 }
10
11 % Simple case, normal sub-voice
12 quoteMe = \relative c' {
13   c4 c
14   \new Voice {
15     c4 c
16   }
17 }
18 \addQuote "quoteMe" \quoteMe
19 % Also works if wrapped with \new Voice
20 \addQuote "quoteMeA" \new Voice \quoteMe
21
22 % Also works with voice directly inside relative
23 quoteMeI = \relative c' \new Voice {
24   c4 c4
25 }
26 \addQuote "quoteMeI" \quoteMeI
27
28 % Quoting music with some parallel sections (identical rhythm)
29 quoteMeII = \relative c' {
30   c4 c
31   << { d4 e4 } \\ { c4 b4 } >>
32   c4
33 }
34 \addQuote "quoteMeII" \quoteMeII
35
36 % Quoting music with some parallel sections (different rhythm)
37 quoteMeIII = \relative c' {
38   c4 c
39   << { d4 e4 } \\ { c4. b8 } >>
40   c4
41 }
42 \addQuote "quoteMeIII" \quoteMeIII
43
44
45
46
47 <<
48   \new Staff \relative c'' {
49     c4 \cueDuring #"quoteMe" #DOWN { r4 }
50     c4 \cueDuring #"quoteMe" #DOWN { r4 } % <- no cue note due to sub-voice
51   }
52   \new Staff \relative c'' {
53     c4 \cueDuring #"quoteMeA" #DOWN { r4 }
54     c4 \cueDuring #"quoteMeA" #DOWN { r4 } % <- no cue note due to sub-voice
55   }
56   \new Staff \relative c'' {
57     c4 \cueDuring #"quoteMeI" #DOWN { r4 }
58     c4
59   }
60   \new Staff \relative c'' {
61     c4 \cueDuring #"quoteMeII" #DOWN { r4 }
62     c4 \cueDuring #"quoteMeII" #DOWN { r4 } % <- quoted parallel notes
63   }
64   \new Staff \relative c'' {
65     c4 \cueDuring #"quoteMeIII" #DOWN { r4 }
66     c4 \cueDuring #"quoteMeIII" #DOWN { r4 } % <- quoted parallel notes
67   }
68 >>