openlilylib / snippets

A place to store useful pieces of LilyPond code - custom functions, engravers, hacks, templates, examples etc.
Other
119 stars 39 forks source link

fix dot problem in merge-rests-engraver #168

Open chfin opened 6 years ago

chfin commented 6 years ago

The merge-rests-engraver did not merge the dots of several dotted rests resulting in multiple stacked dots on a single merged rest (cf. #123). This commit fixes the issue by removing the dots from all merged rests except one. Since the engraver only merges rests with the same length, it should not matter which rest keeps the dots, so we take the first.

uliska commented 6 years ago

Thank you for the pull request. I am currently in a difficult situation, so please add any new comment to this if I shouldn't review within, say, a week.

dliessi commented 4 years ago

I tried this change but it throws an error when used on rests with no dots. Moreover it keeps the wrong dot, i.e., the lower one.

dliessi commented 4 years ago

The Scheme engraver Merge_rests_engraver by Thomas Morley (Harm), correctly dealing with dotted rests and full-measure rests, is included in LilyPond 2.20.0 (actually it was included before 2.19.83 and was extended to deal with dotted rests in 2.19.83). I'll use that instead of the OLL one.

The dot positioning problem is actually a bug in LilyPond.

dliessi commented 4 years ago

The dot positioning problem is actually a bug in LilyPond.

...which is apparently already solved in master.