source file of the GNU LilyPond music typesetter
- (c) 1999--2001 Jan Nieuwenhuizen <janneke@gnu.org>
+ (c) 1999--2002 Jan Nieuwenhuizen <janneke@gnu.org>
*/
#include "stem.hh"
#include "debug.hh"
#include "engraver-group-engraver.hh"
-#include "bar.hh"
+#include "bar-line.hh"
#include "rest.hh"
#include "engraver.hh"
#include "item.hh"
Moment extend_mom_;
Moment beam_start_moment_;
Moment beam_start_location_;
+
+ bool subdivide_beams_;
// We act as if beam were created, and start a grouping anyway.
Beaming_info_list*grouping_p_;
void
Auto_beam_engraver::consider_begin (Moment test_mom)
{
- bool off = to_boolean (get_property ("noAutoBeaming"));
- if (!stem_l_arr_p_ && ! off)
+ bool on = to_boolean (get_property ("autoBeaming"));
+ if (!stem_l_arr_p_ && on)
{
bool b = test_moment (START, test_mom);
if (b)
if (stem_l_arr_p_)
{
/* Allow already started autobeam to end:
- don't check for noAutoBeaming */
+ don't check for autoBeaming */
bool b = test_moment (STOP, test_mom);
if (b)
end_beam ();
Beam::add_stem (beam_p, (*stem_l_arr_p_)[i]);
}
- announce_grob (beam_p, 0);
+ announce_grob(beam_p, SCM_EOL);
return beam_p;
}
grouping_p_ = new Beaming_info_list;
beam_start_moment_ = now_mom ();
beam_start_location_ = *unsmob_moment (get_property ("measurePosition"));
-
-
+ subdivide_beams_ = gh_scm2bool(get_property("subdivideBeams"));
}
{
if (finished_beam_p_)
{
- finished_grouping_p_->beamify ();
+ finished_grouping_p_->beamify(*unsmob_moment (get_property ("beatLength")),
+ subdivide_beams_);
Beam::set_beaming (finished_beam_p_, finished_grouping_p_);
typeset_grob (finished_beam_p_);
finished_beam_p_ = 0;
{
end_beam ();
}
- else if (Bar::has_interface (info.grob_l_))
+ else if (Bar_line::has_interface (info.grob_l_))
{
end_beam ();
}
{
Item* stem_l = dynamic_cast<Item *> (info.grob_l_);
- Rhythmic_req *rhythmic_req = dynamic_cast <Rhythmic_req *> (info.req_l_);
+ Rhythmic_req *rhythmic_req = dynamic_cast <Rhythmic_req *> (info.music_cause ());
if (!rhythmic_req)
{
programming_error ("Stem must have rhythmic structure");
/*
Don't (start) auto-beam over empty stems; skips or rests
*/
- if (!Stem::heads_i (stem_l))
+ if (!Stem::head_count (stem_l))
{
if (stem_l_arr_p_)
end_beam ();
",
/* creats*/ "Beam",
/* acks */ "stem-interface rest-interface beam-interface bar-line-interface",
-/* reads */ "noAutoBeaming autoBeamSettings",
+/* reads */ "autoBeaming autoBeamSettings subdivideBeams",
/* write */ "");