bug-lilypond
[Top][All Lists]
Advanced

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

Re: Issue 1228 in lilypond: \override RestCollision #'positioning-done =


From: lilypond
Subject: Re: Issue 1228 in lilypond: \override RestCollision #'positioning-done = #merge-rests-on-positioning
Date: Wed, 18 Aug 2010 18:32:36 +0000


Comment #1 on issue 1228 by wbsoft: \override RestCollision #'positioning-done = #merge-rests-on-positioning
http://code.google.com/p/lilypond/issues/detail?id=1228

This file, merge-rests.ily, implements merging of simultaneous rests and multi-measure rests.

It works only for two voices (but this is acceptable and documentable).

The normal rest merging is as in LSR #336, I added support for multimeasure rests using the following algorithm: - for every MMRest, record the StaffSymbol and the NonMusicalPaperColumn the MMrest resides in, on the moment 'Y-offset is requested. - if there is already a MMRest found in this StaffSymbol and NonMusicalPaperColumn, delete that one and return 0 - if there wasn't a MMRest in this StaffSymbol and NonMusicalPaperColumn, store this one and return the default value from ly:staff-symbol-referencer::callback

I use a weak key hash so the storage will be gc'ed as soon as the staff symbol is gc'ed. the hash is enclosed in a (let ()) expression outside the function body so the global namespace is not polluted.

It seems to work well on some files I tested it on. The usage is documented in the file. Please give feedback as this is my first try at some more complicated Scheme stuff. :-)



Attachments:
        merge-rests.ily  4.2 KB




reply via email to

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