2015-08-23 21:21 GMT+02:00 Peter Selinger <[email protected]>:
> Thomas Morley wrote:
>>
>> Anyway, if you want to have the dots for rests affected as well, you
>> need to adress them through the Rest:
>>
>> \version "2.19.25"
>>
>> omit-rest-and-dots =
>> \override Rest.after-line-breaking =
>> #(lambda (grob)
>> (ly:grob-set-property! grob 'stencil #f)
>> (if (not (null? (ly:grob-object grob 'dot)))
>> (ly:grob-set-property! (ly:grob-object grob 'dot) 'stencil #f)))
>>
>> centerRests = {
>> \override Rest.staff-position = #0
>> }
>>
>> \new Staff <<
>> \new Voice
>> \relative c'' {
>> \voiceOne
>> \omit-rest-and-dots
>> r4 c r d | r2. e4
>> d2. e4
>> }
>> \new Voice
>> \relative c'' {
>> \voiceTwo
>> \centerRests
>> r4 a8 a8 r4 b8 b8 | r2. c4
>> c2. a4
>> }
>>
>
> Great, that is just the information I was missing in order to fix
> Jay's Scheme code. Attached is an updated version of
>
> https://github.com/openlilylib/openlilylib/blob/master/editorial-tools/merge-rests-engraver/definition.ily
>
> that now works correctly for dotted rests (as well as double-dotted
> rests, full-measure rests, and so on). I am attaching the full file,
> as well as a patch.
>
> I factored the actual rest-merging code into a separate Scheme
> function that is shared by both merge-rests-engraver and
> merge-mmrests-engraver -- this is probably technically unnecessary
> because multi-measure rests are not usually dotted. Still I think it
> is better to engrave just one glyph for the merged rests, rather than
> a bunch of identical glyphs at the same coordinate. Also, having it as
> a separate function is easier to comprehend than deeply-nested Scheme.
>
Hi Peter,
glad I could help.
Though, reading up the whole thread I got some concerns and did some
further testing.
Try with your updated engravers:
\layout {
\context { \Staff \consists #merge-rests-engraver }
\context { \Staff \consists #merge-mmrests-engraver }
\compressFullBarRests
}
\new Staff <<
\new Voice {
\voiceOne
R1*3^\fermataMarkup
}
\new Voice {
\voiceTwo
R1*3_\fermataMarkup
}
>>
Looks some more work has to be done ...
png attached
>
> If you all agree that this patch works correctly, hopefully someone
> with commit privileges can merge it into git?
Afaik, there are still some problems with scheme-engravers in the source-code.
But I may be wrong here.
Cheers,
Harm
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user