]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/new/piano-template-with-centered-dynamics.ly
Docs: run convert-ly for 2.14.0.
[lilypond.git] / Documentation / snippets / new / piano-template-with-centered-dynamics.ly
1 \version "2.14.0"
2
3 \header {
4   lsrtags = "expressive-marks, keyboards, template"
5   texidoc = "
6 Many piano scores have the dynamics centered between the two staves.
7 The @code{Dynamics} context, if placed between staves, will
8 automatically position dynamics correctly.
9
10 "
11   doctitle = "Piano template with centered dynamics"
12 }
13
14 global = {
15   \key c \major
16   \time 4/4
17 }
18
19 upper = \relative c'' {
20   \clef treble
21   a4 b c d
22 }
23
24 lower = \relative c {
25   \clef bass
26   a2 c
27 }
28
29 dynamics = {
30   s2\fff\> s4 s\!\pp
31 }
32
33 pedal = {
34   s2\sustainOn s\sustainOff
35 }
36
37 \score {
38   \new PianoStaff = "PianoStaff_pf" <<
39     \new Staff = "Staff_pfUpper" << \global \upper >>
40     \new Dynamics = "Dynamics_pf" \dynamics
41     \new Staff = "Staff_pfLower" << \global \lower >>
42     \new Dynamics = "pedal" \pedal
43   >>
44   \layout { }
45 }
46
47 \score {
48   \new PianoStaff = "PianoStaff_pf" <<
49     \new Staff = "Staff_pfUpper" << \global \upper \dynamics \pedal >>
50     \new Staff = "Staff_pfLower" << \global \lower \dynamics \pedal >>
51   >>
52   \midi { }
53 }