[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: rests in polyphonic music - 'stems down, rests up'
From: |
andersvi |
Subject: |
Re: rests in polyphonic music - 'stems down, rests up' |
Date: |
Tue, 02 Nov 2010 17:13:44 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.90 (gnu/linux) |
>>>>> "K" == Keith E OHara <address@hidden> writes:
K> On Mon, 01 Nov 2010 12:25:12 -0700, <address@hidden> wrote:
>> Q: How Can i separate handling of rests from stem-directions in
>> polyphonic voice-handling?
>>
Hello Anders,
K> I would also have expected Rest 'direction to do what you
K> asked. It does change the placement of rests in columns with
K> only rests, but when there are both notes and rests, the rests
K> act as if they had the Stem direction.
K> This could be a bug, or there could be some non-obvious reason
K> Lilypond needs to behave this way. If it still looks like a bug
K> after you set the Prelude, would you consider making a bug report
K> ?
It seems the Rest 'direction overrides get reset by parsing the other
voice somehow.
However the following \restUp cludge is a workaround:
restUp = {
\override Stem #'direction =
#(lambda (grob)
(if (ly:grob? (ly:grob-object (ly:grob-parent grob X) 'rest)) 1 -1 ))
}
restN = {
\revert Stem #'direction
}
musicA = \relative c' {r8 <c' c'> r <c c'>}
musicB = \relative c' {g4 g}
\score {
\new Staff {
<<
\new Voice { \voiceTwo {\restUp \musicA } {\restN \musicA }}
\new Voice { \voiceOne { \musicB } { \musicB }}
>>
}
\layout { }
}
sjekker_scm_if.png
Description: PNG image
Re: rests in polyphonic music - 'stems down, rests up', Keith E OHara, 2010/11/02
Re: rests in polyphonic music - 'stems down, rests up', Keith E OHara, 2010/11/04