Re: Full bar rests in multi-voiced piano scores -- question and a suggestion
AH! ok the light is begining to shine on this for me! This makes perfect sense. > 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. Full bar rests are the biggest issue. It looks like this is the answer I need. > 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. The individual tweaks always need specific attention. That is just the way music is. Exceptional cases everywhere and then composers invent new ones! That said, it looks like these tweaks will not be that difficult to work through. Arvid's solutions in the next post looks interesting and I'll give it a try and see what happens. Thanks for the help! And since this is scheduled to be made part of the documentation I'm happy :) -- David Fedoruk B.Mus. UBC,1986 Certificate in Internet Systems Administration, UBC, 2003 http://recordjackethistorian.wordpress.com "Music is enough for one's life time, but one life time is not enough for music" Sergei Rachmaninov ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Full bar rests in multi-voiced piano scores -- question and a suggestion
Mats Bengtsson <[EMAIL PROTECTED]> writes: > 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. You could also do the following: % either this: mmOneVoice = { \override MultiMeasureRest #'staff-position = 2 } % or this, which also works with collapsed rests: mmOneVoice = { \override MultiMeasureRest #'staff-position = #(lambda (grob) (let ((elts (ly:grob-object grob 'elements))) (if elts (if (ly:grob-array? elts) (let* ((mmrest (ly:grob-object (ly:grob-array-ref elts 0) 'multi-measure-rest)) (mcount (ly:grob-property mmrest 'measure-count))) (if (= measure-count 1) 2 0))) ;; it doesn't matter what I return otherwise, but still... 9))) } mmVoiceOne = { \override MultiMeasureRest #'staff-position = #4 } mmVoiceTwo = { \override MultiMeasureRest #'staff-position = #-4 } ...and then you use \mmOneVoice when you know all the voices in the staff will have the same rests, and \mmVoiceOne or \mmVoiceTwo when they won't. -- Arvid ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Full bar rests in multi-voiced piano scores -- question and a suggestion
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
Re: Full bar rests in multi-voiced piano scores -- question and a suggestion
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
Re: Full bar rests in multi-voiced piano scores -- question and a suggestion
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 swit
Full bar rests in multi-voiced piano scores -- question and a suggestion
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 t