lilypond-user
[Top][All Lists]
Advanced

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

Re: Full bar rests in multi-voiced piano scores -- question and a sugges


From: Mats Bengtsson
Subject: Re: Full bar rests in multi-voiced piano scores -- question and a suggestion
Date: Mon, 25 Feb 2008 11:54:21 +0100
User-agent: Thunderbird 2.0.0.5 (X11/20070716)

So far, there's no automatic support in LilyPond to avoid collisions between multi-measure rests and other objects. Their vertical position is determined by the staff-position property, which by default is set to zero. The \voiceOne macro sets staff-position to +4 and \voiceTwo sets it to -4. So, to merge the rests from two separate voices, just set the staff-position to the same value so that they will be printed on top of each other. What I proposed in the cited solution was to
use
\revert MultiMeasureRest #'staff-position
after \voiceOne and \voiceTwo, which reverts the value of the property to the default 0. Of course, you probably still want to keep the raised and lowered
positions of full bar rests in measures where the other voice has some music
and unfortunately, I don't know any nice automatic solution for that, except
for using the \partcombine function, which is known to have several other
limitations and bugs.

For ordinary rests and notes, the collision handling in LilyPond is much more advanced meaning that it works much better by default, but that it also might be more difficult to understand how to tweak it in the cases where the default
doesn't give a satisfactory result.

/Mats

David Fedoruk wrote:
OK, I think that's partially what I am asking about. I would just
never have found that myself. I would have asked the wrong question.

I think that Zbynek and I might be asking the same question. Language
is the barrier for both of us.

Let me re-phrase my question to see if I understand this:

Normally a half or whole rest sits on the middle line. The exception
is where there are multiple voices on one staff. There is yet another
exception to the exception. In piano music, even though there may be
two voices which are resting, for clarity the two rests which would
sit one above the other, are merged into one rest as if there were
only one voice.

In my case, Lilypond is not acting in this manner. This action will
have to be invoke manually. It isn't an explicit placement, it is an
invocation of a usual case that Lilypond isn't acting on.

This is something akin to the    \override Staff.NoteCollision
#'merge-differently-dotted = ##t, but instead of notes being merged in
what would be considered a collsion, I want to override the usual
placement of the rests and instead, place them as if there were only
one voice.

I almost found what I was looking for then lost it. In some way I need
to override the placement of the rests. I think it was about having a
grob sit x number above middle C.

Override rest collision and place rests from both voices in the same
place in the score.

I'm using the word grob for the first time and I hope I've used it
correctly. I think this is what the other post was about. But I have
now clarified what I want lilypond to do.

I want to get this right because I think this is something important
for the documentation. Understanding how to ask a question is primary
in getting an answer. This question seems to have been a hard one to
ask.

cheers,
david

See http://lists.gnu.org/archive/html/lilypond-user/2004-03/msg00198.html

 /Mats



 David Fedoruk wrote:

 >Hello:
 >
 >A question about rests in multi-voiced piano scores: Most of the time
 >I am now using a four voiced layout for writing classical piano music.
 >
 >The problem is with full bar rests. The rests can be moved on the
 >staff by using b'2\rest without problem, but when the rest is a full
 >bar long the syntax is R2 (in 2/4 time). Lilypond would normally
 >figure out that these rests should be merged. But since I'm using this
 >four voiced layout, I think lilypond doesn't figure out that these
 >rests should be merged into one. How do i get Lilypond to do this
 >automatically? I'm not sure how its done manually either.
 >
 >
 >rhOne = {
 >        \clef treble
 >        \time 2/4
 >               \mark "Sehr rasch "
 >        \key c \minor
 >               \voiceOne
 >        \relative c'
 >                \override Staff.NoteCollision #'merge-differently-dotted = ##t
 >
 >       \times 4/5 { \stemNeutral g'16[ d' \chlh  bf  d g, ] } \chrh r8
 >                                                               | % bar 40
 >               \repeat volta 2 {
 >               r8                                                             
                                                                         | % bar 40
 >               R2                                                             
                                                                         | % bar 41
 >               r2                                                             
                                                                         | % bar 42
 >               r2                                                             
                                                                         | % bar 43
 >               b'4\rest b'8\rest
 >}
 >       }
 >
 >
 >rhTwo = {
 >        \clef treble
 >               \relative c
 >        \time 2/4
 >        \key c \minor
 >               \voiceTwo
 >
 >               s4*2                                                           
                                                         | % bar 39
 >               s4*2                                                           
                                                         | % bar 40
 >               R2                                                             
                                                                 | % bar 41
 >               s4*2                                                           
                                                         | % bar 42
 >}
 >
 >lhTwo = {
 >        \clef bass
 >        \time 2/4
 >        \key c \minor
 >        \relative c
 >               \voiceTwo
 >               \override Staff.NoteCollision #'merge-differently-dotted = ##t
 >               \partial 16 \skip 16
 >
 >       s4*2                                                                   
                                         | % bar 39
 >     s4*2                                                                     
                                         | % bar 40
 >       s4*2                                                                   
                                         | % bar 41
 >
 >       \repeat volta 2 { g16[ fs ]                                            
                         |
 >               g16[ af f g ] ef[ f d ef ]                                     
                         | % bar 41
 >               c16->[ d ef g ] c'[ d' ef' b ]                                 
                 | % bar 42
 >               c'->[ b c' e ] af->[ g af e ]                                  
                 | % bar 43
 >               f->[ e f d ] g[ f ef d ]                                       
                         | % bar 44
 >
 >       }
 >
 >}
 >\score{
 >       \context PianoStaff
 >       <<
 >       \set PianoStaff.instrumentName =  \markup { \large \bold { { "7" }}}
 >       \context Staff = rh {
 >               <<
 >               \context Voice = rhupper { \rhOne }
 >               \context Voice = rhlower { \rhTwo }
 >
 >               >>
 >       }
 >
 >       \context Staff = lh {
 >               <<
 >               \context Voice = lhupper { \lhOne }
 >               \context Voice = lhlower { \lhTwo }
 >               >>
 >       }
 >       >>
 >
 >       \layout {
 >               \context { \RemoveEmptyStaffContext }
 >               \context {
 >                               \Score
 >                               \override NonMusicalPaperColumn  % this 
actually works well! (∂œ)
 >                        #'line-break-system-details = #'((alignment-offsets . 
(0 -12)))
 >                       }
 >
 >               \version "2.11.28"
 >
 >
 >       }
 >       \midi { }
 >}
 >
 >
 >While its not all four voiced, almost all the time there is a need for
 >at least one extra staff. So, simply having them there means that I
 >don't have to add voices on the fly as much. This also serves well
 >when voices switch from one hand to the other alternately. At first I
 >assumed it was overkill but at this point I think its the way to begin
 >most scores. The only trick is in making sure you account for all the
 >skipped bars, otherwise things like repeat voltas cause problems. This
 >layout has worked very well for me and I'd suggest it as a beginning
 >point for anyone transcribing classical piano music.
 >
 >As well, one of my problems in solving problems with Lilypond is that
 >so much of what I try to do with piano music is not unique to piano
 >music and is covered elsewhere in Lilypond, so I find myself having to
 >first figure out who else or what other kind of music might use this
 >particular feature. I look through almost all of Lilypond to solve
 >problems writing piano music. Perhaps some references could be
 >included pointing to the places where these problems are covered. The
 >rest issue I've asked about is one of the ones that have troubled me
 >currently. The piano section is small, but so much of the complexity
 >of writing it is covered elsewhere in Lilypond under other kinds of
 >music typesetting.
 >
 >I am watching for those kinds of issues and will mention them as I
 >find them. This is the first of those issues.
 >
 >cheers, and thanks
 >David
 >
 >
 >------------------------------------------------------------------------
 >
 >_______________________________________________
 >lilypond-user mailing list
 >address@hidden
 >http://lists.gnu.org/mailman/listinfo/lilypond-user
 >
 >


 --
 =============================================
        Mats Bengtsson
        Signal Processing
        Signals, Sensors and Systems
        Royal Institute of Technology
        SE-100 44  STOCKHOLM
        Sweden
        Phone: (+46) 8 790 8463
        Fax:   (+46) 8 790 7260
        Email: address@hidden
        WWW: http://www.s3.kth.se/~mabe
 =============================================





------------------------------------------------------------------------

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

--
=============================================
        Mats Bengtsson
        Signal Processing
        School of Electrical Engineering
        Royal Institute of Technology (KTH)
        SE-100 44  STOCKHOLM
        Sweden
        Phone: (+46) 8 790 8463                         
       Fax:   (+46) 8 790 7260
        Email: address@hidden
        WWW: http://www.s3.kth.se/~mabe
=============================================





reply via email to

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