lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fully understanding D.2.4 template


From: Mats Bengtsson
Subject: Re: Fully understanding D.2.4 template
Date: Sat, 23 Dec 2006 00:09:16 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20060926 Debian/1.7.8-1sarge7.3.1

First of all, I recommend you to take a look at
http://lists.gnu.org/archive/html/bug-lilypond/2005-08/msg00130.html

If you want to stick with the complicated template, the best and simplest
way for you to figure out the answer yourself, if just to change the
values of some property and look at the resulting output to see what
changed.

Anyway:

Tomas Valusek wrote:

Hello,

I'm a piano teacher, so I'd like to understand what's the meaning of all the statements used in layout block of D.2.4 template. I'm going to include it below, my questions are marked there.

    \version "2.9.13"
    upper = \relative c'' {
      \clef treble
      \key c \major
      \time 4/4
         a b c d
    }
       lower = \relative c {
      \clef bass
      \key c \major
      \time 4/4
         a2 c
    }
       dynamics = {
      s2\fff\> s4
      s\!\pp
    }
       pedal = {
      s2\sustainDown s2\sustainUp
    }
       \score {
      \new PianoStaff <<
        \new Staff = "upper" \upper
        \new Dynamics = "dynamics" \dynamics
        \new Staff = "lower" <<
          \clef bass
          \lower
        >>
        \new Dynamics = "pedal" \pedal
      >>
      \layout {
        \context {
          \type "Engraver_group"
          \name Dynamics
          \alias Voice % So that \cresc works, for example.
          \consists "Output_property_engraver"
\override VerticalAxisGroup #'minimum-Y-extent = #'(-1 . 1) % ??? How to change distance between \upper and \lower staves?

You are in the middle of the definition of the separate context for handling
dynamics, which has nothing directly to do with the distance between the
staves.

pedalSustainStrings = #'("Ped." "*Ped." "*")
          pedalUnaCordaStrings = #'("una corda" "" "tre corde")
             \consists "Piano_pedal_engraver"
          \consists "Script_engraver"
          \consists "Dynamic_engraver"
          \consists "Text_engraver"
             \override TextScript #'font-size = #2
          \override TextScript #'font-shape = #'italic
          \override DynamicText #'extra-offset = #'(0 . 2.5) % ???

Moving things around vertically, to look better.

   \override Hairpin #'extra-offset = #'(0 . 2.5) % ???
             \consists "Skip_event_swallow_translator" % ???
             \consists "Axis_group_engraver" % ???
        }
        \context {
          \PianoStaff
          \accepts Dynamics
\override VerticalAlignment #'forced-distance = #7 % ??? How to change distance between \upper and \lower staves?

Here it is!

        }
      }
    }
    \score {
      \new PianoStaff <<
        \new Staff = "upper" << \upper \dynamics >>
        \new Staff = "lower" << \lower \dynamics >>
        \new Dynamics = "pedal" \pedal
      >>
      \midi {
        \context {
          \type "Performer_group"
          \name Dynamics
          \consists "Piano_pedal_performer"
        }
        \context {
          \PianoStaff
          \accepts Dynamics
        }
      }
    }


One more question arises: How to extend this template to include solo instrument with smaller staff? (Maybe template D.2.5.)

See the example called "staff-mixed-size.ly" in the Regression Test document.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]