Reviewers: Neil Puttock,
Message:
On 2011/01/23 18:00:23, Neil Puttock wrote:
LGTM.
Thanks!
I've uploaded patchset 3, which I believe fixes all these.
Cheers,
- Graham
Description:
Fix issue 1376 ambitus two accidentals.
Add regtest for 1376 ambitus accidentals.
When an ambitus consists of a single note with different alterations,
two accidentals should be printed, no matter the key signature.
Please review this at http://codereview.appspot.com/4099044/
Affected files:
M input/regression/ambitus.ly
M lily/ambitus-engraver.cc
Index: input/regression/ambitus.ly
diff --git a/input/regression/ambitus.ly b/input/regression/ambitus.ly
index
03c6a776fbeb89de671ed5518cb94a505632783b..ea715f0e994e7baa093af712033fc926d2c2c9ad
100644
--- a/input/regression/ambitus.ly
+++ b/input/regression/ambitus.ly
@@ -1,10 +1,12 @@
-\version "2.12.0"
+\version "2.13.47"
\header {
texidoc = "Ambitus indicate pitch ranges for voices.
Accidentals only show up if they're not part of key
signature. @code{AmbitusNoteHead} grobs also have ledger lines.
+The noteheads are printed in overstrike, so there's only one
+visible; the accidentals are prevented from colliding.
"
}
@@ -25,4 +27,8 @@ signature. @code{AmbitusNoteHead} grobs also have ledger
lines.
\key d \major
cis as'
}
+ \new Staff \relative c' {
+ \time 2/4
+ c4 cis
+ }
>>
Index: lily/ambitus-engraver.cc
diff --git a/lily/ambitus-engraver.cc b/lily/ambitus-engraver.cc
index
d4bc39e7283c2cd9ebcb34944635f1c0cf0a6a76..221c1e8881ee950c70da5af60b29f202236d30ef
100644
--- a/lily/ambitus-engraver.cc
+++ b/lily/ambitus-engraver.cc
@@ -178,7 +178,11 @@ Ambitus_engraver::finalize ()
? robust_scm2rational (scm_cdr (handle), Rational (0))
: Rational (0);
- if (sig_alter == p.get_alteration ())
+ const Pitch other = pitch_interval_[-d];
+
+ if (sig_alter == p.get_alteration ()
+ && !((p.steps () == other.steps ())
+ && (p.get_alteration () != other.get_alteration ())))
{
accidentals_[d]->suicide ();
heads_[d]->set_object ("accidental-grob", SCM_EOL);
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel