]> git.donarmstrong.com Git - lilypond.git/blob - input/test/hara-kiri-switch.ly
release: 1.3.7
[lilypond.git] / input / test / hara-kiri-switch.ly
1 \version "1.3.5";
2
3 voiceOne = \notes \relative c'' {
4         a1 a a
5         a2 a2
6         a2 a8 a a a
7 }
8
9 staffOne = \context Staff = one <
10         \notes \context Voice=one < 
11                 \voiceOne
12         >
13 >
14
15 voiceTwo = \notes \relative c' {
16         % we must have a Thread context before we can switch staffs
17         % in this case, the notes before the switching  will do that 
18         % implicitely
19         \context Thread
20
21         R1*3
22         c2 c2
23         \translator Staff=one
24         \translator Voice=one
25         c2
26         c8 c c c
27 }
28
29 staffTwo = \context Staff = two <
30         % notes must go to Staff context: we want to switch Staff translators
31         %\notes \context Voice=one < 
32                 \voiceTwo
33         %>
34 >
35
36 grandstaff = \context GrandStaff = one <
37         \staffOne
38         \staffTwo
39 >
40
41 \score{
42         \grandstaff
43         \paper{
44                 linewidth=80.0\mm;
45                 castingalgorithm = \Wordwrap;
46                 \translator { \VoiceContext noAutoBeaming = "1"; }
47                 \translator { \HaraKiriStaffContext }
48                 \translator { \OrchestralScoreContext skipBars = 1; }
49         }
50 }
51
52