lilypond-user
[Top][All Lists]
Advanced

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

Re: Positioning Dynamics Contexts


From: Kevin Barry
Subject: Re: Positioning Dynamics Contexts
Date: Tue, 4 Aug 2015 16:04:31 +0100

On Tue, Aug 4, 2015 at 3:53 PM, Cynthia Karl <address@hidden> wrote:
> Is there a useful way to get closer association of a staff and a dynamics
> context in the following snippet?

Two things suggest themselves, although you may not like either idea:

1) You could add dynamicsA to the upper Staff (instead of it having
its own Dynamics context). That would keep everything in it closer to
the upper staff, viz.

\new Staff << \musicA \dynamicsA >>

2) Add some kind of invisible dynamic to dynamicsB when it has no
content. In the example below I added a white hairpin that will
continue until cancelled, preserving some space for the dynamicsB
context:

\version "2.18.2"

musicA = \relative c'' {    \repeat unfold 24 c4     \break
\repeat unfold 24 d4}
dynamicsA = {    s1 s\p s s\f s s         s1\p s\mp s\mf s\f s\ff s\fff}
musicB = \relative c'' {    \repeat unfold 24 b4    \break    \repeat
unfold 24 a4}
dynamicsB = {    s1 s^"espress." s s s\startTextSpan s\stopTextSpan
s1-\tweak #'color #white \< s s s s s\!}

\score {
    \new StaffGroup <<
        \new Staff \musicA
        \new Dynamics \dynamicsA
        \new Dynamics \dynamicsB
        \new Staff \musicB
    >>
}

hth,
Kevin



reply via email to

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