X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fmensural-ligature-engraver.cc;h=5adc44122c27406832319d8d226d9f055da5a666;hb=9f3572d98bb948c9689cd1f75401a029451fa001;hp=f40ce004b056b6bbc2df480a3b5bf20d5f9f213d;hpb=04265f11d1f21416ccebd2dcaa1d903dc781b36e;p=lilypond.git diff --git a/lily/mensural-ligature-engraver.cc b/lily/mensural-ligature-engraver.cc index f40ce004b0..5adc44122c 100644 --- a/lily/mensural-ligature-engraver.cc +++ b/lily/mensural-ligature-engraver.cc @@ -11,19 +11,16 @@ #include "font-interface.hh" #include "international.hh" #include "mensural-ligature.hh" +#include "music.hh" #include "note-column.hh" #include "note-head.hh" #include "output-def.hh" #include "paper-column.hh" -#include "pitch.hh" #include "rhythmic-head.hh" #include "spanner.hh" #include "staff-symbol-referencer.hh" -#include "stream-event.hh" #include "warn.hh" -#include "translator.icc" - /* * TODO: accidentals are aligned with the first note; * they must appear ahead. @@ -50,8 +47,7 @@ class Mensural_ligature_engraver : public Coherent_ligature_engraver protected: virtual Spanner *create_ligature_spanner (); virtual void build_ligature (Spanner *ligature, vector primitives); - DECLARE_TRANSLATOR_LISTENER (ligature); - + public: TRANSLATOR_DECLARATIONS (Mensural_ligature_engraver); @@ -61,13 +57,6 @@ private: void fold_up_primitives (vector primitives); }; -IMPLEMENT_TRANSLATOR_LISTENER (Mensural_ligature_engraver, ligature); -void -Mensural_ligature_engraver::listen_ligature (Stream_event *ev) -{ - Ligature_engraver::listen_ligature (ev); -} - Mensural_ligature_engraver::Mensural_ligature_engraver () { brew_ligature_primitive_proc = @@ -104,12 +93,12 @@ Mensural_ligature_engraver::transform_heads (vector primitives) Item *primitive = dynamic_cast (info.grob ()); int duration_log = Note_head::get_balltype (primitive); - Stream_event *nr = info.event_cause (); + Music *nr = info.music_cause (); /* ugh. why not simply check for pitch? */ - if (!nr->in_event_class ("note-event")) + if (!nr->is_mus_type ("note-event")) { nr->origin ()->warning (_f ("cannot determine pitch of ligature primitive -> skipping")); @@ -174,7 +163,7 @@ Mensural_ligature_engraver::transform_heads (vector primitives) } // b. descendens longa or brevis else if (i < s - 1 - && (unsmob_pitch (primitives[i + 1].event_cause () + && (unsmob_pitch (primitives[i + 1].music_cause () ->get_property ("pitch"))->steps () < pitch) && duration_log > -3) { @@ -393,6 +382,8 @@ Mensural_ligature_engraver::build_ligature (Spanner *ligature, fold_up_primitives (primitives); } +#include "translator.icc" + ADD_ACKNOWLEDGER (Mensural_ligature_engraver, rest); ADD_ACKNOWLEDGER (Mensural_ligature_engraver, note_head); ADD_TRANSLATOR (Mensural_ligature_engraver,