lilypond-user
[Top][All Lists]
Advanced

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

Re: System spacing for Certain


From: Aaron Hill
Subject: Re: System spacing for Certain
Date: Wed, 16 Jan 2019 16:44:17 -0800
User-agent: Roundcube Webmail/1.3.8

On 2019-01-16 2:04 pm, Reggie wrote:
Please can you help me? I cannot move just ONE staff in a system, it's
moving THE system as a unit which is wrong. I am so sad. What did I break? How difficult is it to just move ONE staff without moving anything else in the score pages? I just want to learn how to adjust the middle staff not
system as example here.

Wow... no wonder you're having trouble. I just tried to work through the relevant section of the documentation [1] and found that it largely does not work as stated. Well, to be more specific, I could get some partial results using 2.18.2 via lilybin.com, however my local copy of 2.19.82 fails to render the examples as documented. There are definitely some bugs here that need to be addressed, but let us move that discussion to another thread.

[1]: http://lilypond.org/doc/v2.19/Documentation/notation/explicit-staff-and-system-positioning

Getting back to your issue at hand, there are some options. Firstly, the property (and only property) you want to control is alignment-distances. That one appears to be the only one that can reliably apply to an individual staff within a system. Consider the following:

%%%%
\version "2.19.82"
\layout { indent = 0 }
<<
  \new Staff \repeat unfold 6 b'1
  \new Lyrics \repeat unfold 3 \lyricmode
    { Lo4 -- rem ip -- sum do8 -- lor sit a -- met2 }

  \new Staff <<
    \new Voice {
      s1*2 \break
\overrideProperty Score.NonMusicalPaperColumn.line-break-system-details
        #'((alignment-distances . (5 15)))
      s1*2 \break
      s1*2 \break
    }

    \new Voice \repeat unfold 24 b'4
  >>

  \new Staff \repeat unfold 12 b'2

%%%%

This example will look odd but it is to show a critical point. When setting the alignment-distances, you must be careful with the values you use. Too small of a value will result in overlapping as can be seen. It is important to note that non-staff lines such as lyrics do not count here. The distance you are specifying is relative to the prior staff.

Because of that, I would consider the approach above rather fragile. It may end up working for you, but be aware that it will take continued maintenance when other aspects of the music change. As such, here is another option to consider:

%%%%
\version "2.19.82"
\layout { indent = 0 }
verticalSpacer = -\markup \with-color #red \draw-line #'(0 . 8)
<<
  \new Staff \repeat unfold 6 b'1
  \new Lyrics \repeat unfold 3 \lyricmode
    { Lo4 -- rem ip -- sum do8 -- lor sit a -- met2 }

  \new Staff <<
    \new Voice {
      s1*2 \break
      s1*2_\verticalSpacer \break
      s1*2 \break
    }

    \new Voice \repeat unfold 24 b'4
  >>

  \new Staff \repeat unfold 12 b'2

%%%%

All we are doing here is using some dummy markup to create a placeholder object to force LilyPond to space things how we want. Note that I colored the object red so it would be more clear where the placeholder object is. This would be a good idea while you are working on the piece, but for the final version you would replace "\with-color #red" with "\transparent".

The advantage of a placeholder is that all of the elements of the score still remain relative to each other. Should changes to the music cause it to reflow, you have less work to do to maintain desired spacing. I also think this technique gives you more control.


-- Aaron Hill

Attachment: spacing.ex1.png
Description: PNG image

Attachment: spacing.ex2.png
Description: PNG image


reply via email to

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