Re: Positioning Dynamics Contexts
On Tue, Aug 4, 2015 at 3:53 PM, Cynthia Karl pck...@mac.com 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 ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Positioning Dynamics Contexts
Is there a useful way to get closer association of a staff and a dynamics context in the following snippet? \version 2.19.23 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\stopTextSpans1 s s s s s} \score { \new StaffGroup \new Staff \musicA \new Dynamics \dynamicsA \new Dynamics \dynamicsB \new Staff \musicB } The problem is in the 2nd staff where dynamicsB has no “content”. This results in the spacing engine positioning dynamicsA (almost) exactly in the middle of the two staves. I would prefer that even in the 2nd system dynamicsA should be a lot closer to the upper staff. Basically, I would like the 2nd system to be treated as if dynamicsB actually had some invisible content, forcing spacing like in the 1st system.___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Positioning Dynamics Contexts
On Aug 4, 2015, at 10:04 AM, Kevin Barry barr...@gmail.com wrote: On Tue, Aug 4, 2015 at 3:53 PM, Cynthia Karl pck...@mac.com 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 I really like that idea because my real case is a 10 page ms with seven instruments, for which I need to produce not only a score but various combinations of parts; the 2nd idea of adding invisible stuff to the dynamics to keep them alive in all systems seems a little unwieldy. But I’ve run into a problem I don’t understand, illustrated by the following snippet: \version 2.19.23 PocoAccel = { \override TextSpanner.bound-details.left.text = poco accel. } musicA = \relative c'' {\repeat unfold 16 c4 } dynamicsAHigh = \new Dynamics {s1^AHigh s \PocoAccel s\startTextSpan s\stopTextSpan} dynamicsALow = \new Dynamics {s1^ALow s\p s s\f} musicB = \relative c'' {\repeat unfold 16 b4 } dynamicsBHigh = \new Dynamics { s1^BHigh s^espress. s s } dynamicsBLow = \new Dynamics { s1^BLow s\f s s } \score { \new StaffGroup \new Staff \dynamicsAHigh \musicA \dynamicsALow \new Staff \dynamicsBHigh \musicB \dynamicsBLow } Here I want each musical staff to have two dynamics contexts, one above the musical staff for text spanners, etc., and one below for articulations and dynamics. But the above snippet results in both dynamics contexts being placed below their musical staff instead of one above and one below. Shouldn’t the line: \new Staff \dynamicsAHigh \musicA \dynamicsALow resullt in the ordering in the score: dynamicsAHigh musicA dynamicsALow instead of musicA dynamicsAHigh dynamicsALow ? ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Positioning Dynamics Contexts
Cynthia Karl pck...@mac.com writes: Shouldn’t the line: \new Staff \dynamicsAHigh \musicA \dynamicsALow resullt in the ordering in the score: dynamicsAHigh musicA dynamicsALow instead of musicA dynamicsAHigh dynamicsALow ? Taking a look at ly/engraver-init.ly, the only context accepting a Dynamics context by default is a GrandStaff, so one is created on-demand when \dynamicsAHigh is created and placed in the existing StaffGroup below the last created context, which is the \new Staff in that line. Now you probably want to change StaffGroup in order to let it accept Dynamics as well. This will still not change your arrangement though. Unless you work with alignAboveContext and alignBelowContext settings, you'll likely rather need something like \dynamicsHigh \new Staff \musicA \dynamicsLow instead. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Positioning Dynamics Contexts
On Tue, Aug 4, 2015 at 5:08 PM, Cynthia Karl pck...@mac.com wrote: Shouldn’t the line: \new Staff \dynamicsAHigh \musicA \dynamicsALow resullt in the ordering in the score: dynamicsAHigh musicA dynamicsALow No: the result is that they are all part of the same Staff, and dynamics are positioned below a staff by default - when they are not in their own context (and you can't, as David pointed out, put a Dynamics context inside a Staff context). In your example there is no need to specify \new Dynamics - really you are just adding a voice that contains spacer rests and dynamics (A Dynamics context is not necessary). Assuming you still want to keep the notes and dynamics in separate variables the code below should do what you want. Note the two places where I replaced a caret ^ with an underscore _ to put text below the Staff. I would also recommend giving some consideration to merging the high and low dynamics variables (obviously it depends on your score, but I can't imagine many scores where it is desirable to separate them like that). \version 2.18.2 PocoAccel = { \override TextSpanner.bound-details.left.text = poco accel. } musicA = \relative c'' {\repeat unfold 16 c4 } dynamicsAHigh = {s1^AHigh s \PocoAccel s\startTextSpan s\stopTextSpan} dynamicsALow = {s1_ALow s\p s s\f} musicB = \relative c'' {\repeat unfold 16 b4 } dynamicsBHigh = { s1^BHigh s^espress. s s } dynamicsBLow = { s1_BLow s\f s s } \score { \new StaffGroup \new Staff \dynamicsAHigh \musicA \dynamicsALow \new Staff \dynamicsBHigh \musicB \dynamicsBLow } ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user