]> git.donarmstrong.com Git - lilypond.git/blob - input/lsr/piano-template-with-centered-dynamics.ly
Update ROADMAP
[lilypond.git] / input / lsr / piano-template-with-centered-dynamics.ly
1 %% Do not edit this file; it is auto-generated from input/new
2 %% This file is in the public domain.
3 \version "2.11.46"
4
5 \header {
6   lsrtags = "expressive-marks,keyboards,template"
7   texidoc = "
8 Many piano scores have the dynamics centered between the two staves.
9 This requires a bit of tweaking to implement, but since the template is
10 right here, you don't have to do the tweaking yourself.  Note that
11 the two piano staves will move closer together in any system that
12 does not contain at least one dynamic marking.
13 "
14   doctitle = "Piano template with centered dynamics"
15 } % begin verbatim
16
17 upper = \relative c'' {
18   \clef treble
19   \key c \major
20   \time 4/4
21
22   a4 b c d
23 }
24
25 lower = \relative c {
26   \clef bass
27   \key c \major
28   \time 4/4
29
30   a2 c
31 }
32
33 dynamics = {
34   s2\fff\> s4 s\!\pp
35 }
36
37 pedal = {
38   s2\sustainDown s\sustainUp
39 }
40
41 \score {
42   \new PianoStaff <<
43     \new Staff = "upper" \upper
44     \new Dynamics = "dynamics" \dynamics
45     \new Staff = "lower" <<
46       \clef bass
47       \lower
48     >>
49     \new Dynamics = "pedal" \pedal
50   >>
51   \layout {
52     \context {
53       \type "Engraver_group"
54       \name Dynamics
55       % So that \cresc works, for example.
56       \alias Voice
57       \consists "Output_property_engraver"
58
59       \override VerticalAxisGroup #'minimum-Y-extent = #'(-1 . 1)
60       \override DynamicLineSpanner #'Y-offset = #0
61       pedalSustainStrings = #'("Ped." "*Ped." "*")
62       pedalUnaCordaStrings = #'("una corda" "" "tre corde")
63
64       \consists "Piano_pedal_engraver"
65       \consists "Script_engraver"
66       \consists "Dynamic_engraver"
67       \consists "Text_engraver"
68
69       \override TextScript #'font-size = #2
70       \override TextScript #'font-shape = #'italic
71
72       \consists "Skip_event_swallow_translator"
73
74       \consists "Axis_group_engraver"
75     }
76     \context {
77       \PianoStaff
78       \accepts Dynamics
79     }
80   }
81 }
82 \score {
83   \unfoldRepeats {
84     \new PianoStaff <<
85       \new Staff = "upper" << \upper \dynamics \pedal >>
86       \new Staff = "lower" << \lower \dynamics \pedal >>
87     >>
88   }
89   \midi {}
90 }