lilypond-user
[Top][All Lists]
Advanced

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

Re: vertical spacing of rests


From: Simon Albrecht
Subject: Re: vertical spacing of rests
Date: Sun, 23 Aug 2015 15:11:52 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0

Hello Peter,

Am 23.08.2015 um 03:11 schrieb Peter Selinger:
Wait, this didn't quite work:

hideRests = {
   \override Rest.transparent = ##t
}

It almost produces the correct output, but it generates a million
warnings (one for each rest) about a "rest collision" that could not
be resolved. I guess a transparent rest is not the same as a spacer
rest - even though it is invisible, it can still collide.

Also, strangely, the dots on the dotted rests are still visible, even
when the rests themselves are transparent.

Is there a property similar to Rest.transparent that will remove the
rest (effectively turning it into a spacer rest), rather than just
making it invisible?
Yes. You will find an explanation in our Learning Manual: <http://lilypond.org/doc/v2.18/Documentation/learning/visibility-and-color-of-objects> – by the way: this manual is a ‘must-read’. It takes some time to work through, but it gives a very good introduction into basic concepts and it shows how to read the other manuals.
This will give you
omitRests = \omit Rest
:-)
So, no need for an abbreviation…

As Klaus already explained, the dot issue isn’t just as simple. You might try:
\layout {
  \context {
    \Staff
    \remove "Dot_column_engraver"
  }
  \context {
    \Voice
    \consists "Dot_column_engraver"
  }
}

This will move the Dot_column_engraver from Staff to Voice level and might fix the problem.

HTH, Simon

-- Peter

Peter Selinger wrote:
Thanks for your replies. That's awesome. I think I will also define a
command \hideRests, so that I don't have to manually convert all the
rests to spacer rests - this might be handy if I later decide to use
one staff per voice.

centerRests = {
   \override Rest.staff-position = #0
}

hideRests = {
   \override Rest.transparent = ##t
}

\new Staff <<
   \new Voice \relative c'' {
     \voiceOne
     \centerRests
     r4 c r d
   }
   \new Voice \relative c'' {
     \voiceTwo
     \hideRests
     r4 a8 a8 r4 b8 b8
   }
By the way, properties such as staff-position are not included in the
index of the Notation Manual (though they do appear in the index of
the Learning Manual). I had to search the whole document to find these
properties in Appendix A.17. Would it make sense to include them in
the index?

-- Peter

Klaus Blum wrote:
Peter Selinger wrote
Is there a global way to turn off
vertical spacing for rests in a context, i.e., some command whose
effect would be to make notes behave as with \voiceOne and rests
behave as with \oneVoice?
Hi Peter,

yes, there is:
      \override Rest.staff-position = #0
but you have to apply it once for every voice.

Cheers,
Klaus


%-------------------------------------------------
\version "2.19.25"

centerRests = {
   \override Rest.staff-position = #0
}

\new Staff <<
   \new Voice
   \relative c'' {
     \voiceOne  % you don't need a pair of braces here
     \centerRests
     r  c  r  d
   }
   \new Voice
   \relative c'' {
     \voiceTwo
     \centerRests
     r4 a8 a8 r4 b8 b8
   }
%-------------------------------------------------




--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/vertical-spacing-of-rests-tp179947p179950.html
Sent from the User mailing list archive at Nabble.com.

_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user


_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user


_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user




reply via email to

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