]> git.donarmstrong.com Git - lilypond.git/blob - input/regression/midi/sequence-name-scoping.ly
Imported Upstream version 2.19.45
[lilypond.git] / input / regression / midi / sequence-name-scoping.ly
1 \version "2.19.25"
2
3 \header {
4   texidoc="If a score has a @code{\header} block which defines a title,
5   this title should override any title defined in a @code{\header} block
6   of the score's enclosing @code{\bookpart} or @code{\book} (or a title
7   defined in a top-level @code{\header} block) when naming the MIDI
8   sequence generated from the score.  Otherwise, if the score has no title
9   defined, the MIDI sequence generated from the score should get named
10   using the title defined in the @code{\header} block of the nearest
11   enclosing @code{\bookpart}, @code{\book}, or top-level scope that
12   contains a title definition."
13   title = "Top-level title"
14 }
15
16 music = \new Staff { c1 }
17
18 % Book with a title defined in a \header block, and book parts
19 \book {
20   \header { title = "Book" }
21
22   % score without a \header block outside of any book part -- the MIDI
23   % sequence should get the title of the book as its name
24   \score {
25     \music
26     \layout { }
27     \midi { }
28   }
29
30   % score with a \header and a title outside of any book part -- the MIDI
31   % sequence should be named with the title from this \header block
32   \score {
33     \music
34     \header { title = "Score in a \book" }
35     \layout { }
36     \midi { }
37   }
38
39   % Book part with a \header block and a title
40   \bookpart {
41     \header { title = "Book part" }
42
43     % score without a \header block -- the MIDI sequence should get its name
44     % from the title of the enclosing book part
45     \score {
46       \music
47       \layout { }
48       \midi { }
49     }
50
51     % score with a \header (and a title) of its own -- the MIDI sequence
52     % should get its name from the title in this \header block
53     \score {
54       \music
55       \header { title = "Score in a book part (w/ a title) of a book" }
56       \layout { }
57       \midi { }
58     }
59   }
60
61   % Book part without a \header block
62   \bookpart {
63
64     % score without a \header block -- the MIDI sequence should be named
65     % using the title from the enclosing book
66     \score {
67       \music
68       \layout { }
69       \midi { }
70     }
71
72     % score with a \header block and title -- the MIDI sequence should get
73     % its name from the title in this \header block
74     \score {
75       \music
76       \header { title = "Score in a book part (w/o a title) of a book" }
77       \layout { }
78       \midi { }
79     }
80   }
81
82 }