X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fauto-beam-engraver.cc;h=7e939e7c8e4ce4976b744087ec5f56558628bab7;hb=b638d530ac5a32a832646cdd2b680ce52d0764f0;hp=779d0781b0c196e0964dd18e59922438425d881f;hpb=fbb6d20e9f58d691ffe845284cbb4d8bacf9ca60;p=lilypond.git diff --git a/lily/auto-beam-engraver.cc b/lily/auto-beam-engraver.cc index 779d0781b0..7e939e7c8e 100644 --- a/lily/auto-beam-engraver.cc +++ b/lily/auto-beam-engraver.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1999 Jan Nieuwenhuizen + (c) 1999--2000 Jan Nieuwenhuizen */ #include "beaming.hh" @@ -19,6 +19,11 @@ ADD_THIS_TRANSLATOR (Auto_beam_engraver); + +/* + TODO: remove all references to Timing_engraver; should read properties. + + */ Auto_beam_engraver::Auto_beam_engraver () { stem_l_arr_p_ = 0; @@ -52,7 +57,7 @@ void Auto_beam_engraver::consider_end_and_begin (Moment test_mom) { if (!timer_l_) - return; + return; int num; int den; @@ -108,59 +113,59 @@ Auto_beam_engraver::consider_end_and_begin (Moment test_mom) SCM one (get_property ("beatLength")); Moment end_mom; - if (SMOB_IS_TYPE_B(Moment, one)) - end_mom = *SMOB_TO_TYPE (Moment, one); + if (unsmob_moment (one)) + end_mom = *unsmob_moment (one); /* second guess: property generic time exception */ - SCM begin = get_property (time_str + "beamAutoBegin"); - if (SMOB_IS_TYPE_B(Moment, begin)) - begin_mom = * SMOB_TO_TYPE(Moment, begin); + SCM begin = get_property ((time_str + "beamAutoBegin").ch_C()); + if (unsmob_moment (begin)) + begin_mom = * unsmob_moment (begin); - SCM end = get_property (time_str + "beamAutoEnd"); - if (SMOB_IS_TYPE_B (Moment, end)) - end_mom = * SMOB_TO_TYPE(Moment,end); + SCM end = get_property ((time_str + "beamAutoEnd").ch_C()); + if (unsmob_moment (end)) + end_mom = * unsmob_moment (end); /* third guess: property time exception, specific for duration type */ if (type_str.length_i ()) { - SCM end_mult = get_property ( time_str + "beamAutoEnd" + type_str); - if (SMOB_IS_TYPE_B (Moment, end_mult)) - end_mom = * SMOB_TO_TYPE (Moment,end_mult); + SCM end_mult = get_property ((time_str + "beamAutoEnd" + type_str).ch_C()); + if (unsmob_moment (end_mult)) + end_mom = * unsmob_moment (end_mult); - SCM begin_mult = get_property (time_str + "beamAutoBegin" + type_str); - if (SMOB_IS_TYPE_B (Moment, begin_mult)) - begin_mom = * SMOB_TO_TYPE (Moment,begin_mult); + SCM begin_mult = get_property ((time_str + "beamAutoBegin" + type_str).ch_C()); + if (unsmob_moment (begin_mult)) + begin_mom = * unsmob_moment (begin_mult); } /* fourth guess [user override]: property plain generic */ begin = get_property ("beamAutoBegin"); - if (SMOB_IS_TYPE_B(Moment, begin)) - begin_mom = * SMOB_TO_TYPE(Moment, begin); + if (unsmob_moment (begin)) + begin_mom = * unsmob_moment (begin); end = get_property ("beamAutoEnd"); - if (SMOB_IS_TYPE_B (Moment, end)) - end_mom = * SMOB_TO_TYPE (Moment,end); + if (unsmob_moment (end)) + end_mom = * unsmob_moment (end); /* fifth guess [user override]: property plain, specific for duration type */ if (type_str.length_i ()) { - SCM end_mult = get_property (String ("beamAutoEnd") + type_str); - if (SMOB_IS_TYPE_B (Moment, end_mult)) - end_mom = * SMOB_TO_TYPE (Moment,end_mult); + SCM end_mult = get_property ((String ("beamAutoEnd") + type_str).ch_C()); + if (unsmob_moment (end_mult)) + end_mom = * unsmob_moment (end_mult); - SCM begin_mult = get_property (String ("beamAutoBegin") + type_str); - if (SMOB_IS_TYPE_B (Moment, begin_mult)) - begin_mom = * SMOB_TO_TYPE (Moment,begin_mult); + SCM begin_mult = get_property ((String ("beamAutoBegin") + type_str).ch_C()); + if (unsmob_moment (begin_mult)) + begin_mom = * unsmob_moment (begin_mult); } Rational r; @@ -200,7 +205,7 @@ Auto_beam_engraver::begin_beam () Beam* Auto_beam_engraver::create_beam_p () { - Beam* beam_p = new Beam; + Beam* beam_p = new Beam (get_property ("basicBeamProperties")); for (int i = 0; i < stem_l_arr_p_->size (); i++) {