From a4d7106c75b325441063fd9ba9c4131979784aa5 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Thu, 16 Nov 2000 22:25:34 +0100 Subject: [PATCH] patch::: 1.3.108.jcn3 --- VERSION | 2 +- lily/a2-engraver.cc | 12 ++++++++-- lily/auto-beam-engraver.cc | 5 +++-- lily/bar-engraver.cc | 13 ++++++++--- lily/bar-number-engraver.cc | 12 ++++++++-- lily/beam-engraver.cc | 14 ++++++++++-- lily/breathing-sign-engraver.cc | 6 ++--- lily/chord-name-engraver.cc | 8 +++---- lily/chord-tremolo-engraver.cc | 11 +++++++-- lily/clef-engraver.cc | 17 ++++++++++---- lily/custos-engraver.cc | 6 +++-- lily/dynamic-engraver.cc | 14 ++++++++++-- lily/dynamic-performer.cc | 11 +++++++-- lily/engraver-group-engraver.cc | 13 ++++++++--- lily/extender-engraver.cc | 13 ++++++++--- lily/grace-engraver-group.cc | 4 ++-- lily/grace-performer-group.cc | 4 ++-- lily/hyphen-engraver.cc | 13 ++++++++--- lily/include/key-performer.hh | 2 +- lily/include/lyric-engraver.hh | 2 +- lily/include/lyric-performer.hh | 2 +- lily/include/note-performer.hh | 2 +- lily/include/staff-performer.hh | 2 +- lily/include/tempo-performer.hh | 2 +- lily/include/tie-performer.hh | 2 +- lily/include/timing-translator.hh | 2 +- lily/include/translator-group.hh | 3 ++- lily/include/translator.hh | 4 +++- lily/key-engraver.cc | 11 +++++++-- lily/key-performer.cc | 2 +- lily/local-key-engraver.cc | 6 +++-- lily/lyric-engraver.cc | 3 ++- lily/lyric-performer.cc | 2 +- lily/mark-engraver.cc | 11 +++++++-- lily/multi-measure-rest-engraver.cc | 11 +++++++-- lily/note-heads-engraver.cc | 18 +++++++++++++-- lily/note-name-engraver.cc | 6 +++-- lily/note-performer.cc | 2 +- lily/performer-group-performer.cc | 24 +++++++++++++++----- lily/piano-pedal-engraver.cc | 17 ++++++++++---- lily/piano-pedal-performer.cc | 8 +++---- lily/property-engraver.cc | 2 ++ lily/repeat-acknowledge-engraver.cc | 4 ++-- lily/rest-engraver.cc | 4 ++-- lily/score-engraver.cc | 7 +++--- lily/score-performer.cc | 4 ++-- lily/script-engraver.cc | 12 ++++++++-- lily/slur-engraver.cc | 12 ++++++++-- lily/span-dynamic-performer.cc | 8 +++++-- lily/staff-performer.cc | 4 ++-- lily/staff-symbol-engraver.cc | 13 +++++++++-- lily/tempo-performer.cc | 2 +- lily/text-engraver.cc | 13 +++++++++-- lily/text-spanner-engraver.cc | 12 ++++++++-- lily/tie-engraver.cc | 17 ++++++++------ lily/tie-performer.cc | 3 ++- lily/time-signature-engraver.cc | 4 ++-- lily/time-signature-performer.cc | 4 ++-- lily/timing-translator.cc | 2 +- lily/translator-group.cc | 9 +++++++- lily/translator.cc | 35 +++++++++++++++++++++++++++-- lily/tuplet-engraver.cc | 11 +++++++-- lily/volta-engraver.cc | 15 ++++++++++--- 63 files changed, 390 insertions(+), 129 deletions(-) diff --git a/VERSION b/VERSION index 53df617040..2dfd11b7dc 100644 --- a/VERSION +++ b/VERSION @@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=3 PATCH_LEVEL=108 -MY_PATCH_LEVEL=jcn2 +MY_PATCH_LEVEL=jcn3 # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/lily/a2-engraver.cc b/lily/a2-engraver.cc index ee33e68d75..ce29bf6209 100644 --- a/lily/a2-engraver.cc +++ b/lily/a2-engraver.cc @@ -22,9 +22,10 @@ public: VIRTUAL_COPY_CONS (Translator); protected: - virtual void do_process_music (); + void deprecated_process_music (); virtual void acknowledge_element (Score_element_info); + virtual void process_acknowledged (); virtual void do_pre_move_processing (); private: @@ -40,8 +41,9 @@ A2_engraver::A2_engraver () state_ = UNISILENCE; } + void -A2_engraver::do_process_music () +A2_engraver::deprecated_process_music () { if (!to_boolean (get_property ("combineParts"))) return ; @@ -159,6 +161,12 @@ A2_engraver::acknowledge_element (Score_element_info i) } } +void +A2_engraver::process_acknowledged () +{ + deprecated_process_music (); +} + void A2_engraver::do_pre_move_processing () { diff --git a/lily/auto-beam-engraver.cc b/lily/auto-beam-engraver.cc index 1ef88f13cc..5fb3ade284 100644 --- a/lily/auto-beam-engraver.cc +++ b/lily/auto-beam-engraver.cc @@ -34,7 +34,7 @@ protected: virtual void do_post_move_processing (); virtual void do_removal_processing (); virtual void acknowledge_element (Score_element_info); - virtual void do_process_music (); + void deprecated_process_music (); virtual void process_acknowledged (); private: void begin_beam (); @@ -77,7 +77,7 @@ Auto_beam_engraver::do_try_music (Music*) } void -Auto_beam_engraver::do_process_music () +Auto_beam_engraver::deprecated_process_music () { consider_end_and_begin (shortest_mom_); } @@ -417,6 +417,7 @@ Auto_beam_engraver::junk_beam () void Auto_beam_engraver::process_acknowledged () { + deprecated_process_music (); if (stem_l_arr_p_) { Moment now = now_mom (); diff --git a/lily/bar-engraver.cc b/lily/bar-engraver.cc index dc2d162fc2..cba7a83573 100644 --- a/lily/bar-engraver.cc +++ b/lily/bar-engraver.cc @@ -29,8 +29,9 @@ public: protected: virtual void do_creation_processing (); virtual void do_removal_processing (); - virtual void do_process_music(); + void deprecated_process_music(); virtual void do_pre_move_processing(); + virtual void process_acknowledged (); private: void typeset_bar (); @@ -73,10 +74,10 @@ Bar_engraver::do_removal_processing () /* Bar_engraver should come *after* any engravers that expect bars to - modify whichBar in do_process_music () be typeset + modify whichBar in deprecated_process_music () be typeset */ void -Bar_engraver::do_process_music() +Bar_engraver::deprecated_process_music() { SCM b =get_property ("whichBar"); if (gh_string_p (b)) @@ -85,6 +86,12 @@ Bar_engraver::do_process_music() } } +void +Bar_engraver::process_acknowledged () +{ + deprecated_process_music (); +} + void Bar_engraver::typeset_bar () { diff --git a/lily/bar-number-engraver.cc b/lily/bar-number-engraver.cc index 834270e4d0..a6bb7e803a 100644 --- a/lily/bar-number-engraver.cc +++ b/lily/bar-number-engraver.cc @@ -27,15 +27,16 @@ protected: virtual void do_pre_move_processing (); virtual void acknowledge_element (Score_element_info); virtual void do_creation_processing (); + virtual void process_acknowledged (); void create_items(); - void do_process_music (); + void deprecated_process_music (); public: VIRTUAL_COPY_CONS(Translator); Bar_number_engraver(); }; void -Bar_number_engraver::do_process_music () +Bar_number_engraver::deprecated_process_music () { // todo include (&&!time->cadenza_b_ ) SCM bn = get_property("currentBarNumber"); @@ -53,6 +54,13 @@ Bar_number_engraver::do_process_music () } } +void +Bar_number_engraver::process_acknowledged () +{ + deprecated_process_music (); +} + + ADD_THIS_TRANSLATOR(Bar_number_engraver); Bar_number_engraver::Bar_number_engraver () diff --git a/lily/beam-engraver.cc b/lily/beam-engraver.cc index 84ff88a5dc..71c77da118 100644 --- a/lily/beam-engraver.cc +++ b/lily/beam-engraver.cc @@ -42,9 +42,10 @@ protected: virtual void do_pre_move_processing (); virtual void do_post_move_processing (); virtual void do_removal_processing (); + virtual void process_acknowledged (); virtual void acknowledge_element (Score_element_info); virtual bool do_try_music (Music*); - virtual void do_process_music (); + void deprecated_process_music (); public: Beam_engraver (); VIRTUAL_COPY_CONS (Translator); @@ -112,7 +113,7 @@ Beam_engraver::set_melisma (bool m) void -Beam_engraver::do_process_music () +Beam_engraver::deprecated_process_music () { if (reqs_drul_[STOP]) { @@ -166,6 +167,8 @@ Beam_engraver::do_process_music () announce_element (beam_p_, reqs_drul_[START]); } + reqs_drul_[STOP] = 0; + reqs_drul_[START] = 0; } void @@ -222,6 +225,13 @@ Beam_engraver::do_removal_processing () } } +void +Beam_engraver::process_acknowledged () +{ + deprecated_process_music (); +} + + void Beam_engraver::acknowledge_element (Score_element_info info) { diff --git a/lily/breathing-sign-engraver.cc b/lily/breathing-sign-engraver.cc index 8c06a74e8d..dfdc58b950 100644 --- a/lily/breathing-sign-engraver.cc +++ b/lily/breathing-sign-engraver.cc @@ -29,7 +29,7 @@ public: protected: virtual bool do_try_music (Music *req_l); - virtual void do_process_music(); + void deprecated_process_music(); virtual void do_pre_move_processing(); virtual void do_post_move_processing(); @@ -58,9 +58,9 @@ Breathing_sign_engraver::do_try_music (Music*r_l) } void -Breathing_sign_engraver::do_process_music() +Breathing_sign_engraver::deprecated_process_music() { - if(breathing_sign_req_l_) + if(breathing_sign_req_l_ && ! breathing_sign_p_) { SCM b = get_property ("BreathingSign"); breathing_sign_p_ = new Item (b); diff --git a/lily/chord-name-engraver.cc b/lily/chord-name-engraver.cc index b9328b5113..5b7e625a4e 100644 --- a/lily/chord-name-engraver.cc +++ b/lily/chord-name-engraver.cc @@ -28,7 +28,7 @@ public: protected: virtual void do_pre_move_processing (); virtual void acknowledge_element (Score_element_info i); - virtual void do_process_music (); + void deprecated_process_music (); virtual bool do_try_music (Music *); private: @@ -78,7 +78,7 @@ Chord_name_engraver::do_try_music (Music* m) } /* Uh, if we do acknowledge_element, shouldn't we postpone - do_process_music until do_process_acknowlegded? + deprecated_process_music until do_process_acknowlegded? Sigh, I can *never* remember how this works, can't we possibly-please just number these functions: @@ -87,7 +87,7 @@ Chord_name_engraver::do_try_music (Music* m) post_move1 do_try_music2 - do_process_music3 (or is it acknowledge_element3 ?) + deprecated_process_music3 (or is it acknowledge_element3 ?) acknowledge_element4 do_pre_move9 @@ -103,7 +103,7 @@ Chord_name_engraver::acknowledge_element (Score_element_info i) } void -Chord_name_engraver::do_process_music () +Chord_name_engraver::deprecated_process_music () { if (!chord_name_p_ && gh_car (chord_) != SCM_EOL) { diff --git a/lily/chord-tremolo-engraver.cc b/lily/chord-tremolo-engraver.cc index ee310fb044..8570ff263d 100644 --- a/lily/chord-tremolo-engraver.cc +++ b/lily/chord-tremolo-engraver.cc @@ -58,11 +58,12 @@ protected: protected: virtual void do_removal_processing(); - virtual void do_process_music(); + void deprecated_process_music(); virtual bool do_try_music (Music*); virtual void acknowledge_element (Score_element_info); virtual void do_pre_move_processing(); virtual void do_post_move_processing(); + virtual void process_acknowledged (); }; Chord_tremolo_engraver::Chord_tremolo_engraver() @@ -93,7 +94,13 @@ Chord_tremolo_engraver::do_try_music (Music * m) } void -Chord_tremolo_engraver::do_process_music () +Chord_tremolo_engraver::process_acknowledged () +{ + deprecated_process_music (); +} + +void +Chord_tremolo_engraver::deprecated_process_music () { if (repeat_ && !beam_p_) { diff --git a/lily/clef-engraver.cc b/lily/clef-engraver.cc index b57a2cc4f4..6a962c52a8 100644 --- a/lily/clef-engraver.cc +++ b/lily/clef-engraver.cc @@ -33,10 +33,11 @@ public: Direction octave_dir_; protected: - virtual void do_process_music (); + void deprecated_process_music (); virtual void do_pre_move_processing (); virtual void do_creation_processing (); virtual void do_post_move_processing (); + virtual void process_acknowledged (); virtual void acknowledge_element (Score_element_info); private: @@ -113,6 +114,7 @@ Clef_engraver::set_glyph () void Clef_engraver::acknowledge_element (Score_element_info info) { + deprecated_process_music (); Item * item =dynamic_cast (info.elem_l_); if (item) { @@ -182,13 +184,20 @@ Clef_engraver::create_clef () } void -Clef_engraver::do_process_music () +Clef_engraver::process_acknowledged () +{ + deprecated_process_music (); +} + +void +Clef_engraver::deprecated_process_music () { SCM glyph = get_property ("clefGlyph"); SCM clefpos = get_property ("clefPosition"); SCM octavation = get_property ("clefOctavation"); - - if (scm_equal_p (glyph, prev_glyph_) == SCM_BOOL_F + + if (clefpos == SCM_EOL + || scm_equal_p (glyph, prev_glyph_) == SCM_BOOL_F || scm_equal_p (clefpos, prev_cpos_) == SCM_BOOL_F || scm_equal_p (octavation, prev_octavation_) == SCM_BOOL_F) { diff --git a/lily/custos-engraver.cc b/lily/custos-engraver.cc index 02ffd1f46d..018d772de0 100644 --- a/lily/custos-engraver.cc +++ b/lily/custos-engraver.cc @@ -26,7 +26,7 @@ public: Custos_engraver(); virtual void do_post_move_processing(); virtual void acknowledge_element(Score_element_info); - virtual void do_process_music (); + void deprecated_process_music (); virtual void process_acknowledged (); virtual void do_pre_move_processing (); virtual void do_removal_processing (); @@ -71,7 +71,7 @@ Custos_engraver::do_post_move_processing () TODO check if this works with forced bar lines? */ void -Custos_engraver::do_process_music () +Custos_engraver::deprecated_process_music () { if (gh_string_p (get_property( "whichBar"))) custos_permitted = true; @@ -106,6 +106,8 @@ Custos_engraver::acknowledge_element (Score_element_info info) void Custos_engraver::process_acknowledged () { + deprecated_process_music (); + if (custos_permitted) { for (int i = pitches_.size (); i--;) diff --git a/lily/dynamic-engraver.cc b/lily/dynamic-engraver.cc index 57e35bd730..e9141a840e 100644 --- a/lily/dynamic-engraver.cc +++ b/lily/dynamic-engraver.cc @@ -57,8 +57,9 @@ protected: virtual void do_removal_processing (); virtual void acknowledge_element (Score_element_info); virtual bool do_try_music (Music *req_l); - virtual void do_process_music (); + void deprecated_process_music (); virtual void do_pre_move_processing (); + virtual void process_acknowledged (); virtual void do_post_move_processing (); }; @@ -121,7 +122,7 @@ Dynamic_engraver::do_try_music (Music * m) } void -Dynamic_engraver::do_process_music () +Dynamic_engraver::deprecated_process_music () { if (accepted_spanreqs_drul_[START] || accepted_spanreqs_drul_[STOP] || script_req_l_) @@ -274,6 +275,9 @@ Dynamic_engraver::do_process_music () announce_element (cresc_p_, accepted_spanreqs_drul_[START]); } } + script_req_l_ = 0; + accepted_spanreqs_drul_[START] = 0; + accepted_spanreqs_drul_[STOP] = 0; } void @@ -282,6 +286,12 @@ Dynamic_engraver::do_pre_move_processing () typeset_all (); } +void +Dynamic_engraver::process_acknowledged () +{ + deprecated_process_music (); +} + void Dynamic_engraver::do_removal_processing () { diff --git a/lily/dynamic-performer.cc b/lily/dynamic-performer.cc index 7818776d04..262185b93a 100644 --- a/lily/dynamic-performer.cc +++ b/lily/dynamic-performer.cc @@ -29,8 +29,9 @@ public: protected: virtual bool do_try_music (Music* req_l); - virtual void do_process_music (); + void deprecated_process_music (); virtual void do_pre_move_processing (); + virtual void process_acknowledged (); private: Music* script_req_l_; @@ -51,7 +52,7 @@ Dynamic_performer::~Dynamic_performer () void -Dynamic_performer::do_process_music () +Dynamic_performer::deprecated_process_music () { if (script_req_l_) { @@ -118,6 +119,12 @@ Dynamic_performer::do_process_music () } } +void +Dynamic_performer::process_acknowledged () +{ + deprecated_process_music (); +} + void Dynamic_performer::do_pre_move_processing () { diff --git a/lily/engraver-group-engraver.cc b/lily/engraver-group-engraver.cc index 847bb5d13e..2e753f543d 100644 --- a/lily/engraver-group-engraver.cc +++ b/lily/engraver-group-engraver.cc @@ -32,13 +32,19 @@ Engraver_group_engraver::do_announces() Translator * t = unsmob_translator (gh_car (p)); dynamic_cast (t)->do_announces (); } - - while (announce_info_arr_.size ()) + + // debug + int i = 0; + do { + i++; for (int j =0; j < announce_info_arr_.size(); j++) { Score_element_info info = announce_info_arr_[j]; - + + if (i > 10) + printf ("elt: %s\n", + announce_info_arr_[j].elem_l_->name ().ch_C ()); for (SCM p = simple_trans_list_; gh_pair_p (p); p = gh_cdr (p)) { Translator * t = unsmob_translator (gh_car (p)); @@ -56,6 +62,7 @@ Engraver_group_engraver::do_announces() eng->process_acknowledged (); } } + while (announce_info_arr_.size ()); } diff --git a/lily/extender-engraver.cc b/lily/extender-engraver.cc index 5c893207ee..bf1fa72fe0 100644 --- a/lily/extender-engraver.cc +++ b/lily/extender-engraver.cc @@ -39,10 +39,11 @@ public: protected: virtual void acknowledge_element (Score_element_info); virtual void do_removal_processing(); - virtual void do_process_music(); + void deprecated_process_music(); virtual bool do_try_music (Music*); virtual void do_pre_move_processing(); virtual void do_post_move_processing (); + virtual void process_acknowledged (); private: }; @@ -101,9 +102,15 @@ Extender_engraver::do_removal_processing () } void -Extender_engraver::do_process_music () +Extender_engraver::process_acknowledged () { - if (req_l_) + deprecated_process_music (); +} + +void +Extender_engraver::deprecated_process_music () +{ + if (req_l_ && ! extender_p_) { if (!last_lyric_l_) { diff --git a/lily/grace-engraver-group.cc b/lily/grace-engraver-group.cc index db566fe4bb..8f932cc632 100644 --- a/lily/grace-engraver-group.cc +++ b/lily/grace-engraver-group.cc @@ -69,8 +69,8 @@ void Grace_engraver_group::process () { calling_self_b_ = true; - process_music (); - do_announces(); + //process_music (); + announces(); pre_move_processing(); check_removal(); calling_self_b_ = false; diff --git a/lily/grace-performer-group.cc b/lily/grace-performer-group.cc index 4bf89fe1da..fde743bef0 100644 --- a/lily/grace-performer-group.cc +++ b/lily/grace-performer-group.cc @@ -71,8 +71,8 @@ void Grace_performer_group::process () { calling_self_b_ = true; - process_music (); - do_announces(); + //process_music (); + announces(); pre_move_processing(); check_removal(); calling_self_b_ = false; diff --git a/lily/hyphen-engraver.cc b/lily/hyphen-engraver.cc index e78882d3d1..709339b8a1 100644 --- a/lily/hyphen-engraver.cc +++ b/lily/hyphen-engraver.cc @@ -33,10 +33,11 @@ public: protected: virtual void acknowledge_element (Score_element_info); virtual void do_removal_processing(); - virtual void do_process_music(); + void deprecated_process_music(); virtual bool do_try_music (Music*); virtual void do_pre_move_processing(); virtual void do_post_move_processing (); + virtual void process_acknowledged (); private: }; @@ -93,9 +94,15 @@ Hyphen_engraver::do_removal_processing () } void -Hyphen_engraver::do_process_music () +Hyphen_engraver::process_acknowledged () { - if (req_l_) + deprecated_process_music (); +} + +void +Hyphen_engraver::deprecated_process_music () +{ + if (req_l_ &&! hyphen_p_) { if (!last_lyric_l_) { diff --git a/lily/include/key-performer.hh b/lily/include/key-performer.hh index 512bd48a53..b89dbb8b42 100644 --- a/lily/include/key-performer.hh +++ b/lily/include/key-performer.hh @@ -22,7 +22,7 @@ public: protected: virtual bool do_try_music (Music* req_l); - virtual void do_process_music (); + void deprecated_process_music (); virtual void do_pre_move_processing (); private: diff --git a/lily/include/lyric-engraver.hh b/lily/include/lyric-engraver.hh index d39ec7e558..cbc55f3628 100644 --- a/lily/include/lyric-engraver.hh +++ b/lily/include/lyric-engraver.hh @@ -23,7 +23,7 @@ class Lyric_engraver : public Engraver protected: virtual void do_pre_move_processing(); virtual bool do_try_music (Music*); - virtual void do_process_music(); + void deprecated_process_music(); virtual void do_post_move_processing (); public: Lyric_engraver (); diff --git a/lily/include/lyric-performer.hh b/lily/include/lyric-performer.hh index 9bb48d0b74..4fe468899f 100644 --- a/lily/include/lyric-performer.hh +++ b/lily/include/lyric-performer.hh @@ -22,7 +22,7 @@ public: protected: virtual bool do_try_music (Music* req_l); - virtual void do_process_music(); + void deprecated_process_music(); virtual void do_pre_move_processing (); private: diff --git a/lily/include/note-performer.hh b/lily/include/note-performer.hh index 574e695224..a7ffbc2261 100644 --- a/lily/include/note-performer.hh +++ b/lily/include/note-performer.hh @@ -21,7 +21,7 @@ public: Note_performer(); protected: - virtual void do_process_music (); + void deprecated_process_music (); virtual bool do_try_music (Music *req_l) ; virtual void do_pre_move_processing (); diff --git a/lily/include/staff-performer.hh b/lily/include/staff-performer.hh index 2ff3cd276d..7fdaea3a0e 100644 --- a/lily/include/staff-performer.hh +++ b/lily/include/staff-performer.hh @@ -30,7 +30,7 @@ protected: virtual void play_element (Audio_element* p); virtual void do_removal_processing (); virtual void do_creation_processing (); - virtual void do_process_music (); + void deprecated_process_music (); virtual void do_pre_move_processing (); private: diff --git a/lily/include/tempo-performer.hh b/lily/include/tempo-performer.hh index c4a6d0f7c8..e2eb89cc24 100644 --- a/lily/include/tempo-performer.hh +++ b/lily/include/tempo-performer.hh @@ -23,7 +23,7 @@ public: protected: virtual bool do_try_music (Music* req_l); - virtual void do_process_music(); + void deprecated_process_music(); virtual void do_pre_move_processing (); private: diff --git a/lily/include/tie-performer.hh b/lily/include/tie-performer.hh index 54425eb2fa..cec634ac80 100644 --- a/lily/include/tie-performer.hh +++ b/lily/include/tie-performer.hh @@ -54,7 +54,7 @@ protected: virtual void do_pre_move_processing (); virtual void acknowledge_element (Audio_element_info); virtual bool do_try_music (Music*); - virtual void do_process_music (); + void deprecated_process_music (); virtual void process_acknowledged (); }; diff --git a/lily/include/timing-translator.hh b/lily/include/timing-translator.hh index cc852ca5d7..8dac8a403f 100644 --- a/lily/include/timing-translator.hh +++ b/lily/include/timing-translator.hh @@ -27,7 +27,7 @@ public: protected: virtual void do_creation_processing (); virtual bool do_try_music (Music *req_l); - virtual void do_process_music(); + void deprecated_process_music(); virtual void do_pre_move_processing(); virtual void do_post_move_processing(); diff --git a/lily/include/translator-group.hh b/lily/include/translator-group.hh index 5d24929d5b..63b2d70ffc 100644 --- a/lily/include/translator-group.hh +++ b/lily/include/translator-group.hh @@ -70,7 +70,8 @@ protected: bool try_music_on_nongroup_children (Music *m); - virtual void do_process_music (); + void deprecated_process_music (); + virtual void do_announces (); virtual void do_add_processing (); virtual bool do_try_music (Music* req_l); virtual void do_pre_move_processing(); diff --git a/lily/include/translator.hh b/lily/include/translator.hh index 05f865082d..083c169106 100644 --- a/lily/include/translator.hh +++ b/lily/include/translator.hh @@ -53,6 +53,7 @@ public: void add_processing (); void creation_processing (); void process_music(); + void announces(); void post_move_processing(); void removal_processing(); /** @@ -98,7 +99,8 @@ protected: virtual bool do_try_music (Music *req_l); virtual void do_pre_move_processing(); virtual void do_post_move_processing(); - virtual void do_process_music () ; + void deprecated_process_music () ; + virtual void do_announces () ; virtual void do_creation_processing() ; virtual void do_removal_processing(); }; diff --git a/lily/key-engraver.cc b/lily/key-engraver.cc index 4b1e204a83..d38939cd6a 100644 --- a/lily/key-engraver.cc +++ b/lily/key-engraver.cc @@ -40,9 +40,10 @@ protected: virtual void do_creation_processing(); virtual void do_removal_processing (); virtual bool do_try_music (Music *req_l); - virtual void do_process_music(); + void deprecated_process_music(); virtual void do_pre_move_processing(); virtual void do_post_move_processing(); + virtual void process_acknowledged (); virtual void acknowledge_element (Score_element_info); }; @@ -128,7 +129,13 @@ Key_engraver::acknowledge_element (Score_element_info info) } void -Key_engraver::do_process_music () +Key_engraver::process_acknowledged () +{ + deprecated_process_music (); +} + +void +Key_engraver::deprecated_process_music () { if (keyreq_l_ || old_accs_ != get_property ("keySignature")) { diff --git a/lily/key-performer.cc b/lily/key-performer.cc index f13cc85d7d..77fb5c74e7 100644 --- a/lily/key-performer.cc +++ b/lily/key-performer.cc @@ -24,7 +24,7 @@ Key_performer::~Key_performer () } void -Key_performer::do_process_music () +Key_performer::deprecated_process_music () { if (key_req_l_ && gh_list_p (key_req_l_->get_mus_property ("pitch-alist"))) diff --git a/lily/local-key-engraver.cc b/lily/local-key-engraver.cc index 271b61606a..487bf47311 100644 --- a/lily/local-key-engraver.cc +++ b/lily/local-key-engraver.cc @@ -31,7 +31,7 @@ struct Local_key_engraver : Engraver { Item *key_item_p_; protected: VIRTUAL_COPY_CONS(Translator); - virtual void do_process_music(); + void deprecated_process_music(); virtual void acknowledge_element (Score_element_info); virtual void do_pre_move_processing(); virtual void do_creation_processing (); @@ -74,6 +74,8 @@ Local_key_engraver::do_creation_processing () void Local_key_engraver::process_acknowledged () { + deprecated_process_music (); + if (!key_item_p_ && mel_l_arr_.size()) { SCM localsig = get_property ("localKeySignature"); @@ -237,7 +239,7 @@ Local_key_engraver::acknowledge_element (Score_element_info info) ugh. repeated deep_copy generates lots of garbage. */ void -Local_key_engraver::do_process_music() +Local_key_engraver::deprecated_process_music() { SCM smp = get_property ("measurePosition"); Moment mp = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0); diff --git a/lily/lyric-engraver.cc b/lily/lyric-engraver.cc index 09e9fc9ee9..3360f0a3ec 100644 --- a/lily/lyric-engraver.cc +++ b/lily/lyric-engraver.cc @@ -37,7 +37,7 @@ Lyric_engraver::do_try_music (Music*r) } void -Lyric_engraver::do_process_music() +Lyric_engraver::deprecated_process_music() { if (req_l_) { @@ -55,6 +55,7 @@ Lyric_engraver::do_process_music() text_p_->translate_axis (0.66, X_AXIS); announce_element (text_p_, req_l_); + req_l_ = 0; } } diff --git a/lily/lyric-performer.cc b/lily/lyric-performer.cc index 4557f43076..f20891ab28 100644 --- a/lily/lyric-performer.cc +++ b/lily/lyric-performer.cc @@ -19,7 +19,7 @@ Lyric_performer::Lyric_performer () void -Lyric_performer::do_process_music () +Lyric_performer::deprecated_process_music () { // FIXME: won't work with fancy lyrics if (lreq_arr_.size () diff --git a/lily/mark-engraver.cc b/lily/mark-engraver.cc index 7e76790d77..a739c21d60 100644 --- a/lily/mark-engraver.cc +++ b/lily/mark-engraver.cc @@ -38,9 +38,10 @@ protected: virtual void acknowledge_element (Score_element_info); void create_items(Request*); virtual bool do_try_music (Music *req_l); - virtual void do_process_music (); + void deprecated_process_music (); virtual void do_post_move_processing (); virtual void do_creation_processing (); + virtual void process_acknowledged (); private: Mark_req * mark_req_l_; @@ -136,7 +137,13 @@ Mark_engraver::do_try_music (Music* r_l) } void -Mark_engraver::do_process_music () +Mark_engraver::process_acknowledged () +{ + deprecated_process_music (); +} + +void +Mark_engraver::deprecated_process_music () { if (mark_req_l_) { diff --git a/lily/multi-measure-rest-engraver.cc b/lily/multi-measure-rest-engraver.cc index 228ab780c9..58e38470da 100644 --- a/lily/multi-measure-rest-engraver.cc +++ b/lily/multi-measure-rest-engraver.cc @@ -30,11 +30,13 @@ public: protected: virtual void acknowledge_element (Score_element_info i); - virtual void do_process_music (); + void deprecated_process_music (); virtual bool do_try_music (Music*); virtual void do_pre_move_processing (); virtual void do_post_move_processing (); virtual void do_removal_processing (); + virtual void process_acknowledged (); + private: Span_req * new_req_l_; Span_req * busy_span_req_l_; @@ -91,10 +93,15 @@ Multi_measure_rest_engraver::do_try_music (Music* req_l) return false; } +void +Multi_measure_rest_engraver::process_acknowledged () +{ + deprecated_process_music (); +} void -Multi_measure_rest_engraver::do_process_music () +Multi_measure_rest_engraver::deprecated_process_music () { if (new_req_l_ && stop_req_l_) stop_req_l_ = 0; diff --git a/lily/note-heads-engraver.cc b/lily/note-heads-engraver.cc index 414e2aedbb..310a180fad 100644 --- a/lily/note-heads-engraver.cc +++ b/lily/note-heads-engraver.cc @@ -30,7 +30,9 @@ public: protected: virtual void do_post_move_processing (); virtual bool do_try_music (Music *req_l) ; - virtual void do_process_music(); + virtual void process_acknowledged (); + virtual void acknowledge_element (Score_element_info) ; + void deprecated_process_music(); virtual void do_pre_move_processing(); }; @@ -73,7 +75,19 @@ Note_heads_engraver::do_try_music (Music *m) } void -Note_heads_engraver::do_process_music() +Note_heads_engraver::process_acknowledged () +{ + deprecated_process_music (); +} + +void +Note_heads_engraver::acknowledge_element (Score_element_info) +{ + //deprecated_process_music (); +} + +void +Note_heads_engraver::deprecated_process_music() { if (note_p_arr_.size ()) return ; diff --git a/lily/note-name-engraver.cc b/lily/note-name-engraver.cc index b5ce78e561..17fa147b21 100644 --- a/lily/note-name-engraver.cc +++ b/lily/note-name-engraver.cc @@ -18,7 +18,7 @@ public: Link_array req_l_arr_; Link_array texts_; virtual bool do_try_music (Music*m); - virtual void do_process_music (); + void deprecated_process_music (); virtual void do_pre_move_processing (); }; @@ -35,8 +35,10 @@ Note_name_engraver::do_try_music (Music *m) void -Note_name_engraver::do_process_music () +Note_name_engraver::deprecated_process_music () { + if (texts_.size ()) + return; String s ; for (int i=0; i < req_l_arr_.size (); i++) { diff --git a/lily/note-performer.cc b/lily/note-performer.cc index d452ae5e87..d63d0c442b 100644 --- a/lily/note-performer.cc +++ b/lily/note-performer.cc @@ -23,7 +23,7 @@ Note_performer::Note_performer () void -Note_performer::do_process_music () +Note_performer::deprecated_process_music () { if (note_req_l_arr_.size ()) { diff --git a/lily/performer-group-performer.cc b/lily/performer-group-performer.cc index 0c07bf694f..d594e49b92 100644 --- a/lily/performer-group-performer.cc +++ b/lily/performer-group-performer.cc @@ -9,6 +9,7 @@ #include "performer-group-performer.hh" +#include "audio-element.hh" #include "debug.hh" @@ -33,12 +34,22 @@ Performer_group_performer::do_announces() dynamic_cast (t)->do_announces (); } - while (announce_info_arr_.size ()) - { - for (int j =0; j < announce_info_arr_.size(); j++) - { - Audio_element_info info = announce_info_arr_[j]; - + // debug + int i = 0; + do + { + i++; + for (int j =0; j < announce_info_arr_.size(); j++) + { + Audio_element_info info = announce_info_arr_[j]; + + if (i > 10) + { + printf ("elt: %s\n", + classname (announce_info_arr_[j].elem_l_)); + announce_info_arr_.clear (); + } + for (SCM p = simple_trans_list_; gh_pair_p (p); p = gh_cdr (p)) { Translator * t = unsmob_translator (gh_car (p)); @@ -56,6 +67,7 @@ Performer_group_performer::do_announces() eng->process_acknowledged (); } } + while (announce_info_arr_.size ()); } diff --git a/lily/piano-pedal-engraver.cc b/lily/piano-pedal-engraver.cc index 3f09f169e1..0d2348f41b 100644 --- a/lily/piano-pedal-engraver.cc +++ b/lily/piano-pedal-engraver.cc @@ -33,10 +33,11 @@ public: protected: virtual void do_creation_processing (); virtual bool do_try_music (Music*); - virtual void do_process_music (); + void deprecated_process_music (); virtual void do_pre_move_processing (); virtual void do_post_move_processing (); virtual void acknowledge_element (Score_element_info); + virtual void process_acknowledged (); private: struct Pedal_info @@ -91,7 +92,7 @@ Piano_pedal_engraver::~Piano_pedal_engraver() void Piano_pedal_engraver::acknowledge_element (Score_element_info info) { - for (Pedal_info*p = info_list_; p->name_; p ++) + for (Pedal_info*p = info_list_; p && p->name_; p ++) { if (p->item_p_) { @@ -130,10 +131,18 @@ Piano_pedal_engraver::do_try_music (Music *m) } void -Piano_pedal_engraver::do_process_music () +Piano_pedal_engraver::process_acknowledged () { - for (Pedal_info*p = info_list_; p->name_; p ++) + deprecated_process_music (); +} + +void +Piano_pedal_engraver::deprecated_process_music () +{ + for (Pedal_info*p = info_list_; p && p->name_; p ++) { + if (p->item_p_) + continue; SCM s = SCM_EOL; if (p->req_l_drul_[STOP] && p->req_l_drul_[START]) { diff --git a/lily/piano-pedal-performer.cc b/lily/piano-pedal-performer.cc index a3c8fb4829..e2d6eb02ca 100644 --- a/lily/piano-pedal-performer.cc +++ b/lily/piano-pedal-performer.cc @@ -33,7 +33,7 @@ public: protected: virtual void do_creation_processing (); virtual bool do_try_music (Music*); - virtual void do_process_music (); + void deprecated_process_music (); virtual void do_pre_move_processing (); virtual void do_post_move_processing (); @@ -75,9 +75,9 @@ Piano_pedal_performer::do_creation_processing () } void -Piano_pedal_performer::do_process_music () +Piano_pedal_performer::deprecated_process_music () { - for (Pedal_info*p = info_alist_; p->name_; p ++) + for (Pedal_info*p = info_alist_; p && p->name_; p ++) { if (p->req_l_drul_[STOP]) @@ -118,7 +118,7 @@ Piano_pedal_performer::do_pre_move_processing () void Piano_pedal_performer::do_post_move_processing () { - for (Pedal_info*p = info_alist_; p->name_; p ++) + for (Pedal_info*p = info_alist_; p && p->name_; p ++) { p->req_l_drul_[STOP] = 0; p->req_l_drul_[START] = 0; diff --git a/lily/property-engraver.cc b/lily/property-engraver.cc index 9861866e82..0a003b23d1 100644 --- a/lily/property-engraver.cc +++ b/lily/property-engraver.cc @@ -70,6 +70,8 @@ Property_engraver::do_creation_processing () void Property_engraver::acknowledge_element (Score_element_info i) { + ///////// + return; SCM ifs = i.elem_l_->get_elt_property ("interfaces"); SCM props; for (; gh_pair_p (ifs); ifs = gh_cdr (ifs)) diff --git a/lily/repeat-acknowledge-engraver.cc b/lily/repeat-acknowledge-engraver.cc index e119ab714a..e3f544d0f6 100644 --- a/lily/repeat-acknowledge-engraver.cc +++ b/lily/repeat-acknowledge-engraver.cc @@ -29,7 +29,7 @@ public: Repeat_acknowledge_engraver(); virtual void do_post_move_processing (); - virtual void do_process_music (); + void deprecated_process_music (); virtual void do_creation_processing (); }; @@ -55,7 +55,7 @@ Repeat_acknowledge_engraver::do_post_move_processing () } void -Repeat_acknowledge_engraver::do_process_music () +Repeat_acknowledge_engraver::deprecated_process_music () { /* At the start of a piece, we don't print any repeat bars. diff --git a/lily/rest-engraver.cc b/lily/rest-engraver.cc index ead302fbb4..4fe90403e0 100644 --- a/lily/rest-engraver.cc +++ b/lily/rest-engraver.cc @@ -22,7 +22,7 @@ protected: virtual bool do_try_music (Music *); virtual void do_pre_move_processing (); virtual void do_post_move_processing (); - virtual void do_process_music (); + void deprecated_process_music (); public: VIRTUAL_COPY_CONS(Translator); @@ -62,7 +62,7 @@ Rest_engraver::do_pre_move_processing () } void -Rest_engraver::do_process_music () +Rest_engraver::deprecated_process_music () { if (rest_req_l_ && !rest_p_) { diff --git a/lily/score-engraver.cc b/lily/score-engraver.cc index 3bd5dd257b..fb3dc39108 100644 --- a/lily/score-engraver.cc +++ b/lily/score-engraver.cc @@ -90,8 +90,8 @@ Score_engraver::do_removal_processing() void Score_engraver::process() { - process_music(); - do_announces(); + //process_music(); + announces(); pre_move_processing(); check_removal(); } @@ -114,8 +114,9 @@ Score_engraver::announce_element (Score_element_info info) void Score_engraver::do_announces() { - while (announce_info_arr_.size()) + ////// do Engraver_group_engraver::do_announces(); + //////while (announce_info_arr_.size()); } diff --git a/lily/score-performer.cc b/lily/score-performer.cc index 1908644904..3479a17b46 100644 --- a/lily/score-performer.cc +++ b/lily/score-performer.cc @@ -71,8 +71,8 @@ Score_performer::prepare (Moment m) void Score_performer::process() { - process_music(); - do_announces (); + //process_music(); + announces (); pre_move_processing(); check_removal(); } diff --git a/lily/script-engraver.cc b/lily/script-engraver.cc index 7490bb68f9..7eba9b7c24 100644 --- a/lily/script-engraver.cc +++ b/lily/script-engraver.cc @@ -22,9 +22,10 @@ public: Script_engraver(); protected: virtual bool do_try_music (Music*); - virtual void do_process_music (); + void deprecated_process_music (); virtual void do_pre_move_processing (); virtual void do_post_move_processing (); + virtual void process_acknowledged (); virtual void acknowledge_element (Score_element_info); }; @@ -51,7 +52,13 @@ Script_engraver::do_try_music (Music *r_l) } void -Script_engraver::do_process_music() +Script_engraver::process_acknowledged () +{ + deprecated_process_music (); +} + +void +Script_engraver::deprecated_process_music() { for (int i=0; i < script_req_l_arr_.size(); i++) { @@ -112,6 +119,7 @@ Script_engraver::do_process_music() announce_element (p, l); } + script_req_l_arr_.clear (); } void diff --git a/lily/slur-engraver.cc b/lily/slur-engraver.cc index d159020b82..4d363d3d43 100644 --- a/lily/slur-engraver.cc +++ b/lily/slur-engraver.cc @@ -25,11 +25,12 @@ class Slur_engraver : public Engraver protected: virtual bool do_try_music (Music*); - virtual void do_process_music (); + void deprecated_process_music (); virtual void acknowledge_element (Score_element_info); virtual void do_pre_move_processing (); virtual void do_post_move_processing (); virtual void do_removal_processing (); + virtual void process_acknowledged (); public: VIRTUAL_COPY_CONS (Translator); @@ -86,6 +87,12 @@ Slur_engraver::do_try_music (Music *req_l) return false; } +void +Slur_engraver::process_acknowledged () +{ + deprecated_process_music (); +} + void Slur_engraver::set_melisma (bool m) { @@ -130,7 +137,7 @@ Slur_engraver::do_removal_processing () } void -Slur_engraver::do_process_music () +Slur_engraver::deprecated_process_music () { Link_array start_slur_l_arr; for (int i=0; i< new_slur_req_l_arr_.size (); i++) @@ -171,6 +178,7 @@ Slur_engraver::do_process_music () } for (int i=0; i < start_slur_l_arr.size (); i++) slur_l_stack_.push (start_slur_l_arr[i]); + new_slur_req_l_arr_.clear (); } void diff --git a/lily/span-dynamic-performer.cc b/lily/span-dynamic-performer.cc index 1775f2681a..2fb2e818a2 100644 --- a/lily/span-dynamic-performer.cc +++ b/lily/span-dynamic-performer.cc @@ -31,7 +31,7 @@ protected: virtual bool do_try_music (Music*); virtual void acknowledge_element (Audio_element_info); virtual void process_acknowledged (); - virtual void do_process_music (); + void deprecated_process_music (); virtual void do_pre_move_processing (); virtual void do_post_move_processing (); @@ -67,7 +67,7 @@ Span_dynamic_performer::acknowledge_element (Audio_element_info i) } void -Span_dynamic_performer::do_process_music () +Span_dynamic_performer::deprecated_process_music () { if (span_start_req_l_ || span_req_l_drul_[START]) { @@ -111,6 +111,7 @@ Span_dynamic_performer::do_process_music () void Span_dynamic_performer::process_acknowledged () { + deprecated_process_music (); if (span_req_l_drul_[STOP]) { finished_dynamic_tuple_arr_.top ().audio_l_->volume_ = last_volume_; @@ -120,6 +121,9 @@ Span_dynamic_performer::process_acknowledged () { dynamic_tuple_arr_[0].audio_l_->volume_ = last_volume_; } + span_start_req_l_ = 0; + span_req_l_drul_[START] = 0; + span_req_l_drul_[STOP] = 0; } void diff --git a/lily/staff-performer.cc b/lily/staff-performer.cc index bebb642468..61014a0d16 100644 --- a/lily/staff-performer.cc +++ b/lily/staff-performer.cc @@ -45,7 +45,7 @@ Staff_performer::do_creation_processing () } void -Staff_performer::do_process_music () +Staff_performer::deprecated_process_music () { String str = new_instrument_str (); if (str.length_i ()) @@ -55,7 +55,7 @@ Staff_performer::do_process_music () instrument_p_ = new Audio_instrument (str); announce_element (Audio_element_info (instrument_p_, 0)); } - Performer_group_performer::do_process_music (); + Performer_group_performer::deprecated_process_music (); } void diff --git a/lily/staff-symbol-engraver.cc b/lily/staff-symbol-engraver.cc index d3685bfbf5..520bcc701d 100644 --- a/lily/staff-symbol-engraver.cc +++ b/lily/staff-symbol-engraver.cc @@ -62,8 +62,17 @@ Staff_symbol_engraver::do_removal_processing() void Staff_symbol_engraver::acknowledge_element (Score_element_info s) { - s.elem_l_->set_elt_property ("staff-symbol", span_p_->self_scm ()); - s.elem_l_->add_dependency (span_p_); // UGH. UGH. UGH + ////// assert (span_p_); + ////// ik weet 't zo onderhand echt niet meer + ///// if (!span_p_) + ///// do_creation_processing (); + if (!span_p_) + { + status_ = VIRGIN; + creation_processing (); + } + s.elem_l_->set_elt_property ("staff-symbol", span_p_->self_scm ()); + s.elem_l_->add_dependency (span_p_); // UGH. UGH. UGH } diff --git a/lily/tempo-performer.cc b/lily/tempo-performer.cc index 1f38e3a809..9a8b89ade2 100644 --- a/lily/tempo-performer.cc +++ b/lily/tempo-performer.cc @@ -24,7 +24,7 @@ Tempo_performer::~Tempo_performer () void -Tempo_performer::do_process_music () +Tempo_performer::deprecated_process_music () { if (tempo_req_l_) { diff --git a/lily/text-engraver.cc b/lily/text-engraver.cc index c18a61f614..c463fdb275 100644 --- a/lily/text-engraver.cc +++ b/lily/text-engraver.cc @@ -29,7 +29,8 @@ protected: virtual bool do_try_music (Music* m); virtual void do_pre_move_processing (); virtual void do_post_move_processing (); - virtual void do_process_music (); + virtual void process_acknowledged (); + void deprecated_process_music (); virtual void acknowledge_element (Score_element_info); }; @@ -77,8 +78,16 @@ Text_engraver::acknowledge_element (Score_element_info inf) } void -Text_engraver::do_process_music () +Text_engraver::process_acknowledged () { + deprecated_process_music (); +} + +void +Text_engraver::deprecated_process_music () +{ + if (texts_.size ()) + return; for (int i=0; i < reqs_.size (); i++) { Text_script_req * r = reqs_[i]; diff --git a/lily/text-spanner-engraver.cc b/lily/text-spanner-engraver.cc index 2b04b01a7d..1c843c4555 100644 --- a/lily/text-spanner-engraver.cc +++ b/lily/text-spanner-engraver.cc @@ -29,9 +29,10 @@ protected: virtual void do_removal_processing (); virtual void acknowledge_element (Score_element_info); virtual bool do_try_music (Music *); - virtual void do_process_music (); + void deprecated_process_music (); virtual void do_pre_move_processing (); virtual void do_post_move_processing (); + virtual void process_acknowledged (); private: Spanner *span_; @@ -84,8 +85,15 @@ Text_spanner_engraver::do_try_music (Music *m) } void -Text_spanner_engraver::do_process_music () +Text_spanner_engraver::process_acknowledged () { + deprecated_process_music (); +} + +void +Text_spanner_engraver::deprecated_process_music () +{ + ///// if (req_drul_[STOP]) { if (!span_) diff --git a/lily/tie-engraver.cc b/lily/tie-engraver.cc index 576e465317..bee102edfd 100644 --- a/lily/tie-engraver.cc +++ b/lily/tie-engraver.cc @@ -62,7 +62,7 @@ protected: virtual void do_pre_move_processing (); virtual void acknowledge_element (Score_element_info); virtual bool do_try_music (Music*); - virtual void do_process_music (); + void deprecated_process_music (); virtual void process_acknowledged (); void typeset_tie (Score_element*); public: @@ -118,8 +118,16 @@ Tie_engraver::acknowledge_element (Score_element_info i) } void -Tie_engraver::do_process_music () +Tie_engraver::deprecated_process_music () { +} + +void +Tie_engraver::process_acknowledged () +{ + if (tie_p_arr_.size ()) + return; + if (req_l_) { Moment now = now_mom (); @@ -128,11 +136,6 @@ Tie_engraver::do_process_music () && past_notes_pq_.front ().end_ == now) stopped_heads_.push (past_notes_pq_.get ()); } -} - -void -Tie_engraver::process_acknowledged () -{ if (req_l_) { now_heads_.sort (CHead_melodic_tuple::pitch_compare); diff --git a/lily/tie-performer.cc b/lily/tie-performer.cc index 521ac201c4..66de72eddb 100644 --- a/lily/tie-performer.cc +++ b/lily/tie-performer.cc @@ -47,7 +47,7 @@ Tie_performer::acknowledge_element (Audio_element_info i) } void -Tie_performer::do_process_music () +Tie_performer::deprecated_process_music () { if (req_l_) { @@ -64,6 +64,7 @@ Tie_performer::do_process_music () void Tie_performer::process_acknowledged () { + deprecated_process_music (); if (req_l_) { now_notes_.sort (CNote_melodic_tuple::pitch_compare); diff --git a/lily/time-signature-engraver.cc b/lily/time-signature-engraver.cc index aee3ea0852..2499bcba2e 100644 --- a/lily/time-signature-engraver.cc +++ b/lily/time-signature-engraver.cc @@ -19,7 +19,7 @@ */ class Time_signature_engraver : public Engraver { protected: - virtual void do_process_music(); + void deprecated_process_music(); virtual void do_pre_move_processing(); public: VIRTUAL_COPY_CONS(Translator); @@ -36,7 +36,7 @@ Time_signature_engraver::Time_signature_engraver() } void -Time_signature_engraver::do_process_music() +Time_signature_engraver::deprecated_process_music() { /* not rigorously safe, since the value might get GC'd and diff --git a/lily/time-signature-performer.cc b/lily/time-signature-performer.cc index 8127dd940d..dcc2c5fe0d 100644 --- a/lily/time-signature-performer.cc +++ b/lily/time-signature-performer.cc @@ -21,7 +21,7 @@ public: protected: - virtual void do_process_music(); + void deprecated_process_music(); virtual void do_pre_move_processing (); SCM prev_fraction_; @@ -43,7 +43,7 @@ Time_signature_performer::~Time_signature_performer () void -Time_signature_performer::do_process_music () +Time_signature_performer::deprecated_process_music () { SCM fr = get_property ("timeSignatureFraction"); if (gh_pair_p (fr) diff --git a/lily/timing-translator.cc b/lily/timing-translator.cc index b130629ccd..1f356c7c19 100644 --- a/lily/timing-translator.cc +++ b/lily/timing-translator.cc @@ -31,7 +31,7 @@ Timing_translator::do_try_music (Music*r) } void -Timing_translator::do_process_music() +Timing_translator::deprecated_process_music() { if (check_ && measure_position ()) { diff --git a/lily/translator-group.cc b/lily/translator-group.cc index 1b85d8113a..aa2541ebe4 100644 --- a/lily/translator-group.cc +++ b/lily/translator-group.cc @@ -418,11 +418,18 @@ Translator_group::do_post_move_processing () } void -Translator_group::do_process_music () +Translator_group::deprecated_process_music () { + assert (0); each (&Translator::process_music); } +void +Translator_group::do_announces () +{ + each (&Translator::announces); +} + void Translator_group::do_creation_processing () { diff --git a/lily/translator.cc b/lily/translator.cc index 4946af8027..2b767bc64a 100644 --- a/lily/translator.cc +++ b/lily/translator.cc @@ -127,18 +127,42 @@ Translator::try_music (Music * r) return do_try_music (r); } + void Translator::process_music () { + assert (0); if (status_ < PROCESSED_REQS) post_move_processing (); else if (status_ >= PROCESSED_REQS) return; status_ = PROCESSED_REQS; - do_process_music (); + deprecated_process_music (); +} + +////////// +static int te_vroeg = 0; +void +Translator::announces () +{ + #if 0 + if (te_vroeg && te_vroeg < 2) + { + do_creation_processing (); + te_vroeg++; + } + #endif + if (status_ < PROCESSED_REQS) + post_move_processing (); + else if (status_ >= PROCESSED_REQS) + return; + + status_ = PROCESSED_REQS; + do_announces (); } + void Translator::pre_move_processing () { @@ -177,13 +201,20 @@ Translator::do_post_move_processing () } void -Translator::do_process_music () +Translator::deprecated_process_music () +{ +} + +void +Translator::do_announces () { } +//////////// void Translator::do_creation_processing () { + te_vroeg++; } void diff --git a/lily/tuplet-engraver.cc b/lily/tuplet-engraver.cc index c102fd7ad5..87446d86eb 100644 --- a/lily/tuplet-engraver.cc +++ b/lily/tuplet-engraver.cc @@ -35,8 +35,9 @@ protected: virtual void do_removal_processing (); virtual void acknowledge_element (Score_element_info); virtual bool do_try_music (Music*r); - virtual void do_process_music (); + void deprecated_process_music (); virtual void do_post_move_processing (); + virtual void process_acknowledged (); }; bool @@ -63,7 +64,13 @@ Tuplet_engraver::do_try_music (Music *r) } void -Tuplet_engraver::do_process_music () +Tuplet_engraver::process_acknowledged () +{ + deprecated_process_music (); +} + +void +Tuplet_engraver::deprecated_process_music () { SCM v = get_property ("tupletInvisible"); if (to_boolean (v)) diff --git a/lily/volta-engraver.cc b/lily/volta-engraver.cc index 2d8d6e6e91..47a0cb19d2 100644 --- a/lily/volta-engraver.cc +++ b/lily/volta-engraver.cc @@ -29,8 +29,9 @@ protected: virtual void acknowledge_element (Score_element_info); virtual void do_removal_processing (); virtual void do_pre_move_processing (); - virtual void do_process_music (); - + void deprecated_process_music (); + virtual void process_acknowledged (); + Moment started_mom_; Spanner * volta_span_p_; Spanner* end_volta_span_p_; @@ -45,8 +46,16 @@ Volta_engraver::Volta_engraver () } void -Volta_engraver::do_process_music () +Volta_engraver::process_acknowledged () { + deprecated_process_music (); +} + +void +Volta_engraver::deprecated_process_music () +{ + if (volta_span_p_) + return; SCM cs = get_property ("repeatCommands"); SCM str = SCM_EOL; -- 2.39.5