2 beam.hh -- part of GNU LilyPond
4 (c) 1996--2000 Han-Wen Nienhuys
10 #include "lily-proto.hh"
14 /** a beam connects multiple stems.
16 Beam adjusts the stems its owns to make sure that they reach the
17 beam and that point in the correct direction (urg?)
20 y-position: real (position of left edge)
23 damping: amount of beam slope damping. (int)
24 should beam slope be damped? 0: no, 1: yes, 100000: horizontal beams
26 class Beam : public Spanner
29 static SCM scheme_molecule (SCM);
32 int stem_count () const;
33 Stem* stem (int) const;
34 Stem* stem_top () const;
35 int visible_stem_count () const;
36 Stem* first_visible_stem () const;
37 Stem* last_visible_stem () const;
40 void add_stem (Stem*);
41 void set_grouping (Rhythmic_grouping def, Rhythmic_grouping current);
42 void set_beaming (Beaming_info_list *);
44 VIRTUAL_COPY_CONS(Score_element);
46 int get_multiplicity () const;
50 virtual void before_line_breaking ();
51 virtual void after_line_breaking ();
52 Molecule do_brew_molecule () const;
54 Molecule stem_beams (Stem *here, Stem *next, Stem *prev) const;
56 Direction get_default_dir () const;
57 void set_stem_directions ();
59 bool auto_knee (String gap_str, bool interstaff_b);
60 void set_stem_shorten ();
61 void calc_default_position_and_height (Real* y, Real* dy) const;
62 bool suspect_slope_b (Real y, Real dy) const;
63 Real calc_slope_damping_f (Real dy) const;
64 Real calc_stem_y_f (Stem* s, Real y, Real dy) const;
65 Real check_stem_length_f (Real y, Real dy) const;
66 void set_stem_length (Real y, Real dy);
67 Real quantise_dy_f (Real dy) const;
68 Real quantise_y_f (Real y, Real dy, int quant_dir);
69 int forced_stem_count () const;