lilypond-devel
[Top][All Lists]
Advanced

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

Re: still problems with piano template


From: Mats Bengtsson
Subject: Re: still problems with piano template
Date: Tue, 24 Apr 2007 10:59:16 +0200
User-agent: Thunderbird 1.5.0.10 (X11/20070221)

The problem here is not directly related to this specific template. Rather,
this seems to happen as soon as the dynamics are not in the same Voice
context as the notes. Example:
\version "2.11.22"
upper = \relative c'' {
 \clef treble
 \key c \major
 \time 4/4

 a4 b c d |
 e4 e e e |
}

lower = \relative c {
 \clef bass
 \key c \major
 \time 4/4

 a2 c |
 a1 |
}

dynamics = {
 s1\fff\> |
 s1\!\pp |
}

\new GrandStaff <<
% When the dynamics and music are in the same voice, the bar lines are avoided:
%  \new Staff \new Voice << \upper \dynamics >>
% Not if they are in separate voices:
 \new Staff << \new Voice \upper \new Voice \dynamics >>
 \new Staff \lower
>>

\layout{ragged-right = ##t }

   /Mats

Werner LEMBERG wrote:
Have a look at the slightly modified piano template (with centered
dynamics).  What can I do to avoid the overlapping of the dynamic sign
with the bar line?  Shifting such dynamics manually is definitely not
the right solution...


    Werner


======================================================================


\version "2.11.22"

upper = \relative c'' {
  \clef treble
  \key c \major
  \time 4/4

  a4 b c d |
  e4 e e e |
}

lower = \relative c {
  \clef bass
  \key c \major
  \time 4/4

  a2 c |
  a1 |
}

dynamics = {
  s1\fff\> |
  s1\!\pp |
}

pedal = {
  s2\sustainDown s2\sustainUp |
  s1\sustainDown
}

\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)
      \override DynamicLineSpanner #'Y-offset = #0
      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

      \consists "Skip_event_swallow_translator"

      \consists "Axis_group_engraver"
    }
    \context {
      \PianoStaff
      \accepts Dynamics
    }
  }
}

\paper {
  indent = 0\cm
  ragged-right = ##t
}
------------------------------------------------------------------------

------------------------------------------------------------------------

_______________________________________________
lilypond-devel mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/lilypond-devel

--
=============================================
        Mats Bengtsson
        Signal Processing
        Signals, Sensors and Systems
        Royal Institute of Technology
        SE-100 44  STOCKHOLM
        Sweden
        Phone: (+46) 8 790 8463                         
       Fax:   (+46) 8 790 7260
        Email: address@hidden
        WWW: http://www.s3.kth.se/~mabe
=============================================





reply via email to

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