lilypond-user
[Top][All Lists]
Advanced

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

\breakDynamicSpan in a Dynamics context?


From: Dominic
Subject: \breakDynamicSpan in a Dynamics context?
Date: Tue, 15 Dec 2015 13:06:21 -0700 (MST)

Hi all!

I was reading the latest Steinberg 'Making Notes' blog, particularly  this
image
<http://blog.steinberg.net/wp-content/uploads/2015/12/piano-dynamics-comparison.png>
 
, and it got me thinking about Lilypond dynamic alignment for piano scores.

I would like some way of having Lilypond automatically produce results as
illustrated in 'Score 2' (my own image below). This would require breaking
up the DynamicLineSpanner into segments (one per bar, in this example). The
command \breakDynamicSpan appears to have no effect, at least not within a
Dynamics context. If I add the dynamics directly to a Staff context (e.g. by
writing /\new Staff << \mel \dyn >>/), then I get a much nicer result, but
the dynamics tend to 'cling' to the top staff, rather than floating neatly
between the two staves.

Can anyone point me in the right direction for how to achieve better results
in a more automatic way?

Many thanks!

Dominic

<http://lilypond.1069038.n5.nabble.com/file/n184789/dynamic-line.png> 

/\version "2.19"

mel = \relative c' {
        c,8 8 8 8 8 8 4
        c'8 8 8 8 8 8 4
        c'8 8 8 8 8 8 4
}

dyn = { \repeat unfold 3 { s2. \pp \< s4 \ff } }

overrides = {
        s1
        \override DynamicText.Y-offset = #2
        \override Hairpin.Y-offset = #2
        s1
        \override DynamicText.Y-offset = #4
        \override Hairpin.Y-offset = #4
        s1
}

\markup { "Score 1 (automatic)" }

\score {
        <<
                \new Staff \mel
                \new Dynamics \dyn
                \new Staff << \clef bass \mel >>
        >>
}

\markup { "Score 2 (manual overrides)" }

\score {
        <<
                \new Staff \mel
                \new Dynamics << \overrides \dyn >>
                \new Staff << \clef bass \mel >>
        >>
}
/



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/breakDynamicSpan-in-a-Dynamics-context-tp184789.html
Sent from the User mailing list archive at Nabble.com.



reply via email to

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