X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fambitus-engraver.cc;h=fedf31e5d49e0a3a4649f5693b03af0affe7d98b;hb=ba9a8dc730bb3a681455150bc0a3eef0976523af;hp=a72c735b51417a55190cd29d19ebf5fefb2c09ab;hpb=e24fb7cc5671aea95211d4a0c56f28fb6fe8720e;p=lilypond.git diff --git a/lily/ambitus-engraver.cc b/lily/ambitus-engraver.cc index a72c735b51..fedf31e5d4 100644 --- a/lily/ambitus-engraver.cc +++ b/lily/ambitus-engraver.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 2002--2014 Juergen Reuter + Copyright (C) 2002--2015 Juergen Reuter Han-Wen Nienhuys in_event_class ("note-event")) + if (nr && nr->in_event_class ("note-event") + && !to_boolean (info.grob ()->get_property ("ignore-ambitus"))) { SCM p = nr->get_property ("pitch"); /* If the engraver is added to a percussion context, filter out unpitched note heads. */ - if (!unsmob_pitch (p)) + if (!Pitch::is_smob (p)) return; - Pitch pitch = *unsmob_pitch (p); + Pitch pitch = *Pitch::unsmob (p); Drul_array expands = pitch_interval_.add_point (pitch); if (expands[UP]) causes_[UP] = nr; @@ -173,11 +174,11 @@ Ambitus_engraver::finalize () scm_from_int (p.get_notename ())), start_key_sig_); - if (handle == SCM_BOOL_F) + if (scm_is_false (handle)) handle = scm_assoc (scm_from_int (p.get_notename ()), start_key_sig_); - Rational sig_alter = (handle != SCM_BOOL_F) + Rational sig_alter = (scm_is_true (handle)) ? robust_scm2rational (scm_cdr (handle), Rational (0)) : Rational (0); @@ -230,7 +231,7 @@ ADD_TRANSLATOR (Ambitus_engraver, "AmbitusNoteHead ", /* read */ - "keySignature " + "keyAlterations " "middleCClefPosition " "middleCOffset ",