]> git.donarmstrong.com Git - lilypond.git/blob - input/lsr/positioning-segno-and-coda-with-line-break.ly
Fix makelsr.py and update LSR
[lilypond.git] / input / lsr / positioning-segno-and-coda-with-line-break.ly
1 %% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
2 %% This file is in the public domain.
3 %% Tags: repeats, breaks
4 \version "2.11.35"
5
6 \header { texidoc = "
7 If you want to place an exiting segno sign and add text like \"D.S. al
8 Coda\" next to it where usually the staff lines are you can use this
9 snippet. The coda will resume in a new line. Theres a variation
10 documented in this snippet, where the coda will remain on the same
11 line.
12 " }
13 % begin verbatim
14
15   \clef treble
16   \key g \major
17   \time 4/4
18   \relative c'' {
19     \repeat unfold 2 {
20       | c4 c c c
21     }
22     
23     % Set segno sign as rehearsal mark and adjust size if needed
24     % \once \override Score.RehearsalMark #'font-size = #3
25     \mark \markup { \musicglyph #"scripts.segno" }
26     \repeat unfold 2 {
27       | c4 c c c
28     }
29     
30     % Set coda sign as rehearsal mark and adjust size if needed
31     \once \override Score.RehearsalMark #'font-size = #4
32     \mark \markup { \musicglyph #"scripts.coda" }
33     \repeat unfold 2 {
34       | c4 c c c
35     }
36     
37     % Should Coda be on anew line?
38     % Coda NOT on new line: use \nobreak
39     % Coda on new line: DON'T use \nobreak
40     % \noBreak
41     
42     \bar "||"
43     
44     % Set segno sign as rehearsal mark and adjust size if needed
45     \once \override Score.RehearsalMark #'break-visibility = #begin-of-line-invisible
46     % \once \override Score.RehearsalMark #'font-size = #3
47     \mark \markup { \musicglyph #"scripts.segno" }
48     
49     % Here begins the trickery! 
50     % \cadenzaOn will suppress the bar count and \stopStaff removes the staff lines.
51     \cadenzaOn 
52       \stopStaff 
53         % Some examples of possible text-displays 
54         
55         % text line-aligned
56         % ==================
57         % Move text to the desired position
58         % \once \override TextScript #'extra-offset = #'( 2 . -3.5 )
59         % | s1*0^\markup { D.S. al Coda } }
60         
61         % text center-aligned
62         % ====================
63         % Move text to the desired position
64         % \once \override TextScript #'extra-offset = #'( 6 . -5.0 )
65         % | s1*0^\markup { \center-align { D.S. "al Coda" } }
66         
67         % text and symbols center-aligned
68         % ===============================
69         % Move text to the desired position and tweak spacing for optimum text alignment
70         \once \override TextScript #'extra-offset = #'( 8 . -5.5 )
71         \once \override TextScript #'word-space = #1.5
72         | s1*0^\markup { \center-align { "D.S. al Coda" \line { \musicglyph #"scripts.coda" \musicglyph #"scripts.tenuto" \musicglyph #"scripts.coda"} } }
73         
74         % Increasing the unfold counter will expand the staff-free space
75         \repeat unfold 4 {
76           s4 s4 s4 s4
77           \bar ""
78         }
79         % Resume bar count and show staff lines again
80      \startStaff
81    \cadenzaOff
82    
83    % Should Coda be on new line?
84    % Coda NOT on new line: DON'T use \break
85    % Coda on new line: use \break
86    \break 
87    
88    % Show up, you clef and key!
89    \once \override Staff.KeySignature #'break-visibility = #end-of-line-invisible
90    \once \override Staff.Clef #'break-visibility = #end-of-line-invisible
91
92    % Set coda sign as rehearsal mark and adjust size and position
93    
94    % Put the coda sign ontop of the (treble-)clef dependend on coda's line-position
95       
96      % Coda NOT on new line, use this:
97      % \once \override Score.RehearsalMark #'extra-offset = #'( -2 . 1.75 )
98      
99      % Coda on new line, use this:
100      \once \override Score.RehearsalMark #'extra-offset = #'( -8.42 . 1.75 )
101    
102    \once \override Score.RehearsalMark #'font-size = #5
103    \mark \markup { \musicglyph #"scripts.coda" }
104
105    % The coda
106    \repeat unfold 5 {
107       | c4 c c c
108     }
109     \bar"|."
110   }
111 }