X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fnote-heads-engraver.cc;h=5839a827eb3129045c9e5330d41dacf203ab0d67;hb=b280487b16134aaad7e284a6034f1a4eba3a5a99;hp=0431981eb65a46b3543acd02b9c8af0c78dc1e06;hpb=d2762a4f1add2bb04d6fc34d3c7ae03eeb7d500f;p=lilypond.git diff --git a/lily/note-heads-engraver.cc b/lily/note-heads-engraver.cc index 0431981eb6..5839a827eb 100644 --- a/lily/note-heads-engraver.cc +++ b/lily/note-heads-engraver.cc @@ -41,7 +41,7 @@ public: TRANSLATOR_DECLARATIONS (Note_heads_engraver); protected: - DECLARE_TRANSLATOR_LISTENER (note); + void listen_note (Stream_event *); void process_music (); void stop_translation_timestep (); }; @@ -50,7 +50,6 @@ Note_heads_engraver::Note_heads_engraver () { } -IMPLEMENT_TRANSLATOR_LISTENER (Note_heads_engraver, note); void Note_heads_engraver::listen_note (Stream_event *ev) { @@ -68,7 +67,7 @@ Note_heads_engraver::process_music () Stream_event *ev = note_evs_[i]; Item *note = make_item ("NoteHead", ev->self_scm ()); - Pitch *pit = Pitch::unsmob (ev->get_property ("pitch")); + Pitch *pit = unsmob (ev->get_property ("pitch")); #if 0 /* TODO: should have a mechanism to switch off these warnings. */ @@ -100,8 +99,8 @@ Note_heads_engraver::process_music () { SCM scm_tonic = get_property ("tonic"); Pitch tonic; - if (Pitch::is_smob (scm_tonic)) - tonic = *Pitch::unsmob (scm_tonic); + if (unsmob (scm_tonic)) + tonic = *unsmob (scm_tonic); unsigned int delta = (pit->get_notename () - tonic.get_notename () + 7) % 7; @@ -121,6 +120,12 @@ Note_heads_engraver::stop_translation_timestep () note_evs_.clear (); } +void +Note_heads_engraver::boot () +{ + ADD_LISTENER (Note_heads_engraver, note); +} + ADD_TRANSLATOR (Note_heads_engraver, /* doc */ "Generate note heads.",