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
30 int stem_count () const;
31 Stem* stem (int) const;
32 Stem* stem_top () const;
33 int visible_stem_count () const;
34 Stem* first_visible_stem () const;
35 Stem* last_visible_stem () const;
38 void add_stem (Stem*);
39 void set_grouping (Rhythmic_grouping def, Rhythmic_grouping current);
40 void set_beaming (Beaming_info_list *);
42 VIRTUAL_COPY_CONS(Score_element);
44 int get_multiplicity () const;
48 virtual void do_pre_processing ();
49 virtual void do_post_processing ();
50 virtual Molecule do_brew_molecule () const;
52 Molecule stem_beams (Stem *here, Stem *next, Stem *prev) const;
54 Direction get_default_dir () const;
55 void set_stem_directions ();
57 bool auto_knee (String gap_str, bool interstaff_b);
58 void set_stem_shorten ();
59 void calc_position_and_height (Real* y, Real* dy) const;
60 bool suspect_slope_b (Real y, Real dy) const;
61 Real calc_slope_damping_f (Real dy) const;
62 Real calc_stem_y_f (Stem* s, Real y, Real dy) const;
63 Real check_stem_length_f (Real y, Real dy) const;
64 void set_stem_length (Real y, Real dy);
65 Real quantise_dy_f (Real dy) const;
66 Real quantise_y_f (Real y, Real dy, int quant_dir);
67 int forced_stem_count () const;