[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Issue 3560: Completion_heads_engraver with \scaleDurations (issue 14
From: |
k-ohara5a5a |
Subject: |
Re: Issue 3560: Completion_heads_engraver with \scaleDurations (issue 14268043) |
Date: |
Sat, 26 Oct 2013 06:37:13 +0000 |
The simplicity is just lovely.
https://codereview.appspot.com/14268043/diff/9001/lily/completion-note-heads-engraver.cc
File lily/completion-note-heads-engraver.cc (right):
https://codereview.appspot.com/14268043/diff/9001/lily/completion-note-heads-engraver.cc#newcode205
lily/completion-note-heads-engraver.cc:205: if (nb.main_part_ && nb <
note_dur.get_length ())
The logic is a bit convoluted (probably a leftover from an earlier
design).
Now the test factor.sign==1 could go into the if()
https://codereview.appspot.com/14268043/diff/9001/ly/engraver-init.ly
File ly/engraver-init.ly (right):
https://codereview.appspot.com/14268043/diff/9001/ly/engraver-init.ly#newcode637
ly/engraver-init.ly:637: completionFactor = #ly:duration-scale
We do need to keep issue 1532 fixed, since several people depend on and
expect that behavior.
%% Historically, completion_heads_engraver has split integer-scaled
%% notes into notes with no scaling c1*3 ==> {c1~ c1~ c1~}
completionFactor = #
(lambda (dur)
(let ((scale (ly:duration-scale dur)))
(if (integer? scale)
1
scale)))
If you can make the test
(if (> (ly:duration-length dur) measureLength)
then issue 1772 works as several people[*] expected.
[*] people including Neil, who had recently reviewed and pushed Páls
patch to make completion_*_engraver split tuplet-notes into
tuplet-notes.
https://codereview.appspot.com/14268043/