Re: Simple example with vertical spacing and dynamic contexts

2019-03-18 Thread Павел Буданов
Thank you very much, Ben. If this helps someone, I could use this solution
to adjust the vertical distance of the lyrics:
дꙋй -- \markup { сѧ, \transparent \draw-line #'(0 . -1) }
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Simple example with vertical spacing and dynamic contexts

2019-03-11 Thread Ben

On 3/11/2019 3:33 PM, Павел Буданов wrote:
I found a temporary way to control the vertical spacing in the middle 
of the piece. It looks awful, but it works. I still hope that someone 
will suggest a more correct way.


\new StaffGroup
<<
   \new Staff
   {
     c' c' c' c' \break
     % Add an invisible very low note to push the staffs.
     c'4*1/2 \once \hideNotes c,8 c'4 c' c'
   }
   \new Staff { c' c' c' c' c' c' c' c' }
>>


Hello,

I'm sure other people have different ways they approach this, but for me 
this works great so far with no negative side effects in my projects. 
Granted, I don't use this code often but it's never failed me yet. 
Basically, it's just a very small markup blank space or if you prefer, a 
vertical spacer instead. Hope this helps you.




\version "2.19.82"


% _\markup \lower #3 " "
% or
% ^\markup \raise #3 " "


% also you could define something like this
verticalSpacer = -\markup \transparent \draw-line #'(0 . 12)
% and input it inline with music

\new StaffGroup
<<
  \new Staff
  {
    c'4 c' c' c' \break
    c' c' c' c'
  }
  \new Staff { c' c' c' c' c' c'^\markup \raise #10 " " c' c' }
>>

\new StaffGroup
<<
  \new Staff
  {
    c'4 c' c' c' \break
    c' c' c' c'
  }
  \new Staff { c' c' c' c' c' c'^\verticalSpacer c' c' }
>>


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Simple example with vertical spacing and dynamic contexts

2019-03-11 Thread Павел Буданов
I found a temporary way to control the vertical spacing in the middle of
the piece. It looks awful, but it works. I still hope that someone will
suggest a more correct way.

\new StaffGroup
<<
   \new Staff
   {
 c' c' c' c' \break
 % Add an invisible very low note to push the staffs.
 c'4*1/2 \once \hideNotes c,8 c'4 c' c'
   }
   \new Staff { c' c' c' c' c' c' c' c' }
>>

вт, 5 мар. 2019 г. в 21:07, Павел Буданов :

> How to control vertical spacing in the middle of a piece?
>
> \new StaffGroup \with
> { \override StaffGrouper.staff-staff-spacing.padding = 10 } % It's OK
> <<
>\new Staff
>{
>  c' c' c' c'
>  \break
>  \override StaffGrouper.staff-staff-spacing.padding = 30 % It isn't
> work
>  c' c' c' c'
>}
>\new Staff { c' c' c' c' c' c' c' c' }
> >>
>
> пт, 1 февр. 2019 г. в 11:41, Павел Буданов :
>
>> It really helped me, I am very grateful to you. Would you like to change
>> the vertical spacing chapter
>> 
>> in the learning manual? You were able to explain a lot of things in plain
>> language.
>>
>> пт, 1 февр. 2019 г. в 05:54, Aaron Hill :
>>
>>> On 2019-01-31 9:11 am, Павел Буданов wrote:
>>> > I've solved this problem partially with for lower contexts, but i
>>> > can't find the necessary properties for upper contexts. Can you help
>>> > me?
>>> >
>>> > \new StaffGroup
>>> > <<
>>> >   \new Dynamics { s2.\< s4\ff }
>>> >   \new Lyrics \lyricmode { Ly4 -- ric ly -- ric }
>>> >   \new Staff \with
>>> >   { \override VerticalAxisGroup.staff-staff-spacing =
>>> > #'((basic-distance . 20) (padding . 0.5)) }
>>> >   { a'4 a' a' a' }
>>> >   \new Staff { d'4 d' d' d' }
>>> >   \new Lyrics \with
>>> >   {
>>> > \override VerticalAxisGroup.nonstaff-relatedstaff-spacing =
>>> > #'((basic-distance . 10) (padding . 0.5))
>>> > \override VerticalAxisGroup.nonstaff-nonstaff-spacing =
>>> > #'((basic-distance . 10) (padding . 0.5))
>>> >   }
>>> >   \lyricmode { Ly4 -- ric ly -- ric }
>>> >   \new Dynamics { s2.\< s4\ff }
>>> > >>
>>>
>>> Be sure to examine the output of LilyPond for warnings, not just errors:
>>>
>>> > warning: staff-affinities should only decrease
>>>
>>> This is telling you that you need to manually adjust
>>> VerticalAxisGroup.staff-affinity.  By default, Dynamics uses a
>>> staff-affinity of CENTER (0) as it typically appears between two staves,
>>> whereas Lyrics uses UP (1) as it typically appears below a staff.  Your
>>> upper Lyrics context is trying to locate its "relatedstaff" above, but
>>> there is none to be found.  You will need to set its staff-affinity to
>>> DOWN (-1).  (You could leave the two Dynamics contexts set to CENTER
>>> staff-affinity; but it arguably better to also explicitly set them to
>>> UP/DOWN based on where they appear.)
>>>
>>> There is a second issue that unfortunately there is no warning for.  You
>>> are setting basic-distance but not minimum-distance as well.  By
>>> omitting minimum-distance from the spacing alist, you are using the
>>> default value of zero.  LilyPond only attempts to honor basic-distance,
>>> but will collapse down to minimum-distance if needed (and often a little
>>> too eagerly).  If you tried to set only basic-distance for the upper
>>> contexts, you may find that it has no effect.
>>>
>>> It may be easier to see what it going on by only using padding, although
>>> a combination of basic-distance, minimum-distance, padding, and
>>> stretchability is often required to get the most out of the flexible
>>> spacing system.  Consider the following:
>>>
>>> 
>>> \version "2.19.82"
>>>
>>> % Forcibly reset all default spacing variables to zero.
>>> \layout {
>>>\context { \Dynamics
>>>  \override VerticalAxisGroup.nonstaff-nonstaff-spacing = #'(())
>>>  \override VerticalAxisGroup.nonstaff-relatedstaff-spacing = #'(())
>>>  \override VerticalAxisGroup.nonstaff-unrelatedstaff-spacing = #'(())
>>>}
>>>\context { \Lyrics
>>>  \override VerticalAxisGroup.nonstaff-nonstaff-spacing = #'(())
>>>  \override VerticalAxisGroup.nonstaff-relatedstaff-spacing = #'(())
>>>  \override VerticalAxisGroup.nonstaff-unrelatedstaff-spacing = #'(())
>>>}
>>>\context { \Staff
>>>  \override VerticalAxisGroup.default-staff-staff-spacing = #'(())
>>>  \override VerticalAxisGroup.staff-staff-spacing = #'(())
>>>}
>>> }
>>>
>>> \new StaffGroup <<
>>>\new Dynamics \with {
>>>% Dynamics is above Staff.
>>>\override VerticalAxisGroup.staff-affinity = #DOWN
>>>% Spacing between this Dynamics and the following Lyrics.
>>>\override VerticalAxisGroup.nonstaff-nonstaff-spacing =
>>>  #'((padding . 2))
>>>  }
>>>  { s2.\< s4\ff }
>>>\new Lyrics \with {
>>>% Lyrics is above Staff.
>>>\override VerticalAxisGroup.staff-affinity = #DOWN
>>>% Spacing between this Lyrics and the following Staff.
>>>

Re: Simple example with vertical spacing and dynamic contexts

2019-03-07 Thread Reggie
I also would like to know why this fails not just the fix.


Павел Буданов-2 wrote
> How to control vertical spacing in the middle of a piece?
> 
> \new StaffGroup \with
> { \override StaffGrouper.staff-staff-spacing.padding = 10 } % It's OK
> <<
>\new Staff
>{
>  c' c' c' c'
>  \break
>  \override StaffGrouper.staff-staff-spacing.padding = 30 % It isn't
> work
>  c' c' c' c'
>}
>\new Staff { c' c' c' c' c' c' c' c' }
>>>
> 
> пт, 1 февр. 2019 г. в 11:41, Павел Буданов 

> budanov.pavel@

> :
> 
>> It really helped me, I am very grateful to you. Would you like to change
>> the vertical spacing chapter
>> http://lilypond.org/doc/v2.18/Documentation/learning/vertical-spacing;
>> in the learning manual? You were able to explain a lot of things in plain
>> language.
>>
>> пт, 1 февр. 2019 г. в 05:54, Aaron Hill 

> lilypond@

> :
>>
>>> On 2019-01-31 9:11 am, Павел Буданов wrote:
>>> > I've solved this problem partially with for lower contexts, but i
>>> > can't find the necessary properties for upper contexts. Can you help
>>> > me?
>>> >
>>> > \new StaffGroup
>>> > <<
>>> >   \new Dynamics { s2.\< s4\ff }
>>> >   \new Lyrics \lyricmode { Ly4 -- ric ly -- ric }
>>> >   \new Staff \with
>>> >   { \override VerticalAxisGroup.staff-staff-spacing =
>>> > #'((basic-distance . 20) (padding . 0.5)) }
>>> >   { a'4 a' a' a' }
>>> >   \new Staff { d'4 d' d' d' }
>>> >   \new Lyrics \with
>>> >   {
>>> > \override VerticalAxisGroup.nonstaff-relatedstaff-spacing =
>>> > #'((basic-distance . 10) (padding . 0.5))
>>> > \override VerticalAxisGroup.nonstaff-nonstaff-spacing =
>>> > #'((basic-distance . 10) (padding . 0.5))
>>> >   }
>>> >   \lyricmode { Ly4 -- ric ly -- ric }
>>> >   \new Dynamics { s2.\< s4\ff }
>>> > >>
>>>
>>> Be sure to examine the output of LilyPond for warnings, not just errors:
>>>
>>> > warning: staff-affinities should only decrease
>>>
>>> This is telling you that you need to manually adjust
>>> VerticalAxisGroup.staff-affinity.  By default, Dynamics uses a
>>> staff-affinity of CENTER (0) as it typically appears between two staves,
>>> whereas Lyrics uses UP (1) as it typically appears below a staff.  Your
>>> upper Lyrics context is trying to locate its "relatedstaff" above, but
>>> there is none to be found.  You will need to set its staff-affinity to
>>> DOWN (-1).  (You could leave the two Dynamics contexts set to CENTER
>>> staff-affinity; but it arguably better to also explicitly set them to
>>> UP/DOWN based on where they appear.)
>>>
>>> There is a second issue that unfortunately there is no warning for.  You
>>> are setting basic-distance but not minimum-distance as well.  By
>>> omitting minimum-distance from the spacing alist, you are using the
>>> default value of zero.  LilyPond only attempts to honor basic-distance,
>>> but will collapse down to minimum-distance if needed (and often a little
>>> too eagerly).  If you tried to set only basic-distance for the upper
>>> contexts, you may find that it has no effect.
>>>
>>> It may be easier to see what it going on by only using padding, although
>>> a combination of basic-distance, minimum-distance, padding, and
>>> stretchability is often required to get the most out of the flexible
>>> spacing system.  Consider the following:
>>>
>>> 
>>> \version "2.19.82"
>>>
>>> % Forcibly reset all default spacing variables to zero.
>>> \layout {
>>>\context { \Dynamics
>>>  \override VerticalAxisGroup.nonstaff-nonstaff-spacing = #'(())
>>>  \override VerticalAxisGroup.nonstaff-relatedstaff-spacing = #'(())
>>>  \override VerticalAxisGroup.nonstaff-unrelatedstaff-spacing =
>>> #'(())
>>>}
>>>\context { \Lyrics
>>>  \override VerticalAxisGroup.nonstaff-nonstaff-spacing = #'(())
>>>  \override VerticalAxisGroup.nonstaff-relatedstaff-spacing = #'(())
>>>  \override VerticalAxisGroup.nonstaff-unrelatedstaff-spacing =
>>> #'(())
>>>}
>>>\context { \Staff
>>>  \override VerticalAxisGroup.default-staff-staff-spacing = #'(())
>>>  \override VerticalAxisGroup.staff-staff-spacing = #'(())
>>>}
>>> }
>>>
>>> \new StaffGroup <<
>>>\new Dynamics \with {
>>>% Dynamics is above Staff.
>>>\override VerticalAxisGroup.staff-affinity = #DOWN
>>>% Spacing between this Dynamics and the following Lyrics.
>>>\override VerticalAxisGroup.nonstaff-nonstaff-spacing =
>>>  #'((padding . 2))
>>>  }
>>>  { s2.\< s4\ff }
>>>\new Lyrics \with {
>>>% Lyrics is above Staff.
>>>\override VerticalAxisGroup.staff-affinity = #DOWN
>>>% Spacing between this Lyrics and the following Staff.
>>>\override VerticalAxisGroup.nonstaff-relatedstaff-spacing =
>>>  #'((padding . 3))
>>>  }
>>>  \lyricmode { Ly4 -- ric ly -- ric }
>>>\new Staff \with {
>>>% Spacing between this Staff and the following Staff.
>>>\override VerticalAxisGroup.staff-staff-spacing =
>>>  

Re: Simple example with vertical spacing and dynamic contexts

2019-03-05 Thread Павел Буданов
How to control vertical spacing in the middle of a piece?

\new StaffGroup \with
{ \override StaffGrouper.staff-staff-spacing.padding = 10 } % It's OK
<<
   \new Staff
   {
 c' c' c' c'
 \break
 \override StaffGrouper.staff-staff-spacing.padding = 30 % It isn't work
 c' c' c' c'
   }
   \new Staff { c' c' c' c' c' c' c' c' }
>>

пт, 1 февр. 2019 г. в 11:41, Павел Буданов :

> It really helped me, I am very grateful to you. Would you like to change
> the vertical spacing chapter
> 
> in the learning manual? You were able to explain a lot of things in plain
> language.
>
> пт, 1 февр. 2019 г. в 05:54, Aaron Hill :
>
>> On 2019-01-31 9:11 am, Павел Буданов wrote:
>> > I've solved this problem partially with for lower contexts, but i
>> > can't find the necessary properties for upper contexts. Can you help
>> > me?
>> >
>> > \new StaffGroup
>> > <<
>> >   \new Dynamics { s2.\< s4\ff }
>> >   \new Lyrics \lyricmode { Ly4 -- ric ly -- ric }
>> >   \new Staff \with
>> >   { \override VerticalAxisGroup.staff-staff-spacing =
>> > #'((basic-distance . 20) (padding . 0.5)) }
>> >   { a'4 a' a' a' }
>> >   \new Staff { d'4 d' d' d' }
>> >   \new Lyrics \with
>> >   {
>> > \override VerticalAxisGroup.nonstaff-relatedstaff-spacing =
>> > #'((basic-distance . 10) (padding . 0.5))
>> > \override VerticalAxisGroup.nonstaff-nonstaff-spacing =
>> > #'((basic-distance . 10) (padding . 0.5))
>> >   }
>> >   \lyricmode { Ly4 -- ric ly -- ric }
>> >   \new Dynamics { s2.\< s4\ff }
>> > >>
>>
>> Be sure to examine the output of LilyPond for warnings, not just errors:
>>
>> > warning: staff-affinities should only decrease
>>
>> This is telling you that you need to manually adjust
>> VerticalAxisGroup.staff-affinity.  By default, Dynamics uses a
>> staff-affinity of CENTER (0) as it typically appears between two staves,
>> whereas Lyrics uses UP (1) as it typically appears below a staff.  Your
>> upper Lyrics context is trying to locate its "relatedstaff" above, but
>> there is none to be found.  You will need to set its staff-affinity to
>> DOWN (-1).  (You could leave the two Dynamics contexts set to CENTER
>> staff-affinity; but it arguably better to also explicitly set them to
>> UP/DOWN based on where they appear.)
>>
>> There is a second issue that unfortunately there is no warning for.  You
>> are setting basic-distance but not minimum-distance as well.  By
>> omitting minimum-distance from the spacing alist, you are using the
>> default value of zero.  LilyPond only attempts to honor basic-distance,
>> but will collapse down to minimum-distance if needed (and often a little
>> too eagerly).  If you tried to set only basic-distance for the upper
>> contexts, you may find that it has no effect.
>>
>> It may be easier to see what it going on by only using padding, although
>> a combination of basic-distance, minimum-distance, padding, and
>> stretchability is often required to get the most out of the flexible
>> spacing system.  Consider the following:
>>
>> 
>> \version "2.19.82"
>>
>> % Forcibly reset all default spacing variables to zero.
>> \layout {
>>\context { \Dynamics
>>  \override VerticalAxisGroup.nonstaff-nonstaff-spacing = #'(())
>>  \override VerticalAxisGroup.nonstaff-relatedstaff-spacing = #'(())
>>  \override VerticalAxisGroup.nonstaff-unrelatedstaff-spacing = #'(())
>>}
>>\context { \Lyrics
>>  \override VerticalAxisGroup.nonstaff-nonstaff-spacing = #'(())
>>  \override VerticalAxisGroup.nonstaff-relatedstaff-spacing = #'(())
>>  \override VerticalAxisGroup.nonstaff-unrelatedstaff-spacing = #'(())
>>}
>>\context { \Staff
>>  \override VerticalAxisGroup.default-staff-staff-spacing = #'(())
>>  \override VerticalAxisGroup.staff-staff-spacing = #'(())
>>}
>> }
>>
>> \new StaffGroup <<
>>\new Dynamics \with {
>>% Dynamics is above Staff.
>>\override VerticalAxisGroup.staff-affinity = #DOWN
>>% Spacing between this Dynamics and the following Lyrics.
>>\override VerticalAxisGroup.nonstaff-nonstaff-spacing =
>>  #'((padding . 2))
>>  }
>>  { s2.\< s4\ff }
>>\new Lyrics \with {
>>% Lyrics is above Staff.
>>\override VerticalAxisGroup.staff-affinity = #DOWN
>>% Spacing between this Lyrics and the following Staff.
>>\override VerticalAxisGroup.nonstaff-relatedstaff-spacing =
>>  #'((padding . 3))
>>  }
>>  \lyricmode { Ly4 -- ric ly -- ric }
>>\new Staff \with {
>>% Spacing between this Staff and the following Staff.
>>\override VerticalAxisGroup.staff-staff-spacing =
>>  #'((padding . 5))
>>  }
>>  { a'4 a' a' a' }
>>\new Staff { d'4 d' d' d' }
>>\new Lyrics \with {
>>% Lyrics is below Staff.
>>\override VerticalAxisGroup.staff-affinity = #UP
>>% Spacing between this Lyrics and the preceding 

Re: Simple example with vertical spacing and dynamic contexts

2019-02-01 Thread Павел Буданов
It really helped me, I am very grateful to you. Would you like to change
the vertical spacing chapter
 in
the learning manual? You were able to explain a lot of things in plain
language.

пт, 1 февр. 2019 г. в 05:54, Aaron Hill :

> On 2019-01-31 9:11 am, Павел Буданов wrote:
> > I've solved this problem partially with for lower contexts, but i
> > can't find the necessary properties for upper contexts. Can you help
> > me?
> >
> > \new StaffGroup
> > <<
> >   \new Dynamics { s2.\< s4\ff }
> >   \new Lyrics \lyricmode { Ly4 -- ric ly -- ric }
> >   \new Staff \with
> >   { \override VerticalAxisGroup.staff-staff-spacing =
> > #'((basic-distance . 20) (padding . 0.5)) }
> >   { a'4 a' a' a' }
> >   \new Staff { d'4 d' d' d' }
> >   \new Lyrics \with
> >   {
> > \override VerticalAxisGroup.nonstaff-relatedstaff-spacing =
> > #'((basic-distance . 10) (padding . 0.5))
> > \override VerticalAxisGroup.nonstaff-nonstaff-spacing =
> > #'((basic-distance . 10) (padding . 0.5))
> >   }
> >   \lyricmode { Ly4 -- ric ly -- ric }
> >   \new Dynamics { s2.\< s4\ff }
> > >>
>
> Be sure to examine the output of LilyPond for warnings, not just errors:
>
> > warning: staff-affinities should only decrease
>
> This is telling you that you need to manually adjust
> VerticalAxisGroup.staff-affinity.  By default, Dynamics uses a
> staff-affinity of CENTER (0) as it typically appears between two staves,
> whereas Lyrics uses UP (1) as it typically appears below a staff.  Your
> upper Lyrics context is trying to locate its "relatedstaff" above, but
> there is none to be found.  You will need to set its staff-affinity to
> DOWN (-1).  (You could leave the two Dynamics contexts set to CENTER
> staff-affinity; but it arguably better to also explicitly set them to
> UP/DOWN based on where they appear.)
>
> There is a second issue that unfortunately there is no warning for.  You
> are setting basic-distance but not minimum-distance as well.  By
> omitting minimum-distance from the spacing alist, you are using the
> default value of zero.  LilyPond only attempts to honor basic-distance,
> but will collapse down to minimum-distance if needed (and often a little
> too eagerly).  If you tried to set only basic-distance for the upper
> contexts, you may find that it has no effect.
>
> It may be easier to see what it going on by only using padding, although
> a combination of basic-distance, minimum-distance, padding, and
> stretchability is often required to get the most out of the flexible
> spacing system.  Consider the following:
>
> 
> \version "2.19.82"
>
> % Forcibly reset all default spacing variables to zero.
> \layout {
>\context { \Dynamics
>  \override VerticalAxisGroup.nonstaff-nonstaff-spacing = #'(())
>  \override VerticalAxisGroup.nonstaff-relatedstaff-spacing = #'(())
>  \override VerticalAxisGroup.nonstaff-unrelatedstaff-spacing = #'(())
>}
>\context { \Lyrics
>  \override VerticalAxisGroup.nonstaff-nonstaff-spacing = #'(())
>  \override VerticalAxisGroup.nonstaff-relatedstaff-spacing = #'(())
>  \override VerticalAxisGroup.nonstaff-unrelatedstaff-spacing = #'(())
>}
>\context { \Staff
>  \override VerticalAxisGroup.default-staff-staff-spacing = #'(())
>  \override VerticalAxisGroup.staff-staff-spacing = #'(())
>}
> }
>
> \new StaffGroup <<
>\new Dynamics \with {
>% Dynamics is above Staff.
>\override VerticalAxisGroup.staff-affinity = #DOWN
>% Spacing between this Dynamics and the following Lyrics.
>\override VerticalAxisGroup.nonstaff-nonstaff-spacing =
>  #'((padding . 2))
>  }
>  { s2.\< s4\ff }
>\new Lyrics \with {
>% Lyrics is above Staff.
>\override VerticalAxisGroup.staff-affinity = #DOWN
>% Spacing between this Lyrics and the following Staff.
>\override VerticalAxisGroup.nonstaff-relatedstaff-spacing =
>  #'((padding . 3))
>  }
>  \lyricmode { Ly4 -- ric ly -- ric }
>\new Staff \with {
>% Spacing between this Staff and the following Staff.
>\override VerticalAxisGroup.staff-staff-spacing =
>  #'((padding . 5))
>  }
>  { a'4 a' a' a' }
>\new Staff { d'4 d' d' d' }
>\new Lyrics \with {
>% Lyrics is below Staff.
>\override VerticalAxisGroup.staff-affinity = #UP
>% Spacing between this Lyrics and the preceding Staff.
>\override VerticalAxisGroup.nonstaff-relatedstaff-spacing =
>  #'((padding . 3))
>% Spacing between this Lyrics and the following Dynamics.
>\override VerticalAxisGroup.nonstaff-nonstaff-spacing =
>  #'((padding . 2))
>  }
>  \lyricmode { Ly4 -- ric ly -- ric }
>\new Dynamics \with {
>% Dynamics is below Staff.
>\override VerticalAxisGroup.staff-affinity = #UP
>  }
>  { s2.\< s4\ff }
>>>
> 
>
> Play around with the 

Re: Simple example with vertical spacing and dynamic contexts

2019-01-31 Thread Aaron Hill

On 2019-01-31 9:11 am, Павел Буданов wrote:

I've solved this problem partially with for lower contexts, but i
can't find the necessary properties for upper contexts. Can you help
me?

\new StaffGroup
<<
  \new Dynamics { s2.\< s4\ff }
  \new Lyrics \lyricmode { Ly4 -- ric ly -- ric }
  \new Staff \with
  { \override VerticalAxisGroup.staff-staff-spacing =
#'((basic-distance . 20) (padding . 0.5)) }
  { a'4 a' a' a' }
  \new Staff { d'4 d' d' d' }
  \new Lyrics \with
  {
\override VerticalAxisGroup.nonstaff-relatedstaff-spacing =
#'((basic-distance . 10) (padding . 0.5))
\override VerticalAxisGroup.nonstaff-nonstaff-spacing =
#'((basic-distance . 10) (padding . 0.5))
  }
  \lyricmode { Ly4 -- ric ly -- ric }
  \new Dynamics { s2.\< s4\ff }
>>


Be sure to examine the output of LilyPond for warnings, not just errors:


warning: staff-affinities should only decrease


This is telling you that you need to manually adjust 
VerticalAxisGroup.staff-affinity.  By default, Dynamics uses a 
staff-affinity of CENTER (0) as it typically appears between two staves, 
whereas Lyrics uses UP (1) as it typically appears below a staff.  Your 
upper Lyrics context is trying to locate its "relatedstaff" above, but 
there is none to be found.  You will need to set its staff-affinity to 
DOWN (-1).  (You could leave the two Dynamics contexts set to CENTER 
staff-affinity; but it arguably better to also explicitly set them to 
UP/DOWN based on where they appear.)


There is a second issue that unfortunately there is no warning for.  You 
are setting basic-distance but not minimum-distance as well.  By 
omitting minimum-distance from the spacing alist, you are using the 
default value of zero.  LilyPond only attempts to honor basic-distance, 
but will collapse down to minimum-distance if needed (and often a little 
too eagerly).  If you tried to set only basic-distance for the upper 
contexts, you may find that it has no effect.


It may be easier to see what it going on by only using padding, although 
a combination of basic-distance, minimum-distance, padding, and 
stretchability is often required to get the most out of the flexible 
spacing system.  Consider the following:



\version "2.19.82"

% Forcibly reset all default spacing variables to zero.
\layout {
  \context { \Dynamics
\override VerticalAxisGroup.nonstaff-nonstaff-spacing = #'(())
\override VerticalAxisGroup.nonstaff-relatedstaff-spacing = #'(())
\override VerticalAxisGroup.nonstaff-unrelatedstaff-spacing = #'(())
  }
  \context { \Lyrics
\override VerticalAxisGroup.nonstaff-nonstaff-spacing = #'(())
\override VerticalAxisGroup.nonstaff-relatedstaff-spacing = #'(())
\override VerticalAxisGroup.nonstaff-unrelatedstaff-spacing = #'(())
  }
  \context { \Staff
\override VerticalAxisGroup.default-staff-staff-spacing = #'(())
\override VerticalAxisGroup.staff-staff-spacing = #'(())
  }
}

\new StaffGroup <<
  \new Dynamics \with {
  % Dynamics is above Staff.
  \override VerticalAxisGroup.staff-affinity = #DOWN
  % Spacing between this Dynamics and the following Lyrics.
  \override VerticalAxisGroup.nonstaff-nonstaff-spacing =
#'((padding . 2))
}
{ s2.\< s4\ff }
  \new Lyrics \with {
  % Lyrics is above Staff.
  \override VerticalAxisGroup.staff-affinity = #DOWN
  % Spacing between this Lyrics and the following Staff.
  \override VerticalAxisGroup.nonstaff-relatedstaff-spacing =
#'((padding . 3))
}
\lyricmode { Ly4 -- ric ly -- ric }
  \new Staff \with {
  % Spacing between this Staff and the following Staff.
  \override VerticalAxisGroup.staff-staff-spacing =
#'((padding . 5))
}
{ a'4 a' a' a' }
  \new Staff { d'4 d' d' d' }
  \new Lyrics \with {
  % Lyrics is below Staff.
  \override VerticalAxisGroup.staff-affinity = #UP
  % Spacing between this Lyrics and the preceding Staff.
  \override VerticalAxisGroup.nonstaff-relatedstaff-spacing =
#'((padding . 3))
  % Spacing between this Lyrics and the following Dynamics.
  \override VerticalAxisGroup.nonstaff-nonstaff-spacing =
#'((padding . 2))
}
\lyricmode { Ly4 -- ric ly -- ric }
  \new Dynamics \with {
  % Dynamics is below Staff.
  \override VerticalAxisGroup.staff-affinity = #UP
}
{ s2.\< s4\ff }
  >>


Play around with the various padding amounts in the snippet.  It should 
hopefully be clear which spacing variable affects what spacing.  
Generally speaking, spacing is done top to bottom, so spacing is almost 
always below an item.  The exception is when a non-staff has its related 
(or unrelated) staff above it.


Once you have a good feel for that, set padding to a large negative 
number (e.g. -100) and then experiment with setting minimum-distance as 
well.  The negative padding will permit overlap, so it is easier to see 
how minimum-distance works.  You should notice that you need larger 
values for 

Re: Simple example with vertical spacing and dynamic contexts

2019-01-31 Thread Павел Буданов
I've solved this problem partially with for lower contexts, but i can't find the necessary properties for upper contexts. Can you help me? \new StaffGroup<<  \new Dynamics { s2.\< s4\ff }  \new Lyrics \lyricmode { Ly4 -- ric ly -- ric }  \new Staff \with  { \override VerticalAxisGroup.staff-staff-spacing = #'((basic-distance . 20) (padding . 0.5)) }  { a'4 a' a' a' }  \new Staff { d'4 d' d' d' }  \new Lyrics \with  {    \override VerticalAxisGroup.nonstaff-relatedstaff-spacing = #'((basic-distance . 10) (padding . 0.5))    \override VerticalAxisGroup.nonstaff-nonstaff-spacing = #'((basic-distance . 10) (padding . 0.5))  }  \lyricmode { Ly4 -- ric ly -- ric }  \new Dynamics { s2.\< s4\ff }>>  30.01.2019, 13:58, "Павел Буданов" :Hello! I am completely confused. Could you show how to adjust the vertical spaces between all contexts in this example? \new StaffGroup<<  \new Dynamics { s2.\< s4\ff }  \new Lyrics \lyricmode { Ly4 -- ric ly -- ric }  \new Staff { a'4 a' a' a' }  \new Staff { d'4 d' d' d' }  \new Lyrics \lyricmode { Ly4 -- ric ly -- ric }  \new Dynamics { s2.\< s4\ff }>>___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Simple example with vertical spacing and dynamic contexts

2019-01-30 Thread Павел Буданов
Hello! I am completely confused. Could you show how to adjust the vertical spaces between all contexts in this example? \new StaffGroup<<  \new Dynamics { s2.\< s4\ff }  \new Lyrics \lyricmode { Ly4 -- ric ly -- ric }  \new Staff { a'4 a' a' a' }  \new Staff { d'4 d' d' d' }  \new Lyrics \lyricmode { Ly4 -- ric ly -- ric }  \new Dynamics { s2.\< s4\ff }>>___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user