/*
should use minimum energy formulation (cf linespacing)
- */
+
+ [todo]
+ the y of the (start) of the beam should be quantisized,
+ so that no stafflines appear just in between two beam-flags
+
+*/
void
Beam::solve_slope()
{
void
Beam::do_post_processing()
{
+ if ( stems.size() < 2) {
+ warning("Beam with less than 2 stems");
+ transparent_b_ = true;
+ return ;
+ }
solve_slope();
set_stemlens();
}
void
Beam::do_pre_processing()
{
- assert(stems.size()>1);
if (!dir_i_)
set_default_dir();
Molecule*
Beam::brew_molecule_p() const
{
- /*
- [todo]
- the y of the (start) of the beam should be quantisized,
- so that no stafflines appear just in between two beam-flags
- */
+
Molecule *mol_p = new Molecule;
// huh? inter-what
// Real inter_f = paper()->interbeam_f();
Spanner::print();
#endif
}
-
+/*
+ duh. The stem is not a dependency but a dependent
+ */
void
Beam::do_substitute_dependency(Score_elem*o,Score_elem*n)
{
- int i;
- while ((i=stems.find_i((Stem*)o->item())) >=0)
- if (n) stems[i] = (Stem*) n->item();
- else stems.del(i);
+ if (o->is_type_b( Stem::static_name() )) {
+ stems.substitute( (Stem*)o->item(), n?(Stem*) n->item():0);
+ }
}